Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 4 months ago.
LPC824 Power On Deep-Sleep with and Without DigitalOut
Team,
When I use my hardware wiih a simple digitalout (with no peripherals and practically no other code) and move to deepsleep (for 10 seconds) the current (as per our multimeter) is 3mA @12v and about 5mA@12v on regular operation (for 10 seconds again).
When I remove the digitalout ( and no other peripherals are used) the deepsleep current is 1mA@12v and on regular operation is about 2mA@12v
I have ensured that the actual digitalout pin is not connected to any circuit so I dont think "power draining" is a problem. Also putting DigitalOut with default high (1) or default low (0) does not seem to make a difference
Any help please?
Best regards Surendar
1 Answer
7 years, 4 months ago.
The constructor of DigitalOut class library calls GPIO initialization (gpio_init) for target device. In case of LPC824 platform porting, it will enable AHB clock to the GPIO domain.
https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_NXP/TARGET_LPC82X/gpio_api.c#L27
Toyomasa Appreicate your response. Wouldnt going to deep sleep remove the clock to GPIO's or do we have to stop it ourselves. OR since its set to wakeup on GPIO the clock is not set to zero?
Will this solve the problem?
Before Going to deep sleep
LPC_SYSCON->SYSAHBCLKCTRL &= 0xFFBF
After waking from deep sleep
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6);
Then, if need to stop clock for other peripherals I must remove them to before going to sleep?
Appreciate your help
Surendar
posted by 29 Nov 2016