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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...