Вопрос

I have an MSP430 Assignment which I'm doing in assembly, and the final part states to do this:

Then the microcontroller is put to sleep in mode 4. Another game will start by pushing the RESET button.

I can't find any way of putting it into sleep and after that, i have no idea how to get it out of sleep either. This is all I'm missing to finish my assignment, so any help would be awesome.

Thanks!

Это было полезно?

Решение

Low power mode 4: SCG1=1, SCG0=1, OscOff=1, CPUOff=1:

BIS #F0h,SR

You can wake from LPM4 with an interrupt. If your reset button is connected to a pin that has an external interrupt associated with it, pressing it will wake your processor.

Другие советы

To enter LPM4 you need to check the datasheet of your specific part, and find where the LPM bits live (in one of the status registers). Set them to the right values using the appropriate assembly code, and that's it.

Assuming reset is connected to the RESET pin, that will wake it from sleep mode. without anything further needing doing.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top