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.

AM3352: Writing time for RTC

Guru 10295 points

Part Number: AM3352

I have a question regarding the RTC on the AM3352. I understand from the TRM that read and write operations only specify up to the second.
When writing the time, are fractions of a second (milliseconds) not reset to zero?

Or is there no way to set fractions of a second to zero?

I believe fractions of a second are active during time writing, causing an error of up to one second when setting the time, which is causing me trouble.

Best Regards,
Kanae

  • Hi Kanae,

    AM3352 RTC is not keeping track of milliseconds. Seconds is the finest time granularity, meaning if you write 0 to Seconds, Seconds will increase to 1 only after consequent 32768 clocks (i.e. 1 second):

    If you are experiencing problems with Seconds not correctly set, this could be a software problem like not obeying BUSY bit, 15 μs access period, or the  4 OCP clock cycles before reading the from the register.

    Please familiarize yourself with TRM Section 20.3.3.5.5 Modifying the TC Registers 

    You may want also to stop the timer before updating time keeping registers as described there.

    Thanks,

    Stan

  • Hi Stan,

    Thank you for your prompt reply.
    I would like to suggest that our customer verify once again that the TC register modification procedure is being carried out correctly and that the timer is stopped
    before updating the time-keeping register.

    Best Regards,
    Kanae

  • Hi Kanae,

    Sure. Please post the outcome after they test.

    Thanks,

    Stan