Skip to content

Commit 846f30c

Browse files
committed
Fix Fifo Pointer in Continuous Mode
In continuous mode we need to check and set the fifo pointer before every read, otherwise data may be lost.
1 parent 4f9d21b commit 846f30c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

components/lora/COMPONENT_SX1272/SX1272_LoRaRadio.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,7 @@ void SX1272_LoRaRadio::handle_dio0_irq()
18261826
}
18271827

18281828
_rf_settings.lora_packet_handler.size = read_register(REG_LR_RXNBBYTES);
1829+
write_to_register(REG_LR_FIFOADDRPTR, read_register(REG_LR_FIFORXCURRENTADDR));
18291830
read_fifo(_data_buffer, _rf_settings.lora_packet_handler.size);
18301831

18311832
if (_rf_settings.lora.rx_continuous == false) {

components/lora/COMPONENT_SX1276/SX1276_LoRaRadio.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,6 +1975,7 @@ void SX1276_LoRaRadio::handle_dio0_irq()
19751975
}
19761976

19771977
_rf_settings.lora_packet_handler.size = read_register(REG_LR_RXNBBYTES);
1978+
write_to_register(REG_LR_FIFOADDRPTR, read_register(REG_LR_FIFORXCURRENTADDR));
19781979
read_fifo(_data_buffer, _rf_settings.lora_packet_handler.size);
19791980

19801981
if (_rf_settings.lora.rx_continuous == false) {

0 commit comments

Comments
 (0)