Page 1 of 1

stm32f rtc memory space?

Posted: Tue Apr 05, 2022 5:45 am
by picclock
I am using STM32RTC arduino library, stm32f401, with battery powered backup registers (20x32bit).
Do the rtc registers, (hour, min day etc.) affect or use any of the backup register space ?.
I intend to use the internal rc clock as accuracy is fairly unimportant.

Any help much appreciated.

Best Regards

picclock

Re: stm32f rtc memory space?

Posted: Wed Apr 06, 2022 8:52 am
by fpiSTM
RTC registers does not affect the BKUP register.
Anyway the STM32RTC library uses one backup register to know if the RTC has already been configured or not.
And 2 more for STM32F1xx serie to store the date.

Re: stm32f rtc memory space?

Posted: Wed Apr 06, 2022 11:42 am
by picclock
@ fpiSTM
I have examined the two header files, STM32RTC.h and rtc.h (and the cpp file) but I cannot find any info on reserved bu ram use.
Do you know which ram locations are used, or where they might be declared.
Best Regards
picclock

Re: stm32f rtc memory space?

Posted: Wed Apr 06, 2022 12:36 pm
by fpiSTM

Re: stm32f rtc memory space?

Posted: Thu Apr 07, 2022 3:04 pm
by picclock
OK I think I figured it. I wrote a program to clear and read back the BU Ram contents and found that Location 1 holds some data from the RTC. Not sure why 1?, unable to locate declaration. I was using location 0 as a checksum for the BU values, which would seem more logical. Reprogramming the chip (STM32F401) appears to have no effect on the clock time or backup registers. Battery used for ram backup.
Thanks for your assistance
Best Regards
picclock

Re: stm32f rtc memory space?

Posted: Thu Apr 07, 2022 6:14 pm
by fpiSTM