Page 2 of 2
Re: Sleeping and waking up from interrupts
Posted: Tue Sep 20, 2011 4:41 pm
by DrunkenDonkey
I'll be waking up on 57600, the cpu have all the time in the world to properly wake up, even take a coffee before going to work

The board itself have pins dedicated to measuring mcu consumption, but... I not only just started embedded developing, but I know 0 about hardware too, tragic. I'm waiting for some components to arrive (naked board does little good) and when they are finally here, I'll go to have them attached to the board and take crash course in hardware or what power pins I should not touch, then I'll be able to monitor the stuff

Re: Sleeping and waking up from interrupts
Posted: Sat Oct 15, 2011 11:55 am
by DrunkenDonkey
There have been several weeks since I though sleep/wakeup is working and when I tried it again, knowing a bit more about how the stuff works, saw some discouraging results:
Waking up from stop mode works only if I'm running on HSI, with PLL disabled, once I get HSE and/or PLL in the game, I'm losing some 8 bytes, and thats on 57600. And HSI means 8mhz... for my trial in the area this is enough, I will have to face that issue sooner or later tho and face lost packets.
Sleep mode does not seem to have any effect, threads continue to run using
Code: Select all
SCB->SCR&=~(SCB_SCR_SLEEPDEEP_Msk|SCB_SCR_SLEEPONEXIT_Msk);
__WFI();
But power consumption in sleep is way too high anyway, way more interested in stop/standby.
Re: Sleeping and waking up from interrupts
Posted: Sun Oct 16, 2011 12:06 pm
by Giovanni
The external oscillator and PLLs have a startup time to consider.
Did you enable the port option CORTEX_ENABLE_WFI_IDLE? this option reduces the power consumption during the execution of the idle thread (but it will create problems with your JTAG probably).
Giovanni
Re: Sleeping and waking up from interrupts
Posted: Sun Oct 16, 2011 2:08 pm
by DrunkenDonkey
That's good idea, thanks

Re: Sleeping and waking up from interrupts
Posted: Sun Oct 16, 2011 7:10 pm
by barthess
DrunkenDonkey,
Interesting article about low power conception with nice photo. It written in Russian, but you understand it.
http://we.easyelectronics.ru/STM8/low-p ... eniya.html
Re: Sleeping and waking up from interrupts
Posted: Sun Oct 16, 2011 9:13 pm
by DrunkenDonkey
Mad stuff, thanks! I don't see anything specific to STM8L, that should make it not work on STM32, I need to get some multimeter and actually try it
