I am currently working on a home project. I want to put my LPC1769 in deep power down mode. this is the code I have so far:

SCR |= (1 << SLEEPDEEP); 
PCON |= (1 << PM1);

It doesn't work, I don't know why. I read something about __WFI() and __WFE(), I tried to implement this, but the following error appeared:

__WFI was not declared in this scope

Can someone help to to put my LPC1769 in deep power down mode?


Yes - after configuring the power/sleep mode you have to issue a WFE or WFI instruction to make the MCU enter the desired sleep mode.

You are not including CMSIS headers (eg. cmsis_gcc.h or another, it probably has to be included via another file like core_cm3.h).

You can also simply use:

  • \$\begingroup\$ Thank you for your response, I added asm("wfi") and it worked! \$\endgroup\$ – Arjon Arts Nov 6 '18 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.