Forums

LPC1768 doesn't wake up from Power Down Mode and cannot be reprogram after

Started by alexander_ribero November 27, 2009
Hi:

Configuration:
LPC1768 MCU in the MCB1760 Evaluation Board from Keil
Compiler: Keil uVision 3.70
JTAG Debugger: ULINK2 using the Cortex Debug port (ARM 10-pin)

Problem:
After just programming the MCU with the SWD and start running, the LPC1768 appears to enter Power Down Mode when requested, but never wakes up. However, if the processor is fully power down (disconnecting the power supply), then the application runs correctly, entering Power Down Mode and leaving when there is an interrupt. Just disconnecting the SWD Debug cable and pressing reset button is not enough. It has to be completely power down.

I have the RTC enable and interrupting every second, and the External Interrupt EINT0 enabled and interrupting when the push button in pressed.

I have verified that the interrupts are being executed when not in power down mode (simply by not entering that mode). When enabling the power down mode, the interrupts don't seem to wake up the processor, but just after the programming. After reset, it works correctly.

Also noticed that once the processor enters power down mode, it cannot be recognized by the SWD any longer. I have to use Flash Magic and the ISP mode to restore SWD access and programming the processor again, or wait until has left the power down mode.

Questions:

1. Is there any register/setting that is not properly reset by the Reset signal or JTAG, but is required to enable the detection of interrupts after programming?

2. Is is normal that the debugger cannot connect to the processor when it is in power down mode?

3. Is this the expected operation of the processor after the SWD programming?

Regards,

Alex

An Engineer's Guide to the LPC2100 Series

Hi Alexander,

>From LPC17xx User Manual, Chapter 33:

"5. Debug Notes
Important: The user should be aware of certain limitations during
debugging. The most
important is that, due to limitations of the Cortex-M3 integration,
the LPC17xx cannot
wake up in the usual manner from Deep Sleep and Power-down modes. It is
recommended not to use these modes during debug."

http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc17xx.pdf

On Fri, Nov 27, 2009 at 18:17, alexander_ribero wrote:
> Hi:
>
> Configuration:
> LPC1768 MCU in the MCB1760 Evaluation Board from Keil
> Compiler: Keil uVision 3.70
> JTAG Debugger: ULINK2 using the Cortex Debug port (ARM 10-pin)
>
> Problem:
> After just programming the MCU with the SWD and start running, the LPC1768 appears to enter Power Down Mode when requested, but never wakes up. However, if the processor is fully power down (disconnecting the power supply), then the application runs correctly, entering Power Down Mode and leaving when there is an interrupt. Just disconnecting the SWD Debug cable and pressing reset button is not enough. It has to be completely power down.
>
> I have the RTC enable and interrupting every second, and the External Interrupt EINT0 enabled and interrupting when the push button in pressed.
>
> I have verified that the interrupts are being executed when not in power down mode (simply by not entering that mode). When enabling the power down mode, the interrupts don't seem to wake up the processor, but just after the programming. After reset, it works correctly.
>
> Also noticed that once the processor enters power down mode, it cannot be recognized by the SWD any longer. I have to use Flash Magic and the ISP mode to restore SWD access and programming the processor again, or wait until has left the power down mode.
>
> Questions:
>
> 1. Is there any register/setting that is not properly reset by the Reset signal or JTAG, but is required to enable the detection of interrupts after programming?
>
> 2. Is is normal that the debugger cannot connect to the processor when it is in power down mode?
>
> 3. Is this the expected operation of the processor after the SWD programming?
>
> Regards,
>
> Alex
>
>
Hi Igor:

Thank you for your message.

I had read the note, indeed, but it seems to indicate that the limitation is "during debugging", not after just programming. It seems that the MCU, then, still thinks that is in debug mode, even though no actual debugging is being done.

Regards,

Alex
--- In l..., Igor Skochinsky wrote:
>
> Hi Alexander,
>
> From LPC17xx User Manual, Chapter 33:
>
> "5. Debug Notes
> Important: The user should be aware of certain limitations during
> debugging. The most
> important is that, due to limitations of the Cortex-M3 integration,
> the LPC17xx cannot
> wake up in the usual manner from Deep Sleep and Power-down modes. It is
> recommended not to use these modes during debug."
>
> http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc17xx.pdf
>
> On Fri, Nov 27, 2009 at 18:17, alexander_ribero wrote:
> > Hi:
> >
> > Configuration:
> > LPC1768 MCU in the MCB1760 Evaluation Board from Keil
> > Compiler: Keil uVision 3.70
> > JTAG Debugger: ULINK2 using the Cortex Debug port (ARM 10-pin)
> >
> > Problem:
> > After just programming the MCU with the SWD and start running, the LPC1768 appears to enter Power Down Mode when requested, but never wakes up. However, if the processor is fully power down (disconnecting the power supply), then the application runs correctly, entering Power Down Mode and leaving when there is an interrupt. Just disconnecting the SWD Debug cable and pressing reset button is not enough. It has to be completely power down.
> >
> > I have the RTC enable and interrupting every second, and the External Interrupt EINT0 enabled and interrupting when the push button in pressed.
> >
> > I have verified that the interrupts are being executed when not in power down mode (simply by not entering that mode). When enabling the power down mode, the interrupts don't seem to wake up the processor, but just after the programming. After reset, it works correctly.
> >
> > Also noticed that once the processor enters power down mode, it cannot be recognized by the SWD any longer. I have to use Flash Magic and the ISP mode to restore SWD access and programming the processor again, or wait until has left the power down mode.
> >
> > Questions:
> >
> > 1. Is there any register/setting that is not properly reset by the Reset signal or JTAG, but is required to enable the detection of interrupts after programming?
> >
> > 2. Is is normal that the debugger cannot connect to the processor when it is in power down mode?
> >
> > 3. Is this the expected operation of the processor after the SWD programming?
> >
> > Regards,
> >
> > Alex
> >
> >
> >
> >
> >
> >
> >
> >