Getting CAN error Frames due to USB OTG 48MHz HSE clock in custom bootloader
Hi, I have a Nucleo F439ZI board and I am running a custom bootloader and application on it.
My Clock config =
- In Bootloader I am using HSE external crystal (ST-link MCO 8MHz) for all peripheral clock which includes 48MHz clock for USB OTG FS in DFU mode.
- In Application I am using HSI internal 16MHz oscillator for all peripheral clock and FreeRTOS.
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,
