Skip to content

Prevent ble delay on deep sleep wake; add CIRCUITPY_BLE_WORKFLOW; doc editing#11123

Merged
tannewt merged 5 commits into
adafruit:mainfrom
dhalbert:prevent-ble-delay-on-deep-sleep-wake
Jul 16, 2026
Merged

Prevent ble delay on deep sleep wake; add CIRCUITPY_BLE_WORKFLOW; doc editing#11123
tannewt merged 5 commits into
adafruit:mainfrom
dhalbert:prevent-ble-delay-on-deep-sleep-wake

Conversation

@dhalbert

@dhalbert dhalbert commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator
  • Fixes Boot time regression from 9.2.x to 10 when exiting deep sleep (esp32-s3) #10934

  • When waking from true deep sleep, do not do BLE workflow blue-flash delay. BLE workflow will still be entered, but you can't initiate BLE workflow the first time from a deep sleep wake. The is the actual Boot time regression from 9.2.x to 10 when exiting deep sleep (esp32-s3) #10934 fix.

  • Disable BLE workflow by default. This is a deliberate incompatibility with previous versions, which enabled BLE workflow by default. A new setting, CIRCUITPY_BLE_WORKFLOW (default false) was added to settings.toml. The blue-flash bonding delay is not present unless this setting is true.
    If CIRCUITPY_BLE_WORKFLOW is false, supervisor.runtime.ble_workflow has no effect; documented this.
    The justification for the change in the default is that the web workflow is also not enabled by default: you must set CIRCUITPY_WEB_API_PASSWORD. In addition, the BLE workflow is rare. It also is not so reliable right now, but that is not a primary reason.

  • Added documentation for CIRCUITPY_BLE_WORKFLOW to the Environment Variables (settings.toml) documentation.

  • Labeled all the supported keys in the documentation with their data types: string, integer, float, bool.

  • Renamed all the RESET_REASON_* enums in shared-bindings/microcontroller/ResetReason.h to MCU_RESET_REASON_*. and changed their uses. The motivation is that several port SDKs happen to define their own RESET_REASON_ values. Fortunately there were no clashes, but it's clearer and safer to separate the values with a prefix.

  • Did some minor code formatting and commenting in supervisor/shared/bluetooth/bluetooth.c.

  • Renamed CIRCUITPY_SERIAL_BLE to CIRCUITPY_BLE_SERIAL_SERVICE, to match CIRCUITPY_BLE_FILE_SERVICE.

  • Turned on CIRCUITPY_SETTINGS_TOML for all nRF boards.

  • Changed the checks for the kind of MCU_RESET_REASON from negative checks to positive checks in various supervisor/shared code, to make the reasoning clearer.

This is a typical human PR; I only used an LLM to editing effort for some renaming.

I will update the BLE Guide pages to reflect the BLE workflow changes as needed.

The mcu_reset_reason_t members used a bare RESET_REASON_ prefix.
Several port SDKs also use RESET_REASON_* names for their own purposes:
atmel-samd ASF4 reset_reason, esp-idf soc_reset_reason_t,
Nordic softdevice, Silabs Gecko SDK, NXP SCFW.
Fortunately there were no conflicts, but this could have caused either
name conflicts or human confusion about which name to use.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dhalbert
dhalbert force-pushed the prevent-ble-delay-on-deep-sleep-wake branch 2 times, most recently from 150c078 to 2cef925 Compare July 15, 2026 02:41
@dhalbert
dhalbert force-pushed the prevent-ble-delay-on-deep-sleep-wake branch from 2cef925 to 480b994 Compare July 15, 2026 02:58

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. I'd rather it default to on though because it'll be a bit more discoverable that way and not change the default behavior.

Comment thread docs/environment.rst Outdated
@dhalbert
dhalbert requested a review from tannewt July 15, 2026 21:33

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt
tannewt merged commit 916daa9 into adafruit:main Jul 16, 2026
514 checks passed
@dhalbert dhalbert changed the title Prevent ble delay on deep sleep wake; add CIRCUITPY_BLE_WORKFLOW (default false!); doc editing Prevent ble delay on deep sleep wake; add CIRCUITPY_BLE_WORKFLOW; doc editing Jul 16, 2026
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.

Boot time regression from 9.2.x to 10 when exiting deep sleep (esp32-s3)

2 participants