Hi Team,
im working on SAF module particularly on scheck. i found the scheck shutdown test API. where we can run the scheck during the shutdown phase.
just a question. what if? i run the SRAM test. the test has reported the error. scheck result is stored in NvM that is used to select the operation mode in next operation cycle.
what if the error is cleared. let's say uncorrectable error has been detected by scheck and the error is reported and stored. may be after POR the error has been corrected on its own. but since the error is stored in NvM even if the error is corrected the msel is going to read from the NvM during the next cycle?
how is it expected to be handled?
Br,
Harish R
Hello @Harish_R,
Thanks for reaching out to us once again. That is a good question, in cases where the information in the NVM was lost, the SAF code does not define how the system should react. If you check the following functions, you can see that the reaction will depend on your implementation of the function to read the NVM:
in Std_ReturnType mSel_StorePreservedNvmData(), the real NVM read is done by mSel_NvmWrite():
And in the SAF demo you can see that the mSel_NvmWrite() function is left for the developer to implement:
You will need to decide the return value of mSel_NvmWrite(), either E_NOT_OK or E_OK. this will define the behavior in Std_ReturnType mSel_StorePreservedNvmData().
Let me know if you have more questions
Hi @alejandro_e
Thanks for your support!.
understood the backup concept through NvM but question was, lets say,
1. im performing sCheck_ExecuteShutdownTests (enabled SRAM0 test) during this test the SRAM reported failed status. some uncorrectable error was reported.
2. msel_mSel_ShutDown - to store the scheck shutdown results. (so here the failure of sram UE will be stored in NVM).
3. Now i do a POR(Power on reset)- lets say the the UE error has been corrected after POR.
UE is correctable during POR.
4. next Power ON cycle. the Msel_selectmode() is called and it reads the stored result from NvM its actually reading the fault stored. (but the fault is cleared during the POR).
how this situation is expected to be handled where the fault is cleared but the msel is still reading it form NvM
Regards,
Harish R
Hello @Harish_R,
Checking the both documentation and code you can see that the mode selection process has quite a complicated logic to it. Please check section 2.2 Operational Mode Selection in S32G_SAF_MSEL_UM.pdf. There you will see more details on how the module selects the operational mode depending on the type of errors present.
Best regards