Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month ago.
RTC Backup Registers with stm32F446RE and requirements to connect VBat.
Most similar questions are for other boards, and I think I understood that there are differences in the setup between boards.
I am developing a program in mbed. How do I write and then read from rtc backup registers? my board is STM32F446RE Nucleo.
To install a battery: Do I need to change any registers in addition to removing jumper SB-45 and connect the battery to pin VBat.
Though it looks like X2 is installed, when I change the clock to LSE, the program stops working. I am not sure if anybody else is having similar problems.
my Board is Nucleo stm32 F446RE C-03
1 Answer
10 years, 1 month ago.
Hi Rom, I put following two comments.
1) Vbat back-up & RTC operation
2) LSE(32.768KHz) oscillation
1) I already updated the program for RTC operation during reset and backup condition as below.
/users/kenjiArai/code/Nucleo_RTC_battery_bkup_pwr_off_okay/
You need to modify follows.
a) Copy rtc_api_F4xx.c in /mbed-dev/targets/hal/TARGET_STM/TARGET_STM32F4/ directory and delete rtc_api.c
(please refer modify_info_F4xx.h)
b) Change compile condition control: TARGET_NUCLEO_F401RE to TARGET_NUCLEO_F446RE.
#if defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F411RE) \ //<- 401 to 446 || defined(TARGET_NUCLEO_L152RE) || defined(TARGET_NUCLEO_F334R8) #endif
All of similar sentence in main.c & SetRTC.cpp.
2) Please try following program.
/users/kenjiArai/code/Nucleo_RTC_Clock_setting/
You can see background information as follows.
/users/kenjiArai/notebook/nucleo-series-clock-structure-and-xtal-oscillation/
REMARK: I do NOT have Nucleo STM32F446RE board. I just read STM32F466 documentation briefly and I thought that very similar with F411 (at least RTC part).
Hi Stan, current RTC initialization routine in mbed library cannot support RTC backup function even you set battery to VBat. Please check following link as for your reference.
/users/kenjiArai/notebook/nucleo-series-rtc-control-under-power-onoff-and-re/
I don't have a STM32F446RE but board itself is same with F411RE&F401.
posted by Kenji Arai 29 Jan 2016Thank you for your prompt response. So same issue as with F411RE, How about the problem with LSE, have you encountered similar on F411RE? Thanks again
posted by Stan Bouli 29 Jan 2016