Hi @RaRo,
The board is powered via USB, with an on-board buck converter generating the 3.3V supply for the MCU (VDD on the screenshots).
I’ve tried multiple versions of the code, with and without using external crystal, doing nothing but turning on an LED, disabling EzPORT and NMI, all with the same results. I feel quite certain that this bug is not code related.
I will include oscilloscope screenshots now that illustrate the bug. There are 5 screenshots of the whole cycle with various power cycle delays, and also three that are zoomed into the rising edge of VDD and RESET while powering up in 3 cases of the delay value. XTAL is used as a visual indicator of the MCU running, but as I’ve said, with or without using it, the results are the same.
If it helps, I’ve found that adding a dummy load to the VDD line makes reproducing the bug a lot harder, the delay in which it happens shortens. That makes me think that the delay time is not what is relevant here but the voltage levels on some of the pins (example: the MCU doesn't run every time the VDD start rising from ~450mV level, lower than that and it's fine, higher than that and it's fine)? If you think I can capture something else that would be useful to you let me know.
Thanks,
Emir.