2024-07-04 04:58 AM - last edited on 2024-07-04 05:00 AM by SofLit
Can failed to reinit after deinit.
1. Two cans was used for my projects which was generated by stm32cubemx
2. after run for a short while , I turn off both cans by HAL_CAN_DeInit
3. then I reinit both cans by MX_canx_init and found it failed in HAL_CAN_Init
4. I have tried to pull both can rx and tx pins but does not work
5. Before reinit I have checked both rx and tx pins is high
Questions:
1. Possible reason for can reinit failed.
2. Any checlist for reinit?
Thank you & BR
2024-07-04 05:08 AM
Hello,
See this thread: https://community.st.com/t5/stm32-mcus-products/can-initializing-issue/m-p/689766
2024-07-04 07:24 PM
Hi SofLit:
Thanks for your reply.
I have measured Can_rx pin is high during reinit which means recessive bits.
reinit still failed.
is there any other reason for reinit fail?
2024-07-05 12:23 AM - edited 2024-07-05 12:24 AM
As stated in the thread I gave, did you implement this requirement?:
2024-07-05 08:03 PM
Hi SofLit:
Thanks for your reply.
I have found the reason is that I deinit the same can twice which cause the reinit failure.
After modify code the can reinit successfuly.