Skip to content

suspend the radio before blocking io#2355

Open
winnieXY wants to merge 1 commit intomeshcore-dev:devfrom
winnieXY:suspend-radio
Open

suspend the radio before blocking io#2355
winnieXY wants to merge 1 commit intomeshcore-dev:devfrom
winnieXY:suspend-radio

Conversation

@winnieXY
Copy link
Copy Markdown

acl.save() is blocking IO - during this time the nrf52 CPU is halted. If this happens in between a spi transaction with the sx1262 the bus is corrupted and the radio is stuck. the issue does not occur on esp32 as esp32 has a separate flash controller.

This behaviour is correctly detected by the repeater and the _err_flags are set:
_err_flags |= ERR_EVENT_STARTRX_TIMEOUT;
However - no action is taken upon that error yet.

There are two countermeasures - and one general countermeasure:

  • use non-blocking io (not trivial to near impossible on nrf52)
  • suspend the radio before writing the acls to prevent spi bus corruption
  • (restart the transmitter after a error was detected)

The last one is described within a separate PR - see #2347 - in order to have cleaner PRs. This PR is a attempt to mitigate the spi bus corruption by suspending the radio before the blocking operation.

@winnieXY winnieXY changed the base branch from main to dev April 22, 2026 08:26
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