Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ESP32: rtc_gpio_hold_en() called on non-RTC GPIO18 during LilyGO repeater shutdown

Aperta
#3,586 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Read src/helpers/ESP32Board.cpp and variants/lilygo_tlora_v2_1/platformio.ini to trace ESP32Board::enterDeepSleep() and confirm the NSS pin definition. Check the ESP-IDF GPIO documentation for the hold API supported by the target ESP32 variant. Done means deep sleep no longer calls an RTC-only API for GPIO18; verify the behavior on the affected hardware if available.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

While helping another user troubleshoot a LilyGO LoRa32 V2.1-1.6 repeater (ESP32, 433 MHz variant), I came across an invalid RTC GPIO call in the deep-sleep code.

Observed behavior

A custom Repeater build based on commit a366955cb2f67b8e6842d4f00d2b6a554dddd88a booted successfully, then entered the power-off sequence and produced this log:

Repeater ID: <redacted>
Powering Off
E (5387) RTCIO: rtc_gpio_hold_en(153): RTCIO number error

The build used a different radio frequency and LoRa reset pin, but the NSS pin definition and deep-sleep implementation were unchanged from upstream.

Cause

The LilyGO profile defines:

-D P_LORA_NSS=18

On the original ESP32, ESP32Board::enterDeepSleep() calls:

rtc_gpio_hold_en((gpio_num_t)P_LORA_NSS);

GPIO18 is not RTC-capable on the original ESP32, so rtc_gpio_hold_en() returns ESP_ERR_INVALID_ARG.

The 153 in the error message is an ESP-IDF source line number, not a GPIO number.

The call is also present in the current upstream main branch.

Expected behavior

The deep-sleep code should not call an RTC-only API for a regular GPIO.

If keeping NSS high during deep sleep is required, the appropriate GPIO hold mechanism should be used for the target ESP32 variant.

Scope of testing

I traced the shutdown path in the source and checked it against the captured UART log.

The power-off event itself appears to originate from the GPIO0 long-press handler. Its electrical cause has not been established.

The invalid RTC GPIO call explains the subsequent RTCIO error, not the original power-off event.

I have not reproduced this on an unmodified stock firmware binary or verified a fix on the affected hardware.

References
Lingua principale
C
Stelle
3.9k
Fork
1.5k
Merge medio
19h 9m
PR unite (30g)
27

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di meshcore-dev/MeshCore

Tutte le issue di meshcore-dev/MeshCore

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.