From 816708aa4d591bbd50604366e4fd072f7d4acf2a Mon Sep 17 00:00:00 2001 From: Patryk Biel Date: Tue, 20 Aug 2024 15:55:26 +0200 Subject: [PATCH] devicetree: Reduce LoRa SPI frequency to allow reliable communciation The heltec_wireless_stick_lite_v3 board does not properly handle receive operations when the SPI used to communicate with onboard SX1262 has the clock frequency set too high. This causes radio recv operation to almost always hang forever without any error, as the SX1262 module returns 0xFF00 value as the interrupt status which does not make any sense, thus causing the LoRaWAN library to trigger RXTX timeout handler which in the current SX1262 driver implementation is not privded. The issue occurs almost always, sometimes allowing to receive few (3-5) tranmissions correctly, then fail. The root of the problem is not known for sure, but it is highly likely a board's limitation, though not confirmed by the manufacturer. The current SPI frequency was chosen arbitrarily based on the conducted experiments where the 30 000 messages have been received continiously without any problems (with 5s interval for each message). Signed-off-by: Patryk Biel --- .../heltec_wireless_stick_lite_v3_procpu.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.dts b/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.dts index 854eb101fe4..d4b2f2b17e8 100644 --- a/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.dts +++ b/boards/heltec/heltec_wireless_stick_lite_v3/heltec_wireless_stick_lite_v3_procpu.dts @@ -128,7 +128,7 @@ dio2-tx-enable; dio3-tcxo-voltage = ; tcxo-power-startup-delay-ms = <5>; - spi-max-frequency = <16000000>; + spi-max-frequency = <4000000>; }; };