Skip to content

Implement interface to: system_rtc_mem_write #133

Closed
@linagee

Description

@linagee

I propose making a "ESP.rtcMemWrite" that would pass things to "system_rtc_mem_write". Unless your program can start at any point and continue there (a routine like: wake, get temp, send to internet, deepsleep, repeat), you need to write data to the RTC before deep sleep or else you have no way of knowing what you were doing when the processor resets (wakes) after deep sleep.

Write data into RTC, see if the data exists when you boot back up (will also need: ESP.rtcMemRead/system_rtc_mem_read), then continue from there.

The first parameter, des_addr, needs to be between 64 and 128. (Block index, blocks are 4 bytes long, only bytes 256 to 512 are usable by the user.) I propose encapsulating all of this into something easy to use. (Maybe just pass in a byte/number from 0 to 256 and translate that into a "RTC storage slot" or something.)

Maybe... even have just 256 bytes passed into ESP.deepSleep (as a third parameter pointer?), and provide some other function to access them after the restart. Maybe that's messy though, not sure.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions