mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-22 16:41:30 +00:00
Three driver fixes for RX duty cycle, all applied to the existing patch
stolen from Zephyr main:
1. Issue StopTimerOnPreamble=1 before SetRxDutyCycle so the chip's
timer is not reset on every preamble detect (per §13.1 of the
datasheet). Without this, duty cycle effectively never sleeps in
noisy RF and current draw spikes.
2. On IRQ_RX_TX_TIMEOUT during duty-cycle RX, re-arm via
sx126x_restart_rx() instead of falling through to set_sleep().
The old path silently killed duty cycle after the first preamble
false-positive.
3. On recv_duty_cycle(NULL) cancel, wake the radio before issuing
SetStandby — BUSY stays asserted during the sleep phase and the
standby command was being dropped.
Also adds a dc_timeout_restarts atomic counter incremented on the Fix 2
path, exposed end-to-end: sx126x_ext.h accessors → LoRaRadioBase vtable
→ SX126xRadio override → CommonCLICallbacks → RepeaterMesh. Query via
`get dc.restarts` on the repeater CLI; cleared by `clear stats`. High
values indicate a noisy environment or a too-loose preamble threshold.
(+increase ESP BT stack because future zephyr pin advance will trip that mine)
This commit is contained in:
1 parent
f685f6c095
commit
a3244e2dc2
11 files changed
+380
-232
No files matched your search
@@ -8,12 +8,23 @@
|
||||
# DLE managed internally by Espressif blob — no CONFIG_BT_CTLR_DATA_LENGTH_MAX
|
||||
# TX power managed internally by Espressif blob — no CONFIG_BT_CTLR_TX_PWR_*
|
||||
|
||||
# Host privacy: required for reliable iOS SMP on Espressif controller (Zephyr #84182-class).
|
||||
# Android MeshCore may need in-app bond or system pairing when using RPA.
|
||||
# Host privacy: ESP32-only override. Required for reliable iOS SMP on the
|
||||
# Espressif controller (Zephyr #84182-class). nRF/MG24 keep privacy off
|
||||
# because it breaks Android companion "connect from app" (manual pairing
|
||||
# from system BT settings works, but the app flow silently fails).
|
||||
CONFIG_BT_PRIVACY=y
|
||||
|
||||
# BLE thread stacks — ESP32 software BLE controller needs larger stacks
|
||||
CONFIG_BT_TX_PROCESSOR_STACK_SIZE=2048
|
||||
# BLE thread stacks — ESP32 software BLE controller needs larger stacks.
|
||||
# Zephyr 2026-Q1 added a synchronous sc_store() on the RX WQ in the
|
||||
# identity-resolved path (commit 2c6c80ddf65) which pushes the LittleFS
|
||||
# settings write onto the SMP callback chain. Default 2048 overflowed.
|
||||
CONFIG_BT_TX_PROCESSOR_STACK_SIZE=4096
|
||||
CONFIG_BT_RX_STACK_SIZE=4096
|
||||
|
||||
# Stack-overflow detection — xtensa has no MPU stack guard in Zephyr, so
|
||||
# use the software sentinel. ARM boards rely on MPU_STACK_GUARD (already
|
||||
# on via HW_STACK_PROTECTION) which is incompatible with this symbol.
|
||||
CONFIG_STACK_SENTINEL=y
|
||||
|
||||
# BLE TX buffers — the Espressif BLE controller blob bursts more aggressively
|
||||
# than the nRF softdevice and will deadlock the system workqueue if ACL TX
|
||||
|
||||
Reference in new issue
Block a user