I'm currently learning about the clock of the LPC824 board, and I wanted to change the clock source from IRC to SysOsc. My question is: what happens if while changing the clock configuration something goes wrong? Is it possible to shut down all the clocks and still be able to reflash the MCU?
If you do something daft like changing the clock from one that is running to one that isn't then it all stops, and you have to use the "ISP RESET" procedure to get it all started again. (That is pulse the RESET pin low, whilst the ISP RESET pin is being held low). I know - I've done it.
It always starts up in the IRC mode. To change to the crystal, make sure you enable it in PDRUNCFG and give it 1ms to get started before you change to it. After that you can power down the IRC.
Similarly, if you change to the PLL, make sure that the PLL has locked before you change clocks.
Hi Federico Guerra ,
Before answer your question, I'd like to know the what the clock you want to reconfigure and you can point out it in the following figure.
Fig 1
I wanted to change MAINCLKSEL from pllout to IRC, and in the future to change pllin from IRC to SysOsc.
At this point I managed to change MAINCLK succesfully.
I was afraid of messing up some registers and ending with a bricked board.
Hi Federico Guerra,
Thanks for your reply.
Please giving it a try, the LPC824 can support to change the clock setup during working