LPC1227 issue with GPIO0_19-24 in DeepSleep

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

LPC1227 issue with GPIO0_19-24 in DeepSleep

215 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hub.martin on Fri Jan 20 15:36:00 MST 2012
Hello,
when I enter the Deep Sleep mode, pins 19-24 on GPIO0 are set as logic zero (or semi-state?)no matter how I try co configure them before the sleep (output DIR, no pull-up, logical one, digital, GPIO pin mode). Every settings looks perfect but in the moment when the MCU enters the Deep Sleep mode, the outputs are at logical zero. The thing is that I have connected some LEDs to this pins with anode on Vcc and cathodes on these pins. So when the device enters DSleep the LEDs are glowing a little and consuming power.

I've spent few days trying to figure out what's wrong. Triple checked registers over debugger... Changing schematics it's not a option - I have to find error in my configuration.

Has anyone have any idea what I should check?
Thanks for every advice!
0 Kudos
3 Replies

200 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hub.martin on Mon Jan 23 04:22:28 MST 2012
Here's the code. It's little complicated. I left there the pin wake up and 'RTC wake up to make sure that nothing is overlooked.

Thanks for any help
0 Kudos

200 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hub.martin on Fri Jan 20 16:11:46 MST 2012
>Are the outputs at logic zero before entering Deep Sleep mode or only after?
Only after the Sleep instruction _WFI

>Can you post some code
Unfortunately the computer with the code is in the work. But There's nothing special. I try to write some lines fro my head, excuse typos.
I run the clock to the IOCON, GPIO0.
Then disable the pullups
LPC_IOCON->PIO19 &= ~0x1F;
Set the direction
LPC_GPIO0->DIR |= _BIT(19);
Set the log 1
LPC_GPIO0->SET = _BIT(19);

And I'm using the deep sleep mode with watchdog clock from the app note because of Errata and the need of periodicaly wake up the MCU.

I was trying all the combination in the IOCON register for the pin. Pull ups, digital /analog pin mode, Timer Compare/Capture mode, Open drain... The pin behaved as expected with the combinations of settings above until the MCU hit the sleep mode :(

I'm a newbie on the LPC platform so I was thinking that I ovelooked something. I'll post an exactly code in the monday. Thanks
0 Kudos

200 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Fri Jan 20 15:59:47 MST 2012
Are the outputs at logic zero before entering Deep Sleep mode or only after? Can you post some code that shows how you are initializing the pins?

Thank you.
0 Kudos