I'm currently trying to figure out why it seems like the MCU is crashing/freezing.
I can recreate the crash/freezing almost every-time by doing the same procedure, and I have been looking through the code extensively, trying to find what could be the problem, but I can't seem to find the culprit.
A timer is running on the MCU (clocked at 48 MHz) with an interrupt every 10 μs. To try to debug it further, I added some code to toggle a diode(every 100 ms) inside this interrupt, and suddenly this diode just stops blinking and the MCU is non-responsive. No USB/UART communication etc., everything seems dead.
I have measured the VDD voltage and it seems to be fine, no glitches/voltage drops.
I did not write the code, but I have narrowed it down to a part which takes care of decoding a serial signal which is coming in through a pin interrupt. But not any further.
The MCU is a AT32UC3 and I have a ATMEL-ICE debugger on it, but I do not have much experience with debugging on a live MCU.
I suspect it could be some part of the memory that is getting written and corrupted, but I'm not sure.
Any advice on how to proceed with this sort of problem?