Skip to main content
Werner Dähn
Associate III
June 1, 2018
Question

Error Handler: Write to external EEPROM

  • June 1, 2018
  • 0 replies
  • 486 views
Posted on June 01, 2018 at 08:01

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

https://github.com/wernerdaehn/CC3D-CableCam-Controller/blob/master/src/main.c

  
    This topic has been closed for replies.