2020-11-08 10:51 AM
Hi, I have a Nucleo F439ZI board and I am running a custom bootloader and application on it.
My Clock config =
When I jump from bootloader to application everything works good until I use the CAN bus. As I send the CAN frames from PC to Nucleo board using Kvaser and DCA2617A board, I see Error Frames randomly. If I increase the frequency of messages then the bus gets loaded with error frames only.
When I do the same CAN test without any changes in hardware and just one change in software -- change the custom bootloader clock to HSI internal -- then everything works perfectly fine and I don't see any Error Frames.
Can someone suggest what should I de-init in bootloader code before jumping to application.
Thanks,
Solved! Go to Solution.
2020-11-08 04:15 PM
Thanks @TDK for responding to my question, I was able to resolve the issue. I found that when the PLL was being used to generate the peripheral clocks, I was getting the CAN error frames. I was not disabling the HSE in bootloader before jumping to application. I came across a similar post and observed that I need to DeInit the RCC unit and reconfigure it to default HSI source of 16MHz.
So I added the following line before jumping to application and everything worked afterwards.
HAL_RCC_DeInit();
2020-11-08 03:53 PM
If you have an HSE clock source available, why not also use that for the application?
You can disable the HSE clock within the application to see if that helps. You'll need to do this after the clock source has switched off of it.
2020-11-08 04:15 PM
Thanks @TDK for responding to my question, I was able to resolve the issue. I found that when the PLL was being used to generate the peripheral clocks, I was getting the CAN error frames. I was not disabling the HSE in bootloader before jumping to application. I came across a similar post and observed that I need to DeInit the RCC unit and reconfigure it to default HSI source of 16MHz.
So I added the following line before jumping to application and everything worked afterwards.
HAL_RCC_DeInit();