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.
Hello all,
I know that 2 posts similar to this title
http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/136385.aspx and
http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/205290.aspx
are already posted. But I couldnt get complete info about configuring RTC.
So, I'm posting here. I'm using MSPExp-430-FR5739 board. I have read the user guide and about RTC_B.
Since there is no crystal on my exp board, I have sourced the ACLK from the VLOCLK. (I know freq is high, but I just want to generate an interrupt). Since only calendar mode is available with RTC_B, I have configured it as follows:
Here is the code excerpt:
// These 2 lines are not needed
// PJSEL0 |= BIT2; // ACLK on PJ.2 as ternary function
// PJSEL1 |= BIT2;
// configuring ACLK
CSCTL0 = CSKEY;
CSCTL1 |= DCOFSEL0 + DCOFSEL1; // Set max. DCO setting
CSCTL2 |=SELA__VLOCLK; // ACLK= VLOCLK
// Configure RTC_B
RTCCTL01 |= RTCTEVIE + RTCRDYIE + RTCBCD + RTCHOLD + RTCAIE;
// RTC enable, BCD mode, RTC hold
// enable RTC read ready interrupt
// enable RTC time event interrupt
// RTC alarm interrupt enable
// implementing an alarm 4 sec later.
RTCYEAR = 0x2010; // Year = 0x2010
RTCMON = 0x4; // Month = 0x04 = April
RTCDAY = 0x05; // Day = 0x05 = 5th
RTCDOW = 0x01; // Day of week = 0x01 = Monday
RTCHOUR = 0x10; // Hour = 0x10
RTCMIN = 0x32; // Minute = 0x32
RTCSEC = 0x56; // Seconds = 0x56
RTCADOWDAY = 0x1; // RTC Day of week alarm = 0x1
RTCADAY = 0x05; // RTC Day Alarm = 0x05
RTCAHOUR = 0x10; // RTC Hour Alarm
RTCAMIN = 0x33; // RTC Minute Alarm
RTCCTL01 &= ~(RTCHOLD); // Start RTC calendar mode
But the RTC_B is not using ACLK as source. It directly uses the crystal oscillator, and for a reason.alex12 said:Since there is no crystal on my exp board, I have sourced the ACLK from the VLOCLK.
The RTC_A on F5438 has a selectable clock source, as it is alternatively used as a timer. But the RTC_B doesn't.
No crystal, no clock.
**Attention** This is a public forum