Search code examples
stm32stm32f0

How to implement CAN Bus on STM32F042k6 without Std Lib and CubeMX


I am trying since a couple of days to implement a CAN Bus communication for my above mentioned board without success. I wish to do this using the Registers only. Can someone give some hints on how I should proceed? or a link?. Thanks in advance.


Solution

  • Why don't you use the Std Lib as a starting point?

    The library includes all functions and registers you need. You must simply go through one of the examples and "copy" the direct register accesses to your project.

    (And perhaps you also want to use some of their defines for the bit definitions)