The ESP8266 has some memory associated with the RTC which retains contents across reset/deepsleep so long as the power is kept on. It's mapped to address 0x60001200. I can verify that the contents are retained so long as power is kept on. Reads through the uctypes.bytearray_at seem ok, but it seems that writes messed up. Here's an example which defines an array of 256 bytes at 0x60001200 and attempts to assign consecutive values to consecutive bytes
import uctypes
by = uctypes.bytearray_at(0x60001200, 256)
for i in range(0,256):
by[i] = i
st = ''.join('{:02X} '.format(b) for b in by)
print(st)
The ESP8266 has some memory associated with the RTC which retains contents across reset/deepsleep so long as the power is kept on. It's mapped to address 0x60001200. I can verify that the contents are retained so long as power is kept on. Reads through the uctypes.bytearray_at seem ok, but it seems that writes messed up. Here's an example which defines an array of 256 bytes at 0x60001200 and attempts to assign consecutive values to consecutive bytes
I'd expect results 00 01 02 03 etc. but instead
Looks like something's not quite right at the 32-bit word boundary? This is official image MicroPython v1.19.1 on 2022-06-18; ESP module with ESP8266
Relative newcomer to Micropython so please accept my apologies if this a rookie error.