2019-06-26 03:17 AM
I have tried to get the CAN peripheral up and running on STM32F407 discovery board.
But I am stuck at one point.
Inside method HAL_CAN_Init(CAN_HandleTypeDef *hcan), I end up in the HAL_CAN_STATE_ERROR.
Is there any example available to test on the discovery board and to cross verify mistake made in my code..
I have used STMCubeMX to generate the skeleton code and have written the CAN initialization in the user code block.
Solved! Go to Solution.
2019-06-26 04:09 AM
Yes. Found the solution. Before the CAN terminals are floating. When connected to CAN transceiver (now terminated), it started working as expected.
Thanks for the reply.
2019-06-26 03:51 AM
What is connected to the CAN pins. CAN startup expects to see the behaviour of a terminated CAN line.
2019-06-26 04:09 AM
Yes. Found the solution. Before the CAN terminals are floating. When connected to CAN transceiver (now terminated), it started working as expected.
Thanks for the reply.