Using subseconds register on STM32F7 RTC
We have a driver for the RTC which I am trying to enhance with sub-second resolution.
I am testing with a tight loop which is repeatedly reading the time. First I am reading the SSR register (which should 'lock' TR and DR?) then the TR, then DR (to 'unlock'). I am following the calculation for the SSR value which is described in the Ref Manual, but a strange roll-over case occurs: TR / secs stays the same, but sub-seconds has changed from near-max to zero. i.e. time has 'gone backwards'.
In detail - from one 'read' to the next - Hrs/Mins/Secs is staying the same, but sub-seconds decreases. SSR 0->255, but TR doesn't increase.
Does anyone know what the problem is? I assumed that TR would increment when SSR rolls over
