[email protected] wrote:
Hi,


I am new in mspgcc, can someone please tell me how can I put microcontroller into LPM1 mode. Does following code works?


LPM1 does not make much sense. In most cases you do need LPM3.
In the code examples from TI i only found LPM3 and in the
examples from mspgcc LPM3 and LPM4.
I think i've seen some code with LPM1 and LPM2 on a conferece from TI.

LPM1 and LPM2 should work if you replace the string "LPM3" by
"LPM1" or rather "LPM2" in the examples.

LPM1 should work fine, this stops the CPU and the DCO if its not being used. You don't need the while(1) around the LPM1 as the CPU will stop on the LPM1 instruction. To resume execution you need to restart the CPU in an interrupt by changing the SR that is pushed to the stack.

--
Peter Jansen

Reply via email to