On the problem of machine exceptions causing the system to restart continuously

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

On the problem of machine exceptions causing the system to restart continuously

ソリューションへジャンプ
1,329件の閲覧回数
maxxu
Contributor IV

hi

      Hello everyone, my s12zvml31 driver will occasionally stop working after repeatedly switching on and off, and it will be invalid to power on again. Then, it will resume normal operation after re writing the program.
    My analysis is because the program saves data to EEPROM when power down, and there is watchdog restart command in machine exceptions interrupt. I suspect that an error occurred while writing EEPROM during power down, which caused the machine exceptions interrupt to be triggered and the system was restarted
    I'd like to ask experts a few questions
1. Why can't the error flag reset after a restart, resulting in repeated restarts?
2. Is that register not cleared by reset interrupt?
3. Can there be any way to eliminate this problem? I can tolerate EEPROM data saving errors, but I can't accept repeated chip reboots?

0 件の賞賛
返信
1 解決策
1,306件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

 

It is possible that the ECC error occurs in the situation described above. However, the machine exception interrupt occurs after the read corrupted data. Do you read EEPROM after the reset, for example, during initialization?

Possible workaround depends on your application requirements, for example:

Check where the source of the machine exception occurs in the MMCEC register before MCU reset by the watchdog in machine exception interrupt.

After that, you can erase memory where the corrupted data are located. Or you can store variable in the RAM which indicates that ECC error occurs in EEPROM. So, you can skip reading corrupted data in a certain memory after reset.

Or you can use the approach described below: https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12Z-machine-exception-caused-by-ECC-issue-...

 

I hope it helps.

Best regards,

Diana

元の投稿で解決策を見る

1 返信
1,307件の閲覧回数
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

 

It is possible that the ECC error occurs in the situation described above. However, the machine exception interrupt occurs after the read corrupted data. Do you read EEPROM after the reset, for example, during initialization?

Possible workaround depends on your application requirements, for example:

Check where the source of the machine exception occurs in the MMCEC register before MCU reset by the watchdog in machine exception interrupt.

After that, you can erase memory where the corrupted data are located. Or you can store variable in the RAM which indicates that ECC error occurs in EEPROM. So, you can skip reading corrupted data in a certain memory after reset.

Or you can use the approach described below: https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12Z-machine-exception-caused-by-ECC-issue-...

 

I hope it helps.

Best regards,

Diana