Skip to content

Guard RTC GPIO hold in ESP32 deep sleep - #3745

Open
VoxMesh wants to merge 1 commit into
meshcore-dev:devfrom
VoxMesh:fix/esp32-rtc-gpio-hold-3586
Open

VoxMesh wants to merge 1 commit into
meshcore-dev:devfrom
VoxMesh:fix/esp32-rtc-gpio-hold-3586

Conversation

@VoxMesh

@VoxMesh VoxMesh commented Oct 31, 2026

Copy link
Copy Markdown

The LilyGO LoRa32 V2.1-1.6 uses GPIO18 for LoRa NSS. GPIO18 is not RTC-capable on the original ESP32, so the call to rtc_gpio_hold_en() in ESP32Board::enterDeepSleep() logs RTCIO number error during shutdown.

Check rtc_gpio_is_valid_gpio() before that call. Handling of valid RTC GPIO and the ESP32-C3/C6 path is unchanged.

Tested:

  • Firmware builds passed for ESP32, ESP32-S3, ESP32-C3 and ESP32-C6.
  • pio test -e native -e native_kiss_modem passed.
  • A local host check with mocked hardware APIs passes with this change and detects the invalid GPIO18 call in the unpatched function.

I haven't tested this on hardware.

Refs #3586

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant