Content originally posted in LPCWare by midas on Fri Mar 11 08:15:14 MST 2016
Thanks again for your support, Bavarian.
I have tried your suggestion of connecting with the debugger when it is running, but the debugger fails to connect, unless it includes a reset AND download of image, in which case I cannot see where it was stuck. But since the first thing the simple program does is initialize the led IO and toggle it, it is quite clear it doesn't reach that stage. Also, I don't have an interface to the UART, so I cannot easily test for the UART ISP (but even if the UART ISP works, that doesn't help me much).
Your theory about the M4 microcontroller starting too soon, at 2.3V, is indeed interesting. The QSPI flash I use (Spansion S25FL032P) is guaranteed to operate from 2.7V. To test this theory, I soldered a reset switch, downloaded the led toggling program to flash, ran it from the debugger, disconnected the debugger - set to let the program continue running, so that the led was still flashing, and then I issued a reset from the switch. The program did not recover, so the boot loader probably still failed to initialize the microcontroller to run from SPIFI. However, the 3.3V was already up and stable for both microcontroller and the flash, so this theory does not seem to pan out either.
Also, I should point out that the microcontroller doesn't run even after the one minute timeout of the boot loader.
Thanks,
Uri