← index #17521Issue #2138
Off-topic · high · value 3.080
QUERY · ISSUE

docs: ESP32 RTC.memory and poweron_reset

openby davefesopened 2025-06-18updated 2025-09-27
docs

Documentation URL

https://docs.micropython.org/en/latest/library/machine.RTC.html

Description

The docs say it will survive "restarts", but it does not survive a poweron_reset. IE, pressing the EN button on the dev board.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

esp8266: rtc.memory() crash if rtc memory is uninitialised (i.e. at power on)

closedby MarkR42opened 2016-05-31updated 2016-06-12
port-esp8266

Steps to reproduce:

  1. power off device
  2. Power on and enter at REPL:

>>> import machine
>>> rtc = machine.RTC()
>>> rtc.memory()

Expected result:

Returns None, at least, looking at the source it looks like it should.

Actual result:

Crash:

import machine
>>> rtc = machine.RTC()
>>> rtc.memory()

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 31628, room 16 
tail 12
chksum 0x53
ho 0 tail 12 room 4
load 0x3ffe8000, len 1040, room 12 
tail 4
chksum 0x9f
load 0x3ffe8410, len 3112, room 4 
tail 4
chksum 0xe8
csum 0xe8

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied