cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN fail to run with OTA firmware

GOVINDA_GIRI
Associate

Hi there!

 I am writing to bring to your attention an issue we have encountered during the testing phase of the firmware for the STM32G474VET6-based microcontroller.
 
The core of the problem revolves around the functionality of the FDCAN interface when the OTA (Over-The-Air) firmware is present at the designated address in the microcontroller's memory. The STM32G474VET6 microcontroller is equipped with two firmware images: one dedicated to OTA updates and another for the primary application code. The OTA firmware resides at memory address 0x08000000, while the application firmware is situated at memory address 0x08009000.
 
Upon thorough testing, we have identified three specific scenarios, each with distinct outcomes:
 
Case 1: When only the application firmware is present, starting from address 0x08000000, all system functionalities, including the FDCAN interface, perform optimally without any issues.
 
Case 2: In the scenario where both the OTA firmware is loaded at address 0x08000000 and the application firmware is placed at address 0x08009000, we observe a functional FDCAN interface when running the firmware from the Integrated Development Environment (IDE) while a debugger is connected.
 
Case 3: However, in the absence of a connected debugger, as in Case 2, during device power-up, the system transitions from the OTA firmware to the application firmware as expected. Nevertheless, a significant anomaly arises, rendering the FDCAN interface incapable of sending or receiving data, despite other functionalities of the application code operating normally.
 
Attached the relevant initialization and FDCAN configuration settings for review and analysis.

Kindly help me to find  the reason for the same?

Regards
Govinda

 
1 REPLY 1
Kraal
Senior III

Hello,
Out of curiosity, since it is working with the debugger, have you checked the 5V level on the FDCAN transceiver at the moment you try to send or receive data ? I know that some transceivers have an undervoltage lockout (UVLO) level at around 4.5V, maybe more. Since the microcontroller will start operating at 2.7V (maybe less), it may be the issue.

So use an oscilloscope and probe the 5V as well as CAN_Tx and CAN_Rx.
Or check the bus off flag in the FDCAN peripheral.
Or add a sufficiently long delay at startup before configuring the FDCAN peripheral.

Best regards,
Kraal