Lecture 12 - Power Consumption and Calculations

Power is Energy consumption per unit time: P=Et in Watts (joule/second). Digital systems themselves need to consider power consumption especially if we are in low power:

We have two types:

PCMOS=Pdyn+Pstat

Here:

Pdyn=12CeffVdd2f

and:

Pstat=Pleak+Pds,sub+Pds,DC+Ps.c.

all of these are considered in designing the chip itself. Doping the chip contents changes based on our requirements here.

Reducing P

To reduce the power consumption, we can:

Consequently E=Pdt so saving on P will save on E. But the big thing here is that if a job uses 4W over 5s, it's the same as a 2W job over 10 seconds. Nowadays, due to temperature is to:

Embedded Systems Power Management

You've probably seen that you have to turn on each and every single device/peripheral you want to use. As such, we can shut off parts of the chip we aren't using. This is a double edged sword since if you actually need the data in a part you're turning off, then you may waste power on trying to get that information back.

The STM32 handles these power handing techniques by doing:

The voltages for our STM32L4xxx is:

Low Power Modes

The modes are:

Pasted image 20240207143536.png

Entering Low Power Mode

Most modes require you to execute:

__wfi(); // enter new mode
// or
__wfe(); // exit mode

For Sleep (core off): Use wfi or wfe. For LP Sleep: use the same as sleep mode but set:

SCB->SCR_SCB_SCR_SLEEPDEEP

Stop modes require you to manually turn off more parts of the periphery.

One of the mastery exercises is to mess to the parameters here for another project and see how low you can get the power, which is pretty cool!

How Much Power is Saved?

Why is this all worth it? The data sheet has a lot of details, but some highlights are:

P=0.12.88mAVDD+0.9(0.92mAVDD)=1.116VDD mW

So notice that we can have great power savings, while still being able to use our more advanced power modes.

Interested?

If you want to do this as a mastery exercise, you can look at the reference manual, chapter 5 (PWR), as well as the ARM programming model Chapter 4.4 (SCB).