Skip to content

Commit 46568ba

Browse files
tekka007henrikekblad
authored andcommitted
RF24: Fix TX issue regarding PA+LNA modules (#1189)
1 parent 6ffe29c commit 46568ba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/RF24/RF24.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,13 @@ LOCAL bool RF24_sendMessage(const uint8_t recipient, const void *buf, const uint
314314
RF24_CMD_WRITE_TX_PAYLOAD, (uint8_t *)buf, len, false );
315315
// go, TX starts after ~10us, CE high also enables PA+LNA on supported HW
316316
RF24_ce(HIGH);
317-
delayMicroseconds(10); // datasheet: Pulse CE at least 10us
318-
RF24_ce(LOW);
319317
// timeout counter to detect HW issues
320318
uint16_t timeout = 0xFFFF;
321319
do {
322320
RF24_status = RF24_getStatus();
323321
} while (!(RF24_status & ( _BV(RF24_MAX_RT) | _BV(RF24_TX_DS) )) && timeout--);
324322
// timeout value after successful TX on 16Mhz AVR ~ 65500, i.e. msg is transmitted after ~36 loop cycles
323+
RF24_ce(LOW);
325324
// reset interrupts
326325
RF24_setStatus(_BV(RF24_TX_DS) | _BV(RF24_MAX_RT) );
327326
// Max retries exceeded

0 commit comments

Comments
 (0)