The value of the STATUS register is always transmitted by the chip when
reading any command. So a R_REGISTER command and the turnaround time can
be spared by issuing a NOP command instead.
This implementation suggested by the datasheet.
This operation is compatible with both nRF24L01 and nRF24L01+.
Signed-off-by: Marcell Pünkösd <punkosdmarcell@rocketmail.com>
The timeout condition was not handled before. Upon timeout, this caused
the chip to stay active until another send command changed it's state.
Sometimes when it was unable to transmit the data, it got stuck in the tx
fifo causing it to fill up over time, which set the TX_FULL flag in the
STATUS register.
Since there was no exceptions raised, the user code could not differentiate
a successful send or a timeout condition.
Signed-off-by: Marcell Pünkösd <punkosdmarcell@rocketmail.com>
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 <punkosdmarcell@rocketmail.com>
This changes almost all uses of "u-module" to just "module" for the
following built-in modules:
- binascii
- collections
- errno
- io
- json
- socket
- struct
- sys
- time
There are some remaining uses of "u-module" naming, for the cases where the
built-in module is extended in Python, eg `python-stdlib/os` uses `uos`.
Also, there are remaining uses of `utime` when non-standard (compared to
CPython) functions are used, like `utime.ticks_ms()`.
Signed-off-by: Damien George <damien@micropython.org>
Use explicit pin numbers to instantiate the SPI interface on RP2.
On ESP32 use SoftSPI(...) rather than SPI(-1, ...).
Update terminology to initiator/responder.
Tested with two Pico boards.