This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reg: MSP430F5XX RTC alarm setting register in user guide

Other Parts Discussed in Thread: MSP430F5335

Hi,

 I am using MSP430F5335. In this i am developing internal RTC.I am referring the user guide SLAU208M. For the alarm setting register configuration i confused the information given in that user guide. In the chapter  23.2.2 Real-Time Clock Alarm Function (PageNo:596) they were given the inormation for alrm bit settings as follows

Each alarm register contains an alarm enable (AE) bit that can be used to enable the respective alarm register. By setting AE bits of the various alarm registers, a variety of alarm events can be generated.

But in the register explanation they mentioned alram enable bit set as 0 to enable the particular register for all the alarm register as follows

so that i wrote my program to set alarm by clear the AE bit in all the alarm register,but it doesn't work. If i  set the alarm enable bit as 1 then i am getting the alarm enable interrupt as well as alarm also works.

can  anyone already face that issue?

Is any updated user guide avilable with this correction done? or else my undersatnding is wrong?

Thanks in advance.

  • Hi Prakash,

    I believe you are correct and this is a typo in the User's Guide.

    I'll report the bug, so that we fix it in the next Rev.

    Regards,

    Luis R

  • Thanks Luis

     In RTCconfiguration i faced one more issue also. Actually i set the  RTCBCD bit in RTCCTL1 register to set the sec,min,hour registers in BCD format. But in MSP430F5335 the sec,min, hours, year registers are not updated with the values which i am setting. If i used hex fomat by clearing RTCBCD bit in RTCCTL1 register the rtc registers are proprly updated. I have done code for BCD format as follows

    RTCSEC = 30;
    RTCMIN = 15;
    RTCHOUR = 7;
    RTCDOW = 0;
    RTCDAY = 8;
    RTCMON = 8;
    RTCYEAR = 2014

    Can you please explain me what is the mistake i would have done?

    Thanks in advance.

     

     

  • Hi Prakash,

    Are you loading the values in BCD format when RTCBCD=1? 

    This is what I get when loading values in HEX format:

    And in BCD:

    I'm not sure if this answers your question but please send me some screenshots if it doesn't.

    Regards,
    Luis R

  • Thanks Luis,

    As of now i proceed with Hex format only due to my urgency. Also the RTCTEVIFG reset status as mentiond '0' in data sheet. But in my case its set as '1'. please find the screen shot of i would taken from my project

     

    can you please explain why this different? Is there also typo error?

    If i set the RTCTEVIE interrupt for minute in RTCTEVx rtc control register1 the interrupt is continuosly came. As of my understanding once the ISR processed then the flag RTCTEVIFG has to be cleared, this is not happens. For that whether software only need to clear this flag ,is not be done in hardware itself?

     //! set Hex format in bit 15
     //! set RTC hold in bit 14
     //! set RTC time interrupt event in minutes in bit 9, 8
    rtcctrl01 |= 0x4000;
    
      //! set RTCTEVIE bit in bit 6
    RTCReg_ptr->rtcctrl01 |= 0x0040;
        
       //! start RTC
    RTCReg_ptr->rtcctrl01 &= ~(0x4000);

    Thanks in advance

  • Hi Prakash,

    i don't see RTCEVIFG set in the image but are you referring to RTCRDYIFG and RTCOFIFG?

    Please note that the register will get cleared on a POR, not a PUC. Which one are you forcing?

    Also, the flags should get cleared on Reset, but they can get set after. Note that the debugger stops in main() but the MCU already executed several cycles by then.

    The RTCTEVIFG fllag should get cleared automatically if you are using RTCIV. The highest-pending interrupt flag will get cleared when you read this register.

    If you are not using this register, but reading the flags manually, then you need to clear them manually.

    Regards,

    Luis R

**Attention** This is a public forum