© Warren Gay 2018
Warren GayBeginning STM32https://doi.org/10.1007/978-1-4842-3624-6_19

19. CAN Bus Software

Warren Gay1 
(1)
St. Catharines, Ontario, Canada
 

The CAN bus demonstration in the previous chapter illustrated three STM32 MCUs sharing messages on a common bus. None were masters and none were slaves. All of this was orchestrated with the help of the STM32 CAN bus peripheral and the libopencm3 device driver.

This chapter will discuss the use of the libopencm3 driver API so that you can build CAN bus applications of your own. When combined with the use of FreeRTOS, you will have a convenient environment from which to program more-complex creations.

Initialization

The project source modules are located in the following directory:

$ cd ~/stm32f103c8t6/rtos/can ...

Get Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.