Giovanni wrote:Hi,
There is a single exception routine (_unhandled_exception) for all exceptions, you need to declare your own handler, see vectors.c for names.
void name(void) {
}
Alternatively you can inspect the SPR register (Status), the lower bits are the vector number.
Giovanni
i dont see what good this will do if the debugger as already lost control and cant read anything ???
I see there is already a _unhandled_exception handler with a while(1) loop, so if this was catching in there and if the debugger was working it would loop in the loop.
Once the debugger as lost control the only way to get the MCU back under control is to use ST-Link Flasher and reset / Halt under reset and then erase the flash