Content originally posted in LPCWare by rama krishna deekshitulu on Mon Feb 15 06:10:43 MST 2016
Hi LabRat,
I'm new in this forum. I'm working with a LPC1225/ microcontroller. I've encountered this problem:
When I'm trying to execute the IAP application for system tick timer the code is stuck at delay function. if i'm not use delay function its working fine.that means second boot loader application is working well.. please check below code and help me please.
/*****************boot loader application********************/
/**************************************** SysTick_Handler ************************************/
void SysTick_Handler(void)
{
msTicks++;
}
void delay_ms(unsigned int k)
{
msTicks=0;
while(msTicks<k);
}
int main(void)
{SysTick_Config(SystemCoreClock / 1000); /* generates 1ms time delay*/
UARTInit(0,9600);
printf("EEPROM-32Kb\r\n");
delay_ms(10);
printf("boot loading done\r\n");
}
/********************bootloader*****************************/
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / 1000); /* generates 1ms time delay*/
__disable_irq();
UART0Init(9600);
printf("abcd");
asm volatile("ldr r0, =0X3000");
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");
/* Load program counter with application reset vector address, located at
second word of application area. */ //reset
asm volatile("ldr r0, =0X3004");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
while(1);
}