STM32 CAN Bus Tutorial P3, Sending Data between nodes
Dec 04, 2025
So, let's continue our endeavor to grasp and implement the STM32 CAN BUS. If you miss the previous two parts of the tutorial, please refer to the following links:
In this section, we will finally send data between two nodes. For that purpose, we will use the same code we developed in the last part, splitting it into two projects: one for the RX and another for the TX. For that, we duplicate the existing project and rename the new projects (copy and paste). Also, do not forget to change the .ioc file name. Check the screenshot below.

Within the RX project, we delete everything related to Tx, and in the TX project, we delete everything related to the RX. Finally, in both projects, we change the mode from loopback to a normal one.

Once the projects are ready, we will create a setup consisting of two Nucleo-G491 MCUs connected to CAN Transceivers (I used TJA1051T ), which are wired together via CAN_H and CAN_L lines. To find the TX and RX pins of the CAN peripheral, refer to the project's .ioc file.


Then, we flash the TX project to one board and the RX project to another. Then, we power both MCU boards and can check the RX buffer in the live expressions. If you are getting the values as in the screenshot below, congratulations! You successfully implemented the CAN Interface. This time, instead of having the Loopback Mode, you are sending data between two nodes. You can be proud of yourself. Next, we will implement CAN Filtering.
