Part Number: MSP430FR2433
Hi TI Team,
I am bit confused ..how i can set the value for RTCMOD for 1ms, 100ms, 1sec like that
Please explain me with an example
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.
Part Number: MSP430FR2433
Hi TI Team,
I am bit confused ..how i can set the value for RTCMOD for 1ms, 100ms, 1sec like that
Please explain me with an example
Hi
See the RTC housekeeping example.
hi Allen,
Thankyou so much. i understood bit better, but for my confirmation iam asking this question.
like
// Configure RTC
RTCMOD = 16000-1; // RTC count re-load compare value at SMCLK/1000 for ~1s interrupt
RTCCTL = RTCSS__SMCLK | RTCSR | // Clock source = SMCLK; Real-time software reset
RTCPS__1000 | RTCIE; // Pre-divide by 1000; Enable RTC interrupts
in the above configuration, if i want to set the RTC for 100ms , i need to assign RTCMOD with 1600-1 ri8
Please tell me , is my understanding is correct/not?
Allen one more doubt,
can i configure like below
/*this is for 1 sec*/
RTCMOD = 32768-1;
RTCCTL = RTCSS__XT1CLK | RTCSR | RTCPS__1 | RTCIE;
can i give RTCSS__XT1CLK and RTCPS__1 like this combination?
/*this is for 1ms*/
RTCMOD = 32.768-1; /*for 1sec we are giving 32768 so 1ms r we need to give 32.768*/
RTCCTL = RTCSS__XT1CLK | RTCSR | RTCPS__1 | RTCIE;
Please correct me.. i think im wrong when it came to milliseconds
Hi
You are right. The interval is depend on your CLOCK selection and the RTCMOD setting. Notice that the value in RTCMOD is an int type. You can give 33 to this register and it will give you ~1ms interval.
**Attention** This is a public forum