Low power modes - Doze, Wait, Stop

Discussion to talk about software related topics only.
Post Reply
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Low power modes - Doze, Wait, Stop

Post by sulliwk06 »

So I've been looking into trying to save power for some solar applications on the MOD5282, MOD5234, and NANO54415. I've read some ideas about adjusting the clock speed to save power, but I'm also interested in the low power modes described in the freescale manuals. I haven't seen much discussion about them, and I'm not even sure if they are supposed to work since we're running an operating system. Has anyone used these before successfully, or even know if its supposed to work from a theoretical perspective?

I did some experiments on the nano just to see what would happen. When I executed the stop instruction I could see the power drop, and I had a timer interrupt running around level 3, and I saw the power go back up. But I never actually saw execution resume, everything was just frozen. I presumed that execution would resume in the task where the the stop was called and everything would continue as normal.

Code: Select all

	sim2.scm.wcr |= (BYTE) 0x80;//enable stop mode

//	sim2.scm.wcr |= (BYTE) 0x00;//run mode
//	sim2.scm.wcr |= (BYTE) 0x10;//doze mode
	sim2.scm.wcr |= (BYTE) 0x20;//wait mode
//	sim2.scm.wcr |= (BYTE) 0x30;//stop mode


//	sim2.scm.wcr |= (BYTE) 0x00;//ANY interrupt required to wake
//	sim2.scm.wcr |= (BYTE) 0x01;//level 2-7 interrupt required to wake
	sim2.scm.wcr |= (BYTE) 0x02;//level 3-7 interrupt required to wake
//	sim2.scm.wcr |= (BYTE) 0x03;//level 4-7 interrupt required to wake
//	sim2.scm.wcr |= (BYTE) 0x04;//level 5-7 interrupt required to wake
//	sim2.scm.wcr |= (BYTE) 0x05;//level 6-7 interrupt required to wake
//	sim2.scm.wcr |= (BYTE) 0x06;//level 7 interrupt required to wake

	asm(" stop #0x2300 ");
mbrown
Posts: 61
Joined: Tue Jan 29, 2013 7:12 pm

Re: Low power modes - Doze, Wait, Stop

Post by mbrown »

You might want to check out this post http://forum.embeddedethernet.com/viewt ... f=3&t=1922.

I know that in the past, people have asked about low power modes, and the best way to do that is three-fold. You can slow down the clocks, the modules will run slower and consume less power. You can disable modules you are not using that are by default on. For example, on the mcf5441x processor family, I believe everything is on, but say you're not using the I2C or CAN bus at all. You could turn these off and save some power. The link in the first post has a header file that allows you to do this. The third idea involves using the low power states of the processor, which the link I posted refers to. The easiest way to do this is to this is to turn the idle operation into a low power state operation as the link suggests. I've tried it before with minimal power savings effects by itself, but combined with the other things you and I have mentioned, it may save you more power.

You should likely be able to implement similar techniques on the other cores.
Post Reply