Content originally posted in LPCWare by capiman on Sat Nov 08 11:12:42 MST 2014
Ok, I am now able to reproduce the problem.
I remembered that I loaded a project before which was for a KEIL MCB1500 board.
It is the blinky delivered with MCB1500.
When I download this program (via uVison -> Flash -> Download, it is for internal FLASH) and let it run,
afterwards load my own project (which is based on the original blinky, but then only the code above in main, all other commented out),
then only red and green LEDs are blinking, blue LED stays off.
Now, when I press the reset button (SW4), blue LED stays still off.
Now, when I power-cycle, it works.
Now 3 questions come to my mind:
1) It looks like original blinky is doing something which prevents my blue LED to work. This is try to find afterwards.
It uses ADC, I saw PIO1_1 is also an analog port, perhaps original blinky configures the PIO1_1 to work as an analog port?
It also has some LCD routine inside, but can't think why it shall be a problem.
2) When downloading via KEIL uVision 5.12.0 to flash, letting it run, loading a new project (my blinky) and let it run.
Is there no reset during download? Or is there a reset, but a certain register is not reset?
3) When I press the reset switch, which I checked in schematic to be going to nReset/PIO0_21 of LPC1549 (not just to debug controller or so),
why does it not reset all registers to some default value?
PS: Already checked errata, seem to be nothing written, which could be a hint for this case...