I am working on lpc 1768 on keil version 5, after building the code when i go to debug using simulation option and run the code(using F5) the stop watch t1 which is in left bottom corner of debug window does not run continuously.
I have to hit F5 every time and the code gets stuck at
while (!(LPC_SC->PLL0STAT & (1<<26)));/* Wait for PLOCK0
above line which is in system_LPC17xx.c
Please help me in this situation.
do i need to set clock?
So, i need to select a board that has LPC1768 controller, then it will not show any error?
You will not see "Error 65" on real hardware, if things aren't initialized correctly your code will simply not function properly.
The compiler can tell you if you have syntax errors, it can not tell you if the code is functionally correct. For that you'll need to debug and review technical documentation thoroughly.
-> So, i need to select a board that has LPC1768 controller,
No. At the moment, you should comment out those lines.
For real hardware, simple testing would not need PLL. You can run firmware from internal oscillator.
For simulator, PLL never locks. The address of PLL0STAT is 0x400FC088, bit-26 means lock or not. I believe you don't need to simulate PLL, just comment out those PLL lines.
I tried commenting the PLL portion. the code runs to main . I have just initialized UART register in main.
No changes in register takes place while debugging.