Description
Description
- Target STM32F103RCT6
- GNU ARM 7-2017-q4-major
- mbed-cli 1.7.3
- 603c4f9 (HEAD -> master) Merge pull request littlefs: Fixed issue with cleanup in mount function on error #7851 from geky/fix-littlefs-mount-cleanup
Steps to reproduce are pretty easy :
- Read time and display it
- Set time using the
set_time
function - Read time and display it
- Power cycle the target
On my target, it gives me the following output :
[V] ******* Welcome ! ********
[V] Entering state BOOT
[V] Current time before RTC set : 56997
[V] Current time after RTC set : 1541173796
[V] Exiting previous state
[V] ******* Welcome ! ********
[V] Entering state BOOT
[V] Current time before RTC set : 56997
[V] Current time after RTC set : 1541173796
I have checked the electrical part and everything seems correct : the Vbat pin has a tension around 3V and oscillators are in place. I have been googling and found that it seems to be a known issue. Someone has even created a patch for it here https://os.mbed.com/users/maxxir/code/Nucleo_F103RB_RTC_battery_bkup_pwr_off_o/ but based on pretty old version of mbed (around 1 year ago). I have taken a look at the code and try to figure out what are the important differences between this version and the one in mbed-os repository, but so far haven't found anything. Biggest difference found so far is direct manipulation of registers, but IMHO, that does not seem to be the problem since I can write and read time without problem, it just doesn't survive a power cycle. Any thoughts ?
Issue request type
[ ] Question
[ ] Enhancement
[X] Bug