Low-power core
The esp32s31_lp remoteproc driver loads firmware into LP SRAM and exchanges
32-bit messages with the LP core through the hardware mailbox. The normal
firmware name is esp32s31/s31-lp-core.elf. Startup and replacement are covered
in LP firmware development.
Check startup and the timer
s31-lpctl status
s31-lpctl ping
s31-lpctl sleep-test 1000
status includes ready=1 once READY has arrived, the last message and mailbox
counters. ping reports ready and rtt_us; the round-trip value varies.
sleep-test accepts 10–5000 ms and sets DRY_RUN, so Linux stays awake.
A successful timer test reports result=0 and the timer bit (0x1) in
wake_reason.
See the test handler and result formatting.
Test a GPIO transition
The CLI accepts LP GPIO0–7, level low or high, pull none, up or down,
and a timeout of 10–5000 ms (default 1000 ms). Select a pin available on your
board and keep it at the inactive level while ARM executes.
For GPIO3 high-level wake, start with the input low, then drive it high after arming and before the one-second timeout:
s31-lpctl gpio-test 3 high down 1000
For low-level wake, start high and then drive it low:
s31-lpctl gpio-test 3 low up 1000
The firmware configures the pull, waits 100 microseconds for the input to
settle, and rejects an already-active input with S31_LP_SLEEP_ERR_WAKE_MASK.
This check applies to DRY_RUN too. Matching the internal pull to the active
level is therefore not a valid standalone test; an external circuit or strap
can also change the initial level. See the ARM validation.
A successful GPIO3 test reports result=0, the GPIO bit (0x2) in
wake_reason and bit 3 (0x8) in raw. A timeout means no accepted transition
completed in the interval. Linux remains awake; passing this test does not
establish system-suspend or deep-sleep wake reliability.
Devices and attributes
Interface |
Description |
|---|---|
|
Write exactly 4 bytes; read with a buffer of at least 4 bytes to receive one 32-bit mailbox word |
|
Whether a READY notification has been received |
|
Last received word |
|
Message, acknowledgement and timeout counts |
|
Send a mailbox word |
|
Start or read a PING/PONG test |
|
Start or read a timer test |
|
Start or read a GPIO test |
|
Read deep-sleep markers or request timed shutdown |
The attributes belong to the bound LP platform device. Firmware selection and
start/stop use remoteproc’s firmware and state attributes. Binary reads can
block waiting for a word; a nonblocking empty read returns -EAGAIN. See the
character-device implementation.