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.
Dear sir,
pl. find below code, we are finding problem in genrating interrupt in RTC_C and pls suggest some solution. I m using controller MSp430F6736.
#include "msp430f6736.h"
#include <in430.h>
#include <math.h>
int count = 0;
void main(void)
{
WDTCTL = WDTPW | WDTHOLD;
RTCCTL0_H = RTCKEY_H; //unlock RTC = 0xA5
RTCCTL0_L |= RTCRDYIE | RTCTEVIE | RTCOFIE; //Enable RTC ready interrupt
RTCCTL1 |= RTCMODE | RTCHOLD | RTCBCD | RTCSSEL_3;// | RTCTEV_0; //RTCRDY, RTC in calendar Mode ,hold RTC before WRITTING any value
RTCDAY = 0X05;
RTCMON = 0x06;
RTCYEAR = 0x2015;
RTCSEC = 0x00;
RTCCTL1 &= ~RTCHOLD; // start RTC
RTCCTL0_L |= RTCRDYIE | RTCTEVIE; //Enable RTC ready interrupt
__bis_SR_register(LPM3_bits | GIE); // Enter LPM3 w/ interrupts
}
#pragma vector=RTC_VECTOR
__interrupt void RTCISR(void)
{
count++;
switch(__even_in_range( RTCIV, 16))
{
case RTCIV_RTCRDYIFG:
{
while(!(RTCCTL1 & RTCRDY))
{
sec = RTCSEC;
}
break;
}
case RTCIV_RTCTEVIFG :
{
__no_operation();
}
break;
case RTCIV_RTCAIFG: // RTCAIFG
__no_operation(); // Interrupts every alarm event
break;
case RTCIV_RT0PSIFG: // RT0PSIFG
break;
case RTCIV_RT1PSIFG: // RT1PSIFG
break;
case 14: break; // Reserved
case 16: break; // Reserved
default: break;
}
}
hi katie,
Your solution works for us. In our hardware we had connected AUXVCC3 to DVSS. For RTC it should be connected to DVCC as per your solution. RTC working perfectly but now we are looking towards its storing, that is after power fail RTC get reseted and started with initial configured value. Please let us know if there is solution with you.
Regards,
Namrata Sabale.
**Attention** This is a public forum