E010R5: wait for the end of the packet before hopping (#1197)

RF2500_SendPayload() returns once the CYRF6936 buffer is filled, while
the end of the packet is still being sent: changing the channel right
after it corrupted the last packet before each hop (1 in 6, measured).
Wait for TX_IRQ_STATUS TXC first (bounded loop): 100% of the packets
received right, same timing.
This commit is contained in:
Raphael Coeffic authored and GitHub committed 2026-11-21 16:00:44 +01:00
1 parent 91199e146e
commit ca86cb0aa3
1 file changed
+2
+2
View File
@@ -70,6 +70,8 @@ uint16_t E010R5_callback()
case 5: case 5:
return 1183; return 1183;
default: default:
//Wait for the end of the packet before changing the channel: RF2500_SendPayload() returns once the CYRF6936 buffer is filled
for(uint8_t i=0; i<100 && (CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS)&0x02)==0; i++);
hopping_frequency_no++; hopping_frequency_no++;
hopping_frequency_no &= 3; hopping_frequency_no &= 3;
if(IS_BIND_IN_PROGRESS) if(IS_BIND_IN_PROGRESS)