ESP32-P4 RTC with Backup Battery – How to Enable and Use?

Sudheesh
Posts: 4
Joined: Tue Aug 26, 2025 1:01 pm

ESP32-P4 RTC with Backup Battery – How to Enable and Use?

Postby Sudheesh » Tue Aug 26, 2025 1:25 pm

Hi everyone,

I’m new to ESP32 and currently working with the ESP32-P4 on a custom board. I want to use the RTC with a backup battery so that it keeps running when the main power is removed.

VBAT is connected to a CR1220 backup battery.

RTC_POWER is routed through resistors R115 (0Ω).

I’ve connected VBAT to the chip as shown in the ESP32-P4 datasheet.

My questions:

How can I enable and use the RTC with battery backup on the ESP32-P4?

Are there any example codes available for reading/writing the RTC time and checking if it retained time after power loss?

Do I need to configure any special registers or settings for RTC backup mode?

Any guidance, example code, or reference documentation would be helpful.

Here’s my schematic for the RTC section attached below :
Attachments
Screenshot 2025-08-26 121915.png
Screenshot 2025-08-26 121915.png (168.37 KiB) Viewed 1934 times
Screenshot 2025-08-23 183637.png
Screenshot 2025-08-23 183637.png (38.28 KiB) Viewed 1934 times

Sudheesh
Posts: 4
Joined: Tue Aug 26, 2025 1:01 pm

Re: ESP32-P4 RTC with Backup Battery – How to Enable and Use?

Postby Sudheesh » Fri Oct 03, 2025 2:12 pm

Anyone know about this? Please reply.

Who is online

Users browsing this forum: No registered users and 2 guests