Hi! I'm not sure if this is the right question to ask, but I currently implement a hard fault function to do a (WIP) crash trace dump, but after the dump I'd like to re-enable USB interrupts so I can re-flash the Teensy during my unending while loop.
Another interesting, but less important question if anyone knows: my handler isn't called for every exception. Sometimes the Teensy crashes (as indicated by teensyduino no longer being able to upload/re-flash) and the handler isn't called. I'm not sure if there's another interrupt I need to handle (the documentation is a little hard to decipher) or if my handler is crashing (less likely; it succeeds on some crashes).
I'm currently overriding the HardFault_HandlerC function (when TeensyDebug isn't compiled in, anyway) and have my screen show an appropriate blue screen with useful-ish info (I'd like to eventually try and generate a trace/dump file to the SD card, would be neat!)
Thanks!
Another interesting, but less important question if anyone knows: my handler isn't called for every exception. Sometimes the Teensy crashes (as indicated by teensyduino no longer being able to upload/re-flash) and the handler isn't called. I'm not sure if there's another interrupt I need to handle (the documentation is a little hard to decipher) or if my handler is crashing (less likely; it succeeds on some crashes).
I'm currently overriding the HardFault_HandlerC function (when TeensyDebug isn't compiled in, anyway) and have my screen show an appropriate blue screen with useful-ish info (I'd like to eventually try and generate a trace/dump file to the SD card, would be neat!)
Thanks!