lpc1769 halts even on reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc1769 halts even on reset

1,127 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Thu May 30 18:50:08 MST 2013
Hi,

I have come across an issue where the processor gets stuck. I have a watchdog enabled and checks in firmware. On normal running the a led turns on/off every sec. It has been reported that it may get stuck and the led stays always on thus not running. Even if the user will press the reset it still doesnt recover. Only if its removed from the power it will start up.

What do you think this might be causing it? Any ideas?

Nick
0 Kudos
Reply
3 Replies

1,065 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Fri May 31 20:31:15 MST 2013
Hi,

It was the watchdog reseting when the boot entered the sdcard check. Sometimes it took longer for checks and a watchdog reset happened. After adding a WDT_Feed() everything seems to work.

Nick
0 Kudos
Reply

1,065 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nkarakotas on Fri May 31 04:21:21 MST 2013
Hi,

Here part of the code of the bootloader.It might never actually get to jump to the application. It is hard to catch but im thinking of doing alot of resets and I might catch the where it gets stuck.

int main (void)
{

uint32_t t=0;


GPIO_SetDir(1, 1<<25, 1);  /* GSM ON/OFF */
GPIO_ClearValue(1, 1<<25);
LPC_GPIO2->FIODIR |= (1UL << LED_PIN);


SysTick_Config (SystemCoreClock / 1000);

// Read back TimeOut flag to determine previous timeout reset
    if (WDT_ReadTimeOutFlag())
        WDT_ClrTimeOutFlag();
WDT_Init(WDT_CLKSRC_IRC,WDT_MODE_RESET);
WDT_Start(WDT_RESET);  // 10 secs


// User code not present or isp entry requested
enter_sdcard_boot();

// Check to see if there is a user application in the LPC1768's flash memory.
if( user_code_present() )
{
WDT_Feed();
 __disable_irq();
execute_user_code();
// There is an application, but need to check if user is pressing the button
// to indicate they want to upload a new application.
//check_isp_entry_pin();
}

// Note - should never actually return from enter_sdcard_isp ().
LPC_GPIO2->FIOSET |= (1<<LED_PIN);

t = tick;
while (1){

if(tick - t >= 3000){
t = tick;
 if (LPC_GPIO2->FIOPIN & (1<<LED_PIN))
 LPC_GPIO2->FIOCLR |= (1<<LED_PIN);
 else
LPC_GPIO2->FIOSET |= (1<<LED_PIN);
}

WDT_Feed();
__WFI();


}
return 0;
}

0 Kudos
Reply

1,065 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Fri May 31 00:43:24 MST 2013
My first thought is that something stays in RAM memory that prevents the MCU from doing a warm boot. When you unplug the power from the device (cold boot) the RAM memory will be empty. Also some registers are not reset with a warm boot.

Without having a look at your code it is just a guessing game for us. :D
0 Kudos
Reply