Skip to content

Commit 75d1249

Browse files
authored
Don't memset the TXRX buffer when radio is set to receive mode (#1345)
* Don't memset the TXRX buffer when radio is set to receive mode The 1262 doesn't do this memset, but the 1272/1276 do. This means, in an interrupt, if the radio is put back in RX mode before the payload is extracted and handed to a callback, it is zero'd. This causes bugs like zephyrproject-rtos/zephyr#48765 They would prefer it be fixed here, as it is just a waste anyway - we don't do this in 1262, and don't need to do it here. * Don't memset buffer here Similar to SX1276 change, this memset is unnecessary and causes bugs since SX1262 doesn't do it.
1 parent de25cb7 commit 75d1249

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/radio/sx1272/sx1272.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,6 @@ void SX1272SetRx( uint32_t timeout )
901901
break;
902902
}
903903

904-
memset( RxTxBuffer, 0, ( size_t )RX_TX_BUFFER_SIZE );
905-
906904
SX1272.Settings.State = RF_RX_RUNNING;
907905
if( timeout != 0 )
908906
{

src/radio/sx1276/sx1276.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,6 @@ void SX1276SetRx( uint32_t timeout )
10341034
break;
10351035
}
10361036

1037-
memset( RxTxBuffer, 0, ( size_t )RX_TX_BUFFER_SIZE );
1038-
10391037
SX1276.Settings.State = RF_RX_RUNNING;
10401038
if( timeout != 0 )
10411039
{

0 commit comments

Comments
 (0)