The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
Sleeping for 30 microseconds - marlfox0415 - Aug 20 10:09:35 2008
Does anyone have any insight into making the WISP enter LPM3 for 30
microseconds and then waking up via TimerA. The code I've been trying
to use just doesn't seem to be working. I'll paste it below. Thanks.
-John
void sleep (unsigned short duration) {
_BIS_SR(GIE);
TACTL |= TACLR;
TACCR0 = duration;
TACCTL0 = CCIE;
TACTL = 0
LPM3;
TACTL |= TACLR;
TACCR0 = 0;
TACCTL0 = 0;
_BIC_SR(GIE);
}
#pragma vector=TIMERA0_VECTOR
__interrupt void TimerA0_ISR (void) {
TACTL &= ~TAIFG;
LPM3_EXIT;
}
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Sleeping for 30 microseconds - Pisit Sawangvonganan - Aug 22 7:41:37 2008
Refer to the MSP430 data sheet for LPM3
CPU, MCLK, SMCLK, DCO osc. are disabled
DC generator disabled
ACLK is active so I think you should configure TACTL to use clock source from
ACLK with Up mode
Hope it may be as I thought.
--- On Wed, 8/20/08, marlfox0415
wrote:
From: marlfox0415
Subject: [msp430] Sleeping for 30 microseconds
To: m...@yahoogroups.com
Date: Wednesday, August 20, 2008, 7:09 AM
Does anyone have any insight into making the WISP enter LPM3 for 30
microseconds and then waking up via TimerA. The code I've been trying
to use just doesn't seem to be working. I'll paste it below. Thanks.
-John
void sleep (unsigned short duration) {
_BIS_SR(GIE) ;
TACTL |= TACLR;
TACCR0 = duration;
TACCTL0 = CCIE;
TACTL = 0
LPM3;
TACTL |= TACLR;
TACCR0 = 0;
TACCTL0 = 0;
_BIC_SR(GIE) ;
}
#pragma vector=TIMERA0_ VECTOR
__interrupt void TimerA0_ISR (void) {
TACTL &= ~TAIFG;
LPM3_EXIT;
}
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )