Tickless and CORTEX_ENABLE_WFI_IDLE

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Tickless and CORTEX_ENABLE_WFI_IDLE

Post by dflogeras »

Hi, on a previous (Chibi-2.x) project I was able to decrease current significantly by enabling the WFI_IDLE option. Now that I am using dynamic ticks in Chibi-3.x, is there any point to WFI_IDLE? I empirically tried this and didn't see much difference in current consumption, but I am not sure that could not be for some other reason I am not aware of.

Thanks,
Dave
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Tickless and CORTEX_ENABLE_WFI_IDLE

Post by Giovanni »

Hi,

It should still make a difference, I am surprised that you don't see differences, are you sure it is really enabled?

Giovanni
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Re: Tickless and CORTEX_ENABLE_WFI_IDLE

Post by dflogeras »

I think the reason I wasn't measuring any difference is from clocking my uC lower and lower, I've now gotten it to ~1mA which is now a small portion of my power budget. I was mistakenly measuring my total power supply current and since the uC has gone from being about 80% of my total current, to <10% of my current I wasn't seeing a difference. Trying to measure iDD directly is now down to the LSB of my DMM so I'll have to wait until my INA219 current probe arrives :)

Good to know that it is still useful to use WFI though.
electronic_eel
Posts: 95
Joined: Sat Mar 19, 2016 8:07 pm
Has thanked: 8 times
Been thanked: 23 times

Re: Tickless and CORTEX_ENABLE_WFI_IDLE

Post by electronic_eel »

dflogeras wrote:Trying to measure iDD directly is now down to the LSB of my DMM so I'll have to wait until my INA219 current probe arrives

You may also want to take a look at the AD8428. With it you can use your scope to monitor the current consumption of your controller in high bandwidth and correlate the functions and modes it is working in with the actual current used. I find that very helpful when optimizing power consumption.

See this blog entry, that is where I first read about it: http://www.dorkbotpdx.org/blog/paul/measuring_microamps_milliamps_at_3_mhz_bandwidth
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Re: Tickless and CORTEX_ENABLE_WFI_IDLE

Post by dflogeras »

Whoa, yeah I like that idea! Thanks again for the insight electronic_eel, you're like my guardian angel :)
Post Reply