2019-09-09 10:44 PM
Hello.
I am testing a CAN bus using stm32 discovery (STM32F407).
I use the HAL library. In the CUBE IDE program, it automatically generates the MX_CAN2_Init function. It calls another function HAL_CAN_Init. At run time, HAL_CAN_Init is reset SLEEP bit
in MCR register but not reset SLAK bit MSR register . As a result, CAN not OK.
Appears mistake. What am I doing wrong??? Thank.
P.S. main.c file
2019-09-10 12:56 AM
The topic is closed.
Decision https://community.st.com/s/question/0D50X00009XkgP6SAJ/halcaninit-is-failing