From 3e859d2118c4ef9af5f43c930b3138185e5a9fb4 Mon Sep 17 00:00:00 2001 From: marcsello Date: Mon, 30 Dec 2024 15:20:18 +0100 Subject: [PATCH] nrf24l01: Increase startup delay. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the datasheet of the NRF240L1 chip, 150 μs startup time is only acceptable when the chip is clocked externally. Most modules use a crystal, which require 1.5 ms to settle. It should be okay to wait more in both cases, for a reliable startup. Signed-off-by: Marcell Pünkösd --- micropython/drivers/radio/nrf24l01/nrf24l01.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/drivers/radio/nrf24l01/nrf24l01.py b/micropython/drivers/radio/nrf24l01/nrf24l01.py index 76d55312f..9b034f8ba 100644 --- a/micropython/drivers/radio/nrf24l01/nrf24l01.py +++ b/micropython/drivers/radio/nrf24l01/nrf24l01.py @@ -227,7 +227,7 @@ def send(self, buf, timeout=500): def send_start(self, buf): # power up self.reg_write(CONFIG, (self.reg_read(CONFIG) | PWR_UP) & ~PRIM_RX) - utime.sleep_us(150) + utime.sleep_us(1500) # needs to be 1.5ms # send the data self.cs(0) self.spi.readinto(self.buf, W_TX_PAYLOAD)