S32K14x factory reset returns error code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K14x factory reset returns error code

570件の閲覧回数
kane123Hu
Contributor I

When I first generated and loaded CSEC_MASTER_ECU, the return was successful. Afterwards, CSEc was restored to factory settings and successfully returned. Subsequently, I generated and loaded CSEC_MASTER_ECU again, and the result returned was also successful. But when I tried to reset CSEc to factory settings, I returned an error code. If the power is turned off and restarted again, repeat the above steps to restore the factory settings and there will be no error code returned.Attached are the return codes for normal and abnormal states

1.png2.png

The following is my code. I have debugged and analyzed the code. Before performing steps such as loading CSEC_MASTER-ECU and restoring factory settings, I will first check if EEESize is 0. If it is 0, I will then perform a flash partition operation. I compared the differences between the two processes. The first time I powered on, the EEESize size was 0. If I didn't perform a power down operation and entered the process again, the EEESize size would be 4096, which resulted in not performing a flash partition operation. I think this difference may have caused an error code to be returned when restoring the factory settings in the future. If that's the case, how do I need to modify my code correctly? Performing flash partition operations and CSEC initialization every time seems to be abnormal logic.

    Regards,Kane123Hu.

3.png

0 件の賞賛
返信
1 返信

534件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @kane123Hu 

This is kind of unexpected use-case. User is normally not supposed to reset the device back to factory state again and again as you described. Resetting back to factory state can be used for development purposes only, it should not be part of production code. The reference manual also says that reset is needed after partition command:

 

Regards,

Lukas

0 件の賞賛
返信