Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

HOWTO use CAN Peripheral – STM32 Tutorial #48

9.4K views on YouTube

In this video we will be using CAN loopback to send and receive CAN messages. We will be creating the necessary filters to determine which CAN messages are received.

A follow-up video covering a real CAN bus with external CAN transceivers and much more details about CAN filters is here: https://youtu.be/bmtOyr7UYNo

The STM32World wiki: https://stm32world.com/wiki
Wiki page about CAN bus: https://stm32world.com/wiki/CAN_bus
Wiki page about the STM32 CAN Peripheral: https://stm32world.com/wiki/STM32_CAN
How to connect a CAN transceiver: https://stm32world.com/wiki/CANTRANS

#STM32 #Tutorial #GettingStarted #STM32CubeIDE #STM32CubeMX #HAL #CAN #CANBus #STM32World

00:00 Intro
00:20 CAN Bus explanation
01:40 The two-wire bus
03:20 A CAN Node – MCU, CAN Controller, Can Transceiver
04:55 Multi-master protocol
06:20 Arbitration on a CAN bus
08:25 CAN IDs
11:35 The basic project
13:14 Configure the CAN peripheral in STM32CubeMX
15:05 Implementing callbacks
16:05 Starting CAN and enabling interrupts
18:18 Transmitting CAN messages
19:00 Creating the CAN IDs
22:00 Building and running
23:20 Implementing the message receive filter
24:30 Explaining ID filter and mask
25:40 Creating the actual filter
29:40 Running with the filter – we now receive the transmitted messages
30:50 Sending message not matching the filter
32:00 Modifying filter to match everything
34:00 Tweaking notification settings
36:20 Briefly mentioning CAN transceivers