Arduino_STM32 icon indicating copy to clipboard operation
Arduino_STM32 copied to clipboard

STM32F4 backup domain registers and backup domain sram

Open ag88 opened this issue 4 years ago • 1 comments

STM32F4: update bkp.h, bkp.c add support for backup registers and backup sram. added example in STM32F4/libraries/RTClock/examples/BkpTest

ag88 avatar Mar 10 '21 18:03 ag88

the comment about this PR : https://github.com/stevstrong/Arduino_STM32/issues/44#issuecomment-795857671

ag88 avatar Mar 10 '21 18:03 ag88

What is actually the status of this PR? Is it safe to merge?

stevstrong avatar Sep 17 '23 12:09 stevstrong

this is done back then when I'm trying to use the backup registers on stm32f401. The readme.md in this commit is here https://github.com/rogerclarkmelbourne/Arduino_STM32/pull/850/files#diff-5b489eef3ad090c0a5bed41a1f684527533ee35d6300a3ec9e008013bf280689 and the test is here, it is both a test as well as an example codes https://github.com/rogerclarkmelbourne/Arduino_STM32/pull/850/files#diff-afb267cf20737b1168f92a9d093766aab94b0aa65704e08d1a6b2633f796ddac

stm32f401 don't have backup sram but that they do have backup registers and this commit is part of works i'm using in some of my sketches to keep some data in the backup registers as these can be safe kept by VBAT (e.g. a coin cell for the RTC) even if the main VDD 3v3 is powered off. This (the backup registers) has also been used in conjunction with RTClock. Hence, it should not affect the function of RTClock. One of the commit is actually a fix. When RTC is running on LSE and VBAT. The original code causes the RTC reset when powered up, this fix avoids clobbering a running RTC if it is running on LSE. https://github.com/rogerclarkmelbourne/Arduino_STM32/pull/850/commits/48817fab8da62b28c539be58213783b248c85b73 I've done various tests on stm32f401 and is actually using the codes in sketches as described above. I've tested the codes against a stm32f407 back then for backup sram and registers as well.

I think this shouldn't break anything

ag88 avatar Sep 23 '23 17:09 ag88

OK, then I will commit this. If somebody will encounter a problem related to this, then I will revert it. Thank you for contributing!

stevstrong avatar Sep 25 '23 13:09 stevstrong

thanks ! I'd monitor issues here and in www.stm32duino.com and would respond just in case someone is after all using it

ag88 avatar Sep 25 '23 16:09 ag88