Atmel ICE Glitching?

Last week I saw some glitches with my embedded system installed in a machine. I can’t exactly characterize what was happening yet, because it was so infrequent and it “locked” the processor in a weird mode where it was still running something, but stack traces and catching unused interrupt handlers didn’t help.

Grasping at straws, it seemed to behave better if I let the MCU run itself without the emulator (although the ICE was still connected).

In the process of checking on another item, I discovered that the powered USB hub inside the machine (which is there only for testing) was not wired up to power. Therefore power for the ICE was being provided by my computer across the room via several meters of USB cable strung overhead.

I wired up power to the USB hub, and it got me wondering, could glitches in the USB power cause the Atmel ICE to hiccup? This is my first time using an Atmel ICE and the SAME53 flavor Cortex chip, so I have no history with these particular tools.


Brief follow up. I was suspicious that the “freeze” was related to ethernet, based on circumstances and the emulator stack trace.

I have seen other weird behavior occasionally before on this project that was fixed by doing a complete project recompilation, including the LWIP library. On a whim I decided to try that, and so far, no more glitches. I’m not convinced that actually solved anything, because I can’t imagine how recompiling the library (whose code hasn’t changed) could have any effect. But then again, this is a vendor provided framework and I’m not familiar with the nitty-gritty of LWIP.