feat(HAL/ZEPHYR): Zephyr core + serial-network HAL bound to a radio byte PHY#505
Open
nicolas-rabault wants to merge 4 commits into
Open
feat(HAL/ZEPHYR): Zephyr core + serial-network HAL bound to a radio byte PHY#505nicolas-rabault wants to merge 4 commits into
nicolas-rabault wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…yte PHY Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ZEPHYR luos_hal_config.h omitted MSGALLOC_MUTEX_LOCK/UNLOCK and LUOS_MUTEX_LOCK/UNLOCK that every other HAL defines, causing build errors in luos_engine.c, service.c, luos_io.c and luos_phy.c. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serial_network.c busy-waits on `sending` in spots that never pump the HAL (the `while (sending == true);` spin at the top of Serial_RunTopology), and every other Luos serial HAL clears `sending` from the TX-complete path. The deferred-via-SerialHAL_Loop design deadlocked there: tx_done fired (IRQ) but Serial_TransmissionEnd was never reached, so `sending` stayed true forever. SerialHAL_Send now transmits, waits for the radio TX-done IRQ, then calls Serial_TransmissionEnd() from caller context (never the ISR, which would re-enter radio_send). Bench-verified: node detected + LED driven over the air. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
ZEPHYR HAL port for luos_engine
Adds a Zephyr RTOS port of the core LuosHAL plus a serial-network HAL bound to a radio byte PHY, enabling luos_engine to run a serial network over a wireless link on Zephyr targets (bench-verified on nRF54L15).
What's here
engine/HAL/ZEPHYR/— core LuosHAL port: timing (systick) + IRQ enable/disable, withluos_hal_config.hproviding the*_MUTEX_LOCK/UNLOCKno-op macros every other HAL defines (the engine's single-loop model needs no real locks).network/serial_network/HAL/ZEPHYR/— serial-network HAL driving the radio byte PHY.Notable design point — synchronous TX
serial_network.cbusy-waits on thesendingflag in paths that never pump the HAL (e.g. thewhile (sending == true);spin at the top ofSerial_RunTopology), and every other Luos serial HAL clearssendingfrom the TX-complete path. A deferred (SerialHAL_Loop-driven) design deadlocks there: the TX-done IRQ fires butSerial_TransmissionEndis never reached, sosendingstays true forever.SerialHAL_Sendtherefore transmits, waits for the radio TX-done IRQ, then callsSerial_TransmissionEnd()from caller context — never from the ISR, which would re-enterradio_send.Verification
Bench-verified end to end on nRF54L15: node detected over the air and an LED driven across the radio serial network.
Scope is limited to the 5 new HAL files (+186 lines); no engine, binding, or build-script changes. Targets
feat/shared_lib.🤖 Generated with Claude Code