Jump to content
Markers

MSP430G2553 Workshop

Recommended Posts

@Markers

Excellent! I am glad that you found a solution!

Yes, putting the msp430 into low power mode is a great way to complete the processing of the infinite while loop in main().

Is this what your main() function looks like now?

On 8/26/2018 at 10:30 PM, zeke said:

main { 
	... 

	while(1) 
	{ 
		if( (TRUE == T1_Fired) && (FALSE == T1_Serviced) ) 
		{ 
			FlashLED(); 
			T1_Serviced = TRUE; 
		} 

		if( (TRUE == P2_Fired) && (FALSE == P2_Serviced) ) 
		{ 
			StartTimer_Or_Whatever(); 
			P2_Serviced = TRUE; 
		}

		... 

		_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/interrupt
	} 
}

 

 

Share this post


Link to post
Share on other sites

@Markers

Excellent! I am glad that you found a solution!

Yes, putting the msp430 into low power mode is a great way to complete the processing of the infinite while loop in main().

Is this what your main() function looks like now?

On 8/26/2018 at 10:30 PM, zeke said:

main { 
	... 

	while(1) 
	{ 
		if( (TRUE == T1_Fired) && (FALSE == T1_Serviced) ) 
		{ 
			FlashLED(); 
			T1_Serviced = TRUE; 
		} 

		if( (TRUE == P2_Fired) && (FALSE == P2_Serviced) ) 
		{ 
			StartTimer_Or_Whatever(); 
			P2_Serviced = TRUE; 
		}

		... 

		_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/interrupt
	} 
}

 

 

Share this post


Link to post
Share on other sites

Hi Zeke,

Yes, that is exactly what I have done, and the end result is exactly what I needed.

Thanks again for your help.

Cheers, Mark

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×