Forums

Re: LPC2101 hangs randomly

Started by prab...@yahoo.co.in April 8, 2009
hi all,
I am using LPC2101.From pase three months i am working in LPC.
In this,after receiving RTC interval from serial port UART1(two wire).I am putting LPC into power down mode and wakeup using RTC interval which is receiving through uart1.
After wakeup from RTC set one GPIO for my application and wating for serial data(interval).Then put LPC to powerdown and wake up using RTC.

After long run test( LPC powerdown and wakeup using RTC in more than 500 times) LPC randomly hangs?In this state LPC consuming current same as active mode(normal mode).which means its wakes up from powerdown mode and hangs some where.I can't use JTAG in my board.

Is any one already faced this problem?
What are the conditions LPC hangs?How to get LPC back from hangs to normal mode?

I am handling default interrupt handler.But not yet implemented watchdog.

Could you please share with your knowledge in this problem?

Thanks,
I am using LPC2132 in Keil uVision environment, thumb mode.
>
>I note that sometime my program will get hang, sometime it fall into
>Dabt_Handler, and sometime fall into Pabt_Handler, and sometime hang
>inside "sprintf" function, unpredictable.
>
>When Hang is happen, what I do is comment some of the ASM_NOP()
>macro.
>
>I put 4 NOP in main, everytime compile and load to target.
>If it hang, I have to reduce to 3 NOP and retry.
>If it hang, I have to reduce to 2 NOP and retry.
>If it hang, I have to reduce to 1 NOP and retry.
>
>One of the code can make it run. Therefore every time compile, I have
>to try several time. I know the way to solve the hang is wrong. I am
>thinking that, will it because of the code alignment in thumb course
>this problem. How to solve it? Or anyone face the same problem?
>
>int main(void)
>{
> ASM_NOP();
> ASM_NOP();
> ASM_NOP();
> ASM_NOP();
>
> PLLSetup();
>
> Init_Hardware();
> Init_Scheduler();
> while(1)
> {
> TIMER_CALLBACK(50ms, callback_50ms);
> TIMER_CALLBACK(100ms, callback_100ms);
> }
>}
>
>void callback_50ms(void)
>{
> Light_Mgr(); // light manager
> APP_Mgr(); // application manager
>}
>
>void callback_100ms(void)
>{
> // other application
>}

An Engineer's Guide to the LPC2100 Series