Wake-up from Deep Power-Down mode causes a reset in LPC1768

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Wake-up from Deep Power-Down mode causes a reset in LPC1768

ソリューションへジャンプ
26,438件の閲覧回数
mostafanfs
Contributor III

I need to minimize the current consumption in my board which uses a LPC1768. Now I don't have any problem with going into Deep Sleep or Power-Down modes and waking up from those modes. I have configured the RTC to generate an interrupt after some predefined time which does wake up the MCU correctly and works just fine. 

My problem occurs when I want to go into Deep Power-Down mode which is precisely what I need (its consumes much less power). But after generating the RTC Interrupt the MCU goes into a reset state and starts the execution from the beginning as if someone pushes the reset button !

Now why is that? I read from the documents (like this one: AN10915: Using the LPC1700 power modes | www.LPCware.com ) that these three routines are pretty much the same. 

I really need to do this. 

ラベル(1)
タグ(1)
1 解決策
21,540件の閲覧回数
carstengroen
Senior Contributor II

If you read on page 6 in the link you gave:

2.2.4
Deep power-down mode
In Deep Power-down mode, power is shut off to the entire chip with the exception of the Real-Time Clock, the RESET pin, the WIC, and the RTC backup registers. To optimize power conservation, the user has the additional option of turning off or retaining power to the 32 kHz oscillator. It is also possible to use external circuitry to turn off power to the on-chip regulator via the VDD(REG)(3V3) pins after entering Deep power-down mode. Power to the on-chip regulator must be restored before device operation can be restarted.
Wake-up from Deep power-down mode will occur when an external reset signal is applied, or the RTC interrupt is enabled and an RTC interrupt is generated.

元の投稿で解決策を見る

8 返答(返信)
21,541件の閲覧回数
carstengroen
Senior Contributor II

If you read on page 6 in the link you gave:

2.2.4
Deep power-down mode
In Deep Power-down mode, power is shut off to the entire chip with the exception of the Real-Time Clock, the RESET pin, the WIC, and the RTC backup registers. To optimize power conservation, the user has the additional option of turning off or retaining power to the 32 kHz oscillator. It is also possible to use external circuitry to turn off power to the on-chip regulator via the VDD(REG)(3V3) pins after entering Deep power-down mode. Power to the on-chip regulator must be restored before device operation can be restarted.
Wake-up from Deep power-down mode will occur when an external reset signal is applied, or the RTC interrupt is enabled and an RTC interrupt is generated.

21,540件の閲覧回数
mostafanfs
Contributor III

Ok thanks. Yeah I realized that. But maybe it was better to mention in the documents that by going into Deep Power-Down mode after an interrupt (Reset or RTC) an actual Reset is going to happen and you loose all SRAM contents! It would have been more clear! 

So I really can not retain anything in SRAM, can I ?

0 件の賞賛
返信
21,540件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Mosi Yaghi,

    Yes, after enter in the Deep power down mode, the SRAM contents will lost.

   So, before you enter in the deep power down mode, please store your important data to the GPREG[0-4] register, these registers can be used to store important information when the main power supply is off. The value in these registers is not affected by chip reset.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

21,540件の閲覧回数
mostafanfs
Contributor III

Wow I didn't know that! 

So the contents of GPREGx registers are maintained even after powering off both VDD and VDD(REG) 3.3V supplies?

0 件の賞賛
返信
21,540件の閲覧回数
carstengroen
Senior Contributor II

Yes,

BUT! you need to have VBAT (for the RTC) connected for these 5 registers (20 bytes) to keep their information (they are volatile registers in the RTC domain of the chip). From section 27.2 in the 17xx Users manual (RTC features):

27.2 Features
• Measures the passage of time to maintain a calendar and clock. Provides seconds,
minutes, hours, day of month, month, year, day of week, and day of year.
• Ultra-low power design to support battery powered systems. Less than 1 microamp
required for battery operation. Uses power from the CPU power supply when it is
present.
• 20 bytes of Battery-backed storage and RTC operation when power is removed from
the CPU.
• Dedicated 32 kHz ultra low power oscillator.
Dedicated battery power supply pin.

21,540件の閲覧回数
mostafanfs
Contributor III

Thanks. But I just gave it a try and turns out that it doesn't need to be powered! Not even its dedicated battery power supply pin. 

My board does not have a coin cell and I removed all power sources even J-Link to make sure that MCU is not powering at all and it did retain the values I put in GPREGx registers!

It's actually interesting!

0 件の賞賛
返信
21,540件の閲覧回数
carstengroen
Senior Contributor II

I'm afraid you are being tricked :smileywink:
Check capacitors (discharged completely) and let the board rest for some hours without ANY thing connected. You will see the values have vanished....

21,540件の閲覧回数
mostafanfs
Contributor III

Yeah I guess you're right !

0 件の賞賛
返信