인프런 영문 브랜드 로고
인프런 영문 브랜드 로고
Hardware

/

Embedded IoT

STM32 CAN Communication

This is a text-based lecture explaining how to implement CAN communication using STM32 MCU. Become a master of CAN communication implementation.

(3.5) 2 reviews

148 students

CAN
MCU

This course is prepared for Basic Learners.

What you will learn!

  • CAN communication using STM32 MCU

  • Utilizing STM32 MCU

CAN communication feels vague,
We will guide you from the basics to practical use.

💾 Please check before taking the class!

  • This lecture is a text lecture in PDF format and does not provide separate videos. (Total 7,384 characters)
  • For those taking the course, we provide all the source files used in the course, as well as the Windows Program source and executable files. The course materials can be downloaded from Section 0 [Material Download Link].
  • This lecture will be conducted on the NUCLEO-F446RE practice board . To implement CAN communication and check the results following the lecture, please purchase the board in advance. (Two boards will be used.)

CAN communication master
If you want to be?

This lecture explains how to implement CAN communication using the microcontroller unit (MCU) STM32. The first half covers CAN communication of STM32F446, and the second half covers CAN communication of STM32H743.

CAN communication
Controller Area Network

It is a standard communication specification designed for microcontrollers and devices to communicate with each other without a host computer in a vehicle. It was initially developed for vehicle networks, but is gradually being widely applied and used in all industrial fields.

CAN communication is gradually expanding to all industrial fields. However, implementing CAN communication is a difficult subject to approach even for those with a lot of development experience. This lecture aims to cover everything about CAN communication, from the concept of CAN communication to programming methods and utilization, and confirmation of results through waveforms.

This lecture explains in detail everything from project creation to source file modification and analysis so that even those who are new to ST MCU can easily follow along. You can also use the debugging program to check the transmission and reception process and results of CAN communication. It will be helpful in understanding the CAN protocol by measuring and analyzing CAN waveforms.

If you are interested in CAN communication , I hope you will become a master of CAN communication through this lecture.


Features of the lecture
Check it out.

1️⃣
Easy even for beginners

We explain the entire process from project creation to program implementation and result verification so that even those who have no experience with STM32 can easily follow along.

2️⃣
So that you can understand the flow

Not only will you gain an overall understanding of CAN communication, you will also acquire the ability to utilize CAN communication in practice.

3️⃣
Providing detailed information

You can check the CAN communication results through the provided Windows program. (Both source and executable files are provided.)


Learning Content and Structure

First half
STM32F446

We will implement data exchange using two NUCLEO-F446RE development boards.

The second half
STM32H743

This is a new feature added in version v1.3, which implements data exchange using the STM32F446 board and the STM32H743 board.

This lecture does not cover CAN-FD, but focuses on 2.0A (Standard) and 2.0B (Extended). (CAN-FD will be covered in the next version.) In addition, for practical training, we will use the NUCLEO-F446RE development board provided by ST, and STM32CubeIDE v.10.0 as the compiler tool.

