Hello everyone,
I'm having some trouble with FCCU and FS26's Microcontroller Recovery Strategy when i want to perform a functional reset on the microcontroller.
So, in FS26's documentation it explains how when a fault occurs and it is transmitted through the EOUT Pins to FS26, the SBC can enter a "microcontroller recovery strategy" in which the objective is to try and recover the fault inside a time window (WDW_RECOVERY) and not give the microcontroller a reset, i.e., the FS26 send a reset command to the microcontroller.
That being so, i configured my time window with 1024ms and, when i inject a fault and the EOUT Pins indicate a faulty condition to FS26, it will open that window and there i will try to perform a functional reset (SW_FUNC_RST or FCCU_RST) so my program restarts and clears the fault in FCCU's initialization, "eMcem_Init()" API Function, and then refreshes the watchdog after FS26's initialization process. With this, the system would go back to a Normal State and no resets were needed to happen.
The problem is that the program only restarts, i.e., the microcontroller is given a functional reset, when the fault-reaction type enabled is "Activate EOUT Pins". When i enable any of the other reaction-types (Recovery Timeout, Alarm State Interrupt or Fault State NMI), the RESET_B Pin gets asserted, but the program doesn't restart.
In the annexes of this post i'm leaving one of the tests i made showing this behavior. It may be confusing, but i'm going to try to make a resume of what happens during each stage:
(1) The program begins in the main function and starts initializing the MCU, Peripherals, SPI, Timers, etc
(2) The FCCU initialization begins with "eMcem_Init()" API Function (which clears all faults) and then FS26 is initialized (and the watchdog refreshing begins, look at D11 - SBC WATCHDOG NOTIFICATION Pin)
(3) A fault, with nFaultID = 72, is injected with "eMcem_InjectFault(nFaultID)". The program initially enters the ALARM State and, since it can't clear the fault (D8 - ERR_NOT_RECOVERED Pin), FCCU's state machine enters Fault State and indicates a Faulty Condition to off-chips on the EOUT Pins
(4) The WDW_RECOVERY window opens from FS26's side
(5) As a fault-reaction, a functional reset happens (FCCU_RST is active in TRACE32's window)
(6) The program doesn't restart (when it was supposed to) and, after WDW_RECOVERY window reaches its timeout value, FS26 will start its initialization phase which won't be addressed because the program didn't restart (and is stuck in the NMI Handler)
(7) Since FS26's INIT_FS isn't addressed, the Fault Error Counter maximum value will be reached, thus making the FS26 initiate a Power-On-Reset, which will eventually start the program again.
As you can see this isn't the behavior that we're expecting to happen considering the "microcontroller recovery strategy"'s definition.
I contacted an NXP Employee and they tried my project on a similar board, S32K344EVB-Q257, but it had a different behavior, and so i was told to create this post here in the community to get some help.
Is anyone with a similar issue or someone that could help me?
Best Regards,
JRodrigues