EmbeddedRelated.com
Forums

Problems with RTC_B and MSP430FR5736

Started by Peter Grey February 3, 2014
I am having problems putting the device into LPM3.5 and then waking up with
a RTC event. Initially I put the program in a loop after setting the
time/date and alarm registers. I am looking for a change in minutes. I can
detect this event. When I put it into LPM3.5 as per the user guide it just
sits there. I am using a UIF-FET and if I try and stop it the program
crashes saying the security fuse is blown. I can only start again after
removing all power from the device. Is there any more information or
examples using the RTC_B in the FRAM series? Does anyone have code that
works?

TIA

Peter

Beginning Microcontrollers with the MSP430













You set a flag when your minutes met. When that flag set, in the loop at where you have LPM3.5, BRA to  the start of your program.

 

 

example:

 

RTC_B routine interrupt here:

    minutes = XX    // your set point

    set a flag.

 

 

 

 

 

 

LPM3.5 loop here

 

while ( device in LPM3.5 sleep mode)

{

           if flag set then

              execute your program  ;

          

}

 

Anthony

 

 


 

 


-------Original Message-------

 



Date: 2/2/2014 11:21:48 PM

To: m...

Subject: [msp430] Problems with RTC_B and MSP430FR5736

 


I am having problems putting the device into LPM3.5 and then waking up with a RTC event. Initially I put the program in a loop after setting the time/date and alarm registers. I am looking for a change in minutes. I can detect this event. When I put it into LPM3.5 as per the user guide it just sits there. I am using a UIF-FET and if I try and stop it the program crashes saying the security fuse is blown. I can only start again after removing all power from the device. Is there any more information or examples using the RTC_B in the FRAM series? Does anyone have code that works?


 


TIA


 


Peter



 











__._,_.___






















stime91438821













__,_._,___
Hi Anthony

Thanks for the reply.

I follow the suggestion in the user guide to go into LPM3.5

mov #PMMPW+PMMREGOFF,&PMMCTL0

bis #LPM3,SR

I have a nop after the above bis instruction where I have a breakpoint. It
is never reached. I also clear LOCKLPM5 before I execute the above
instructions. I also have a break point at the start on the RTC_B interrupt
vector and it does not reach here either. As I said, if I replace the above
instructions with a loop then I get the interrupt ok.

Thanks again

Peter

From: m... [mailto:m...] On Behalf Of
a...@gmail.com
Sent: Monday, 3 February 2014 10:47 PM
To: m...
Subject: Re: [msp430] Problems with RTC_B and MSP430FR5736

You set a flag when your minutes met. When that flag set, in the loop at
where you have LPM3.5, BRA to the start of your program.

example:

RTC_B routine interrupt here:

minutes = XX // your set point

set a flag.

LPM3.5 loop here

while ( device in LPM3.5 sleep mode)

{

if flag set then

execute your program ;

}

Anthony

-------Original Message-------

From: Peter Grey

Date: 2/2/2014 11:21:48 PM

To: m...

Subject: [msp430] Problems with RTC_B and MSP430FR5736

I am having problems putting the device into LPM3.5 and then waking up with
a RTC event. Initially I put the program in a loop after setting the
time/date and alarm registers. I am looking for a change in minutes. I can
detect this event. When I put it into LPM3.5 as per the user guide it just
sits there. I am using a UIF-FET and if I try and stop it the program
crashes saying the security fuse is blown. I can only start again after
removing all power from the device. Is there any more information or
examples using the RTC_B in the FRAM series? Does anyone have code that
works?

TIA

Peter
hi,
You should first put a breakpoint in you RTC ISR,
check if you do enter the ISR during the event.

In the end of you ISR, you should have a LPMX_EXIT,
then 430 will exit LPM after the event.
Otherwise it will maintain the LPM mode after the ISR.

2014-02-03 15:21 GMT+08:00 Peter Grey :

> I am having problems putting the device into LPM3.5 and then waking up
> with a RTC event. Initially I put the program in a loop after setting the
> time/date and alarm registers. I am looking for a change in minutes. I can
> detect this event. When I put it into LPM3.5 as per the user guide it just
> sits there. I am using a UIF-FET and if I try and stop it the program
> crashes saying the security fuse is blown. I can only start again after
> removing all power from the device. Is there any more information or
> examples using the RTC_B in the FRAM series? Does anyone have code that
> works?
>
> TIA
>
> Peter
>
>
>