AnsweredAssumed Answered

Error Handler: Write to external EEPROM

Question asked by Werner Dähn on Jun 1, 2018

When an error occurs, e.g. byte alignment, this might not be reproducible on the bench. It happens in the wild, when no debugging is possible.

 

Therefore the idea, all these errors have a common error handler which does write the important information into the external EEPROM. Then I can read out that sector and get at least a hint. 

 

But I did not manage it. My understanding is that SPI is working, even after more severe errors. And that MCU Clock Setup is irrelevant. Also, it is hard to test since I don't know how to provoke such hard error easily.

 

Does anybody have some sample code? 

 

See void _Error_Handler(const char * file, int line) in

CC3D-CableCam-Controller/main.c at master · wernerdaehn/CC3D-CableCam-Controller · GitHub  

Outcomes