cancel
Showing results for 
Search instead for 
Did you mean: 

RTC backup 3VDC battery wiring on stm32mp157c-dk2 board?

albertr
Associate III

I have seen some stm32mp157 boards from third parties do have a backup 3VDC battery attached to their RTCs, so it won't lose the time when powered off. Is there any way to connect a backup battery to the RTC circuit on the stm32mp157c-dk2 board?

-albertr

14 REPLIES 14

To disable RETRAM and BKPSRAM, you need to modify TF-A source code as this is currently hard coded (always enabled before entering in low power modes).

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @PatrickF​ ,

I don't use trusted boot chain, I'm using basic boot (u-boot-spl.stm32 + u-boot.img). Anything I need to change in u-boot or in its device tree to disable it?

-albertr

In uBoot SPL (Basic Boot), as low power is not supported, the BREN and RREN bits should not be set (they are cleared on a VSW/VBAT domain reset), so you should have nothing to do to get lower power when in VBAT mode.

We recommend to use TF-A+uBoot (Trusted Boot), which is better supported and provide all features. Basic Boot only exist as currently required for DDR Tools.

In TF-A, changes are in plat/st/stm32mp1/stm32mp1_low_power.c

in enter_cstop() function remove the following lines:

                      /* Keep retention and backup RAM content in standby */
                       mmio_setbits_32(pwr_base + PWR_CR2, PWR_CR2_BREN |
                                              PWR_CR2_RREN);

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks for clarification, @PatrickF​ !

-albertr

Thanks again!

-albertr