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.

Need Fast Time clock/calendar

Other Parts Discussed in Thread: MSP430F5438A

I have MSP430F5438A microcontroller and am programming in C++.  I'm trying to implement a "fast clock".  This is a clock/calendar that can run at ratios of real time from 1:1 to 60:1.  I've seen other posts and can implement a 1:1 clock using RTC_A calendar mode but it seems that all of the prescaler inputs that I might speed up become "don't cares" in calendar mode.

Greg P

  • In calendar mode, the RTC_A is clocked by ACLK. Normally, ACLK is set to LFXT! crystal input and falls back to REFO if the crystal is offline. Both cases give you a 32768Hz signal.

    However, nothing keeps you from switching ACLK to a different source. e.g. DCO or DCODIV (with prescaler). If you want a mor eprecise control, you can even take the PWM output of a programmed timer and route it to the XT1IN pin, using XT1 in bypass mode. This way, ACLK will clock the RTC-A with the output frequency of the timer signal. Or use one of the SPI ports and its baudrate generator, taking the clock output as input to XT1 and the RTC. (you'll need to setup a DMA channel so it continuously feeds the SPI TXBUF). This can be an alternative if you don't have a free timer.
    Of course you can use any other external clock signal to drive ACLK too.

**Attention** This is a public forum