Skip to content

fix(nrf24): recover auxiliary SPI after failed probe#2711

Open
AndrewIsFat wants to merge 1 commit into
BruceDevices:devfrom
AndrewIsFat:codex/fix-m5stickc-plus2-nrf24-detection
Open

fix(nrf24): recover auxiliary SPI after failed probe#2711
AndrewIsFat wants to merge 1 commit into
BruceDevices:devfrom
AndrewIsFat:codex/fix-m5stickc-plus2-nrf24-detection

Conversation

@AndrewIsFat

Copy link
Copy Markdown

Proposed Changes

Retry a failed NRF24 probe after cleanly restarting the auxiliary SPI controller. The recovery helper only accepts the auxiliary bus, so display and SD buses are never reset. Also emit the resolved NRF24 pin tuple on probe success or failure to make hardware reports easier to diagnose.

This fixes a regression on the M5StickC Plus2 legacy NRF24 connection where 1.14 worked but 1.15+ and dev reported "NRF24 not found".

Types of Changes

Bugfix.

Verification

Tested on a physical M5StickC Plus2 with an NRF24L01 connected through the legacy pin mapping:

  • SCK: GPIO 0
  • MISO: GPIO 33
  • MOSI: GPIO 32
  • CS: GPIO 26
  • CE: GPIO 25

The radio was detected successfully in Spectrum and again in MouseJack after leaving and re-entering NRF24 tools. The flashed image was verified by esptool.

Testing

  • uv tool run platformio run -e m5stack-cplus2
  • Physical Spectrum startup and exit
  • Physical MouseJack scan startup and exit
  • Repeated NRF24 initialization across tool changes

Linked Issues

Related to #1655.

User-Facing Change

Fix NRF24 detection on M5StickC Plus/Plus2 legacy auxiliary SPI connections.

Further Comments

The first probe is retained. The auxiliary SPI restart is only used as a recovery path after that probe fails.

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