From 185831233868b07310b69daefa63b169f1bf8ed4 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Thu, 10 Apr 2014 13:01:51 -0600 Subject: [PATCH] Revert powerUp() delay to 5ms delay For nRF24L01+ to go from power down mode to TX or RX mode it must first pass through stand-by mode. There must be a delay of Tpd2stby (see Table 16.) after the nRF24L01+ leaves power down mode before the CEis set high. 5ms is the maximum defined in the v1.0 datasheet --- RF24.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RF24.cpp b/RF24.cpp index 36d8b3f..92659d8 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -573,7 +573,11 @@ void RF24::powerUp(void) // if not powered up then power up and wait for the radio to initialize if (!(cfg & _BV(PWR_UP))){ write_register(CONFIG,read_register(CONFIG) | _BV(PWR_UP)); - delayMicroseconds(1500); + + // For nRF24L01+ to go from power down mode to TX or RX mode it must first pass through stand-by mode. + // There must be a delay of Tpd2stby (see Table 16.) after the nRF24L01+ leaves power down mode before + // the CEis set high. - Tpd2stby can be up to 5ms per the 1.0 datasheet + delay(5); } }