m2v2 cda 3104 low power modes interrupts (wake...

31
M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)

Upload: others

Post on 08-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

M2v2 CDA 3104

Low Power Modes

Interrupts (Wake up)

Page 2: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

How can this be modified to run for 1 year on a battery?

From the last lecture:

Page 3: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

GOING LOW POWER

1

23

Page 4: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

https://embeddedcomputing.weebly.com/ultra-low-power-with-msp430.html

Use Hardware Interrupt (PUSH2) to WakeUp a processor put to sleep

Page 5: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 6: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 7: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 8: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 9: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 10: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

1% active per day is approximately 14.4 minutes operation in 24 hours

Page 11: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 12: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 13: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 14: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

Ok, so we enter a Low Power Mode which shuts down parts of the processor.

So how do we wake up from the Low Power Mode?

Easy, use a hardware Interrupt to restart the processor and execute the Interrupt Service Routine – ISR

Interrupts hardware are built directly into the processor – each device block has this hardware

Page 15: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

http://processors.wiki.ti.com/index.php/MSP430_Design_Workshop

What is an Interrupt?

Page 16: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 17: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 18: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 19: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

Four steps to get interrupts to work….

Page 20: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 21: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 22: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 23: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 24: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 25: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 26: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 27: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 28: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 29: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash
Page 30: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

The Code is simpler than all the details

Take a look at blinking the LED using a timer

How simple can it get?

Page 31: M2v2 CDA 3104 Low Power Modes Interrupts (Wake up)web.eng.fiu.edu/watsonh/IntroMicros/M2Architecture/... · O_toggl eOatputœlPi . Interrupt Vectors & Priorities (F5529) Memo Flash

Toggle LED using Timer Interrupt Service Routine

Video of loading and running this code: