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
Sleeping and waking up from interrupts
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm
Re: Sleeping and waking up from interrupts
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
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
-
DrunkenDonkey
- Posts: 124
- Joined: Sun Aug 28, 2011 5:16 pm
Re: Sleeping and waking up from interrupts
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
But power consumption in sleep is way too high anyway, way more interested in stop/standby.
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.
- 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
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
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
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
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
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 