6 years, 7 months ago.

NXP LPC11U24 not starting up from VB power when sleep() is included

I'm having difficulty getting the mbed, NXP LPC11U24, to start up using only VB power when sleep() or deepsleep() is included in the code. The board has two different power pins, VB and Vin. Vin powering the entire board, while VB only powers part of it. My project requires power conservation so it would be ideal to only power the board using VB and to allow the program to sleep whenever it is not actively in use.

The issue I'm having is that when my code includes a sleep sate, the mbed will not work when powered from VB unless it is temporarily powered by Vin. The code will have already been loaded from USB and run once through USB power and work fine. When it is only powered from VB, however, the code will not run. The mbed will not do anything. If Vin is briefly powered, for a second or two, the program will run correctly with only VB power from then on out. This issue disappears completely when sleep is removed. The board will start up and function properly from just VB when sleep is commented out.

Here is a sample of my test code bellow. As is, the code requires Vin to briefly power the board before it can run with just VB. If "sleep();" is comment out, the issue disappears. This makes me believe there is something in sleep() and deepsleep() that is causing the issue, however, I cannot find it. Can anyone come up with a fix that allows for sleep to be included and not run into this issue?

#include "mbed.h"

// The code is designed to turn LED1 on for a second when a button is pushed that is connected to pin 5.  The code is meant to sleep while the button is not pressed
// and awake and blink once when the button is pressed before falling back to sleep.

void check_bounce();    // Simple function to test if the button is actually pressed or if it is simply a bounce.
void blink();   // Function that turns LED1 on for a second before turning it off.
bool enable;    // Value to prevent an inturrupt from activating blink() if blink() is already running.
InterruptIn button(p5);     // Declares the button at pin 5 as an interrupt.
DigitalIn button_poll(p5);  // Declares the button avaliable for polling as well.
DigitalOut myled(LED1);     // Declaration for LED1;

int main()
{
    button.rise(&check_bounce);
    while(1)
    {
        enable = 1;
        sleep();
    }
}

void check_bounce() // Ensure the button is not bouncing by waiting to see if 10 ms later the button is still pressed.
{
    wait_ms(10);
    if(enable && button_poll.read())
    {
        enable = 0;
        blink();
    }
}


void blink()
{
    myled = 1;
    wait(1);
    myled = 0;
    wait(1);
}
Comment on this question

4 Answers

5 years, 11 months ago.

I hit some problems when I tried to get the LPC11U24 to enter deepsleep() mode. You might find my notes in this forum post to be helpful.

6 years, 5 months ago.

Hi Robert

I think something wrong with the mbed-interface chip.

Now I'm in same trouble with you(can't wake up from DeepSleep) when after I call "semihost_powerdown()". (When only VB(3.3V) pin used, mbed interface is power-off state)

I'm just investigating...

Ryu

5 years, 11 months ago.

I'm having this issue as well, we're hoping to use the LPC11U24 in a very limited power environment, and need it to wake up every 5 minutes to take a sensor reading.

Has anyone figured out what the issue is?

6 years, 7 months ago.

Hi, Robert, the only pin i know for powering the mbed is VIN, because VB is for the realtime clock (according to the info in the mbed hardware):

  • Vb - Battery backup input for Real Time Clock

Maybe because that is not working as it should

Greetings

The spec you're stating here applies to the mbed-M3 (LPC1768).

posted by Anna Liao 13 Nov 2013

Hi Anna the spec applies to both LPC1768 and LPC11U24. If you check the pinout for LPC11U24 here: http://mbed.org/platforms/mbed-LPC11U24/

You will see that VB has a voltage in the range 2.4v to 3.3v (the voltage of a cr232 battery) for Battery backup input for Real Time Clock

Greetings

posted by Ney Palma 14 Nov 2013

No Anna is correct, The 11u24 has no RTC, Vb there allows you to directly power the 11u24 without the interface chip and power hungry LDOs.

I think the problem could be related to that the sleep command also tells the interface chip to sleep, while that isn't powered when running on Vb. But I haven't used it myself so I don't know how it is supposed to be solved.

posted by Erik Olieman 14 Nov 2013

Well, i am sorry for the misunderstanding

Greetings

posted by Ney Palma 14 Nov 2013

Just ran into a very similar problem on a DipCortex-M0, which doesn't have an interface chip. Calls to mbed_interface_disconnect(), which is the first thing sleep() and deepsleep() do, will just lock up.

posted by Neil Thiessen 14 Nov 2013