There is an issue in my code after removing external oscillator from custom board working on LPC1517.
IDE : MCUXpressoIDE
Library : REDLIB
Clock : Internal RC Clock PLLed to 72MHz
Processor : LPC1517
Issue:
After debug, the code jumps to some other line at start and not to main or SystemInit().
Even after putting a breakpoint at cr_startup code, the issue is same.
Thanks and Regards,
Athmesh Nandakumar
Solved! Go to Solution.
Hi ATHMESH NANDAKUMAR,
Please check your cr_startup__lpc15xx.c file, ResetISR(void) function, this is the startup entry point after reset:
Enter SystemInit():
You can find on my side, it calls Board_systemInit();
You also need to check your code, you are calling chip_systemInit or the Board_SystemInit?
Do you test the official lpcopen code on your side?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi ATHMESH NANDAKUMAR,
What the code you are using?
Do you use our lpc1549 lpcopen sample code on your side which just as what I recommended you?
When you use the lpcopen code, as you know, there has two lib: chip lib and board lib.
You need to change two lib MCU to LPC1517,
Then if you want to use the internal IRC instead of the external crystal, you need to modify the board_sysinit.c function void Board_SetupClocking()
void Board_SetupClocking(void)
{
//Chip_SetupXtalClocking();
Chip_SetupIrcClocking();
/* Set default system tick divder to 1 */
Chip_Clock_SetSysTickClockDiv(1);
}
Then please build the lpc_board project again.
Now, please try it again.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
This is how I initialized internal clocking.
There's an issue in Internal clock interrupt. The interrupt wont work always. I am using a delay_count++ in Handler. But sometimes this delay_count wont increment.
Debugging and putting a breakpoint in Handler does not have any effect, which means the interrupt is not working. This is my timer initialization snippet.
Thanks and Regards,
Athmesh Nandakumar
Hi ATHMESH NANDAKUMAR,
Please check your cr_startup__lpc15xx.c file, ResetISR(void) function, this is the startup entry point after reset:
Enter SystemInit():
You can find on my side, it calls Board_systemInit();
You also need to check your code, you are calling chip_systemInit or the Board_SystemInit?
Do you test the official lpcopen code on your side?
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank You
The IRC has been called in main program using Chip_SetupIrcClocking();. Can it become an issue or should it be called before the _main() code in sysinit.c file?
I used the same code for changing clock setting. But sometimes the SCT interrupt wont tick. UART is now not working perfectly.