Detailed Curriculum (Table of Contents)
  • 1 Overview (3)
  • 2 HW Configuration (4)
  • 2.1 FW Download Pinmap (5)
  • 2.2 Power Pin Map (5)
  • 2.3 UART Pinmap (6)
  • 2.4 CAN Pinmap (6)
  • 2.5 Overall system configuration diagram (7)
  • 2.6 Program Download (8)
  • 2.6.1 ST-LINK FW Update (8)
  • 2.6.2 Board Connection (9)
  • 3 CAN Communication Overview (10)
  • 3.1 Data Frame Structure (10)
  • 3.2 Bit Timing (12)
  • 3.3 Arbitration (13)
  • 3.4 Bit Stuffing (15)
  • 4 SW Implementation (16)
  • 4.1 Create a project (16)
  • 4.2 Configuration (18)
  • 4.2.1 RCC, DEBUG (19)
  • 4.2.2 Clock Configuration (20)
  • 4.2.3 Timer Setting (21)
  • 4.2.4 UART Settings (22)
  • 4.2.5 CAN Settings (23)
  • 4.2.6 GPIO Settings (26)
  • 4.3 Code Implementation (27)
  • 4.3.1 Using printf statement (27)
  • 4.3.2 Build & Download (28)
  • 4.3.3 LED On/Off using timer interrupt (30)
  • 4.3.4 UART1 Receive Interrupt Implementation (33)
  • 4.3.5 CAN Communication Implementation (35)
  • 4.3.5.1 main.h (40)
  • 4.3.5.2 can.c (40)
  • 4.3.5.3 can.h (43)
  • 4.3.5.4 usart.c (44)
  • 4.3.5.5 usart.h (46)
  • 4.3.5.6 main.c (46)
  • 5 Check Results (48)
  • 5.1 Test Mode 1 (List16 Mode) (49)
  • 5.2 Test Mode 2 (List32 Mode) (50)
  • 5.3 Test Mode 3 (Mast16 Mode) (51)
  • 5.4 Test Mode 4 (Mask32 Mode) (52)
  • 5.5 Test Mode 5 (List16 2-Bank Mode) (53)
  • 5.6 Setting up receiving all messages (54)
  • 6 Waveform Analysis (56)
  • 7 STM32H743 CAN Implementation (59)
  • 7.1 Creating a Project (59)
  • 7.2 Configuration (61)
  • 7.2.1 RCC, DEBUG (61)
  • 7.2.2 UART Settings (63)
  • 7.2.3 CAN Configuration (64)
  • 7.2.4 Clock Configuration (67)
  • 7.2.5 Setting CAN Baud Rate (68)
  • 7.2.6 Code Generation (69)
  • 7.3 Code Implementation (70)
  • 7.3.1 main.h (70)
  • 7.3.2 main.c (70)
  • 7.3.3 fdcan.c (72)
  • 7.3.4 fdcan.h (81)
  • 7.3.5 usart.c (81)
  • 7.3.6 usart.h (83)
  • 8 Check Results (84)
  • 8.1 Test Mode 1 (84)
  • 8.2 Test Mode 2 (85)
  • 8.3 Test Mode 3 (86)
  • 8.4 Test Mode 4 (87)
  • 9 References (88)
  • 10 Revision History (89)

Q&A 💬

Q. Is there anything I need to prepare to attend the lecture?

This lecture is conducted on the NUCLEO-F446RE practice board. CAN communication is confirmed and two boards are used. If the board is not prepared, please check the contents first and purchase the board later and check it on the board.

Q. What program tools do you use?

We use STMCubeIDE v1.9.0, provided free of charge by ST. Please install it in advance before taking the course.

🎙️ Introducing the knowledge sharer who created the lecture

I have been working as a developer for over 20 years in large and small companies and currently run a small business. I have developed an ISP (Image Signal Processing) ASIC for CCTV and many products using FPGA such as OLED inspection equipment and DAQ (Data Acquisition System). In addition to FPGA, I have a lot of experience in FW development (STM32, PIC32, AVR, ATMEGA, etc.), circuit design, Windows Program, etc. I hope that my extensive experience will be helpful to your learning.

Great lectures to watch together 📖

Recommended for
these people!

Who is this course right for?

  • Anyone interested in STM32 MCU

  • For those who want to implement CAN communication

Need to know before starting?

  • C language

Hello
This is ihil

Students

1,443

Reviews

50

Rating

4.8

Courses

17

저는 지난 20여년 동안 대기업, 중소기업에서 개발자로 일해왔고

현재는 작은 기업의 대표로 있습니다.

주요 경력사항은

  • Verilog HDL을 이용한 FPGA 설계

    • CCTV용 ISP ASIC 개발 (약 10년)

    • OLED Display 검사장비 개발 (약 3년)

    • FPGA를 이용한 장비 개발

  • MCU FW

    • STM32

    • PIC32

    • AVR, ATMEGA

    • DSP (TI)

  • Windows Application Program

    • Visual Studio MFC, C++

입니다.

Curriculum

All

89 lectures

Lecture resources

are provided.

Published: 
Last updated: 

Reviews

Not enough reviews.
Become the author of a review that helps everyone!