Sleeping and waking up from interrupts

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
DrunkenDonkey
Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: Sleeping and waking up from interrupts

Post 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 :D

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 :D
DrunkenDonkey
Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: Sleeping and waking up from interrupts

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Sleeping and waking up from interrupts

Post 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
DrunkenDonkey
Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: Sleeping and waking up from interrupts

Post by DrunkenDonkey »

That's good idea, thanks ;)
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Been thanked: 7 times

Re: Sleeping and waking up from interrupts

Post 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
DrunkenDonkey
Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: Sleeping and waking up from interrupts

Post 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 :D
Post Reply