Sunday 25 March 2018

embedded - ARM Cortex M Power Consumption -- Sleeping with Higher Clock Speeds vs. Lower Clock Speeds



I'm starting with Cortex M processors, but I have lots of experience with 8bit MCUs.


Say I have a buffer that needs to be updated every 5ms. There is an interrupt that goes every 5ms and the buffer is updated and the required calculations execute. The MCU goes back to sleep, until the next interrupt occurs.


At 500KHz on my 8051 MCU, this task takes 3ms. At 32MHz on my 8051 MCU, this task takes (made up number) 0.2ms.


On the 8051, I found that it required less current to actually run the MCU at 500KHz and sleep for less time between the 5ms interrupt, versus running it at the fastest speed (32MHz) and sleeping longer.


On a PIC, it was the reverse results. It was better to run the MCU fast, and sleep it quickly. (PIC has some great AppNote on power saving, and they call out both approaches.)


For the Cortex M processors, is it more energy efficient to run the system quickly and sleep it quickly? Or should you aim for the slowest clock speed?


I understand this calculation is kind of task dependent, obviously if you need a 48MHz interrupt (or whatever the MCU max clock speed is), this is a moot point.


But in general, what have you guys seen when power profiling your systems?


I'm sure the Cortex M uses less energy per MHz increases per the datasheet, but I'll be darned if my 8051 says the same thing but in reality doesn't work like that at all when I started mixing in the power saving modes.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...