title: STM32F4 Error Handler and allowed operations
body: <p>Summary: In a hard fault, where can I put out the debug information?</p>
  
  <ul>
  <li>EEPROM via SPI?</li>
  <li>UART?</li>
  <li>USB?</li>
  </ul>
  
  <p>Details: </p>
  
  <p>I have the problem that the error handler gets triggered once a while, not reproducible. I suspect it is a hard fault as with the Error_Handler() I do print out something to the USB port but do not receive anything.</p>
  
  <p>The standard way to expose the hard fault information is to printf to the debug port. But since that happens on a moving device and only once within hours, I can't have a debugger connected all time.
  I assume that within a hard fault only so much can be done, e.g. USB does not work any longer, UART does not and writing to an EEPROM via SPI does not either. Is that correct? If yes, what would you do?</p>