Fix NRF52 sleep deadlock, ESP32 WiFi check, and RAK4631 build flag#2
Open
weebl2000 wants to merge 1 commit intoIoTThinks:MCdev-PowerSaving-for-all-ESP32-NRF52-repeatersfrom
Open
Conversation
NRF52: Remove nrf_gpio_cfg_sense_input/nrf_gpio_cfg_input on DIO1 pin during sleep. These PIN_CNF writes are unnecessary for System ON idle (GPIOTE from RadioLib already wakes WFE) and risk a rare GPIOTE sampling glitch where the ISR misses a rising edge, leaving DIO1 stuck HIGH with STATE_INT_READY never set — making the radio permanently deaf. Also restore FPU errata 87 workaround that was present in the original sleep() but dropped in the rewrite. ESP32: Check mode != WIFI_MODE_NULL in safeToSleep() so that stopped WiFi doesn't incorrectly block sleep. RAK4631: Restore accidentally removed -D NRF52_POWER_MANAGEMENT.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NRF52: Remove nrf_gpio_cfg_sense_input/nrf_gpio_cfg_input on DIO1 pin during sleep. These PIN_CNF writes are unnecessary for System ON idle (GPIOTE from RadioLib already wakes WFE) and risk a rare GPIOTE sampling glitch where the ISR misses a rising edge, leaving DIO1 stuck HIGH with STATE_INT_READY never set — making the radio permanently deaf. Also restore FPU errata 87 workaround that was present in the original sleep() but dropped in the rewrite.
ESP32: Check mode != WIFI_MODE_NULL in safeToSleep() so that stopped WiFi doesn't incorrectly block sleep.
RAK4631: Restore accidentally removed -D NRF52_POWER_MANAGEMENT.