LPC1224 allwayes goes in reset after power off on cycle.

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

LPC1224 allwayes goes in reset after power off on cycle.

826 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by patel24gic on Sun Dec 01 00:21:30 MST 2013
Hi,

LPC1224 after programming it is not going to execute code because it is always goes in reset.
can any body tell me why this is happen.

during programming through ISP using Flash Magic i have observed that press ISP pin low and start downloading the firmware without reset the controller program successfully downloaded but it is not executed due to reset.

Plz help how to solve this problem.

I have used 10K pullup register on reset pin and 100nf capacitor.
Labels (1)
0 Kudos
8 Replies

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Dec 04 04:50:37 MST 2013

Quote: patel24gic
Actually I have Three board in whcih in one board code is ruuning but in another 2 board same code are not excuting.




So they are stable in ISP mode?

If so did you try to find hardware differences?

Did you scope Reset & ISP of working and non working boards?
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by patel24gic on Wed Dec 04 01:27:48 MST 2013
we have used pullup of 10k & 100nf capacitor
thanks
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by patel24gic on Wed Dec 04 01:27:06 MST 2013
In systemInit() function in system_LPC122x.c

void SystemInit (void) {
  volatile uint32_t i;

#if (WD_SETUP)                                    /* Watchdog Setup           */
  uint32_t  clkctrl;

  clkctrl = LPC_SYSCON->SYSAHBCLKCTRL;            /* Read AHBCLKCTRL          */
  LPC_SYSCON->SYSAHBCLKCTRL = clkctrl | (1 << 15);/* enable  WDT clock        */

  LPC_WDT->MOD  =0x00;//&= ~(WDMOD_Val);      //disabled watchdof            /* set Watchdog enable bit  */
  LPC_WDT->FEED  = 0xAA;                          /* Feeding sequence         */
  LPC_WDT->FEED  = 0x55;

Actually same code is working in one board but not working in another 2 boards.

Thanks
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by patel24gic on Wed Dec 04 01:27:02 MST 2013
In systemInit() function in system_LPC122x.c

void SystemInit (void) {
  volatile uint32_t i;

#if (WD_SETUP)                                    /* Watchdog Setup           */
  uint32_t  clkctrl;

  clkctrl = LPC_SYSCON->SYSAHBCLKCTRL;            /* Read AHBCLKCTRL          */
  LPC_SYSCON->SYSAHBCLKCTRL = clkctrl | (1 << 15);/* enable  WDT clock        */

  LPC_WDT->MOD  =0x00;//&= ~(WDMOD_Val);      //disabled watchdof            /* set Watchdog enable bit  */
  LPC_WDT->FEED  = 0xAA;                          /* Feeding sequence         */
  LPC_WDT->FEED  = 0x55;

Actually same code is working in one board but not working in another 2 boards.

Thanks
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Dec 04 00:49:49 MST 2013
Are you *sure* you have disabled the Watchdog? Send your code, and where you have added it. It *must* be very very early in your startup code, otherwise it may reset before you have disabled it.
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Dec 03 21:11:12 MST 2013
What about ISP pullup?
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by patel24gic on Tue Dec 03 21:05:25 MST 2013
Thanks for reply.

I have disabled the watchdog but problem is not solved.

Actually I have Three board in whcih in one board code is ruuning but in another 2 board same code are not excuting.
0 Kudos

778 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Dec 01 02:51:18 MST 2013
The LPC1224 has a watchdog timer that is enabled by default. If you do not switch it off, or provide the feed sequence to the watchdog timer, it will cause a reset.

If you don't want the watchdog, you need to write code to disable it - as one of the very first things you do in your startup code.
0 Kudos