Hello everyone!
Please tell me if I can connect nRF21540 to a microcontroller using only 4 SPI pins (SCK, MOSI, MISO, CSN) and control it completely? At the same time I want to leave MODE, RX_EN, ANT_SEL, TX_EN, PDN pins unconnected.
Thank you.
Hello everyone!
Please tell me if I can connect nRF21540 to a microcontroller using only 4 SPI pins (SCK, MOSI, MISO, CSN) and control it completely? At the same time I want to leave MODE, RX_EN, ANT_SEL, TX_EN, PDN pins unconnected.
Thank you.
Hi,
The nRF21540 can almost be fully controlled with only the SPI interface. The PDN pin is needed to control the power down, this can't be controlled using the SPI interface. MODE, RX_EN, TX_EN and ANT_SEL must all be connected to ground when not used.
Our SDKs does not have support for controlling the nRF21540 using SPI only, so you would have to implement this feature yourself.
Best regards,
Bendik
Thanks for the answer!
What if you do the opposite, connect only the MODE, RX_EN, ANT_SEL, TX_EN, PDN pins to the microcontroller, and leave the SPI pins unconnected? Is it possible to do it this way? I need to connect the nRF21540 to the microcontroller with as few pins as possible, but the software implementation should not be too complicated.
Using only GPIO is possible and supported in the nRF Connect SDK.
With only the GPIO interface only 2 different TX gain settings can be used, by default these are 10 and 20 dB.
If only one antenna is used the ANT_SEL pin does not have to connected to the MCU, and can be grounded directly, this will default to always use the ANT1 pin. This brings the minimum number of MCU pins needed down to 4, MODE, RX_EN, TX_EN and PDN.
Great. Thanks for the help.
Do the SPI pins have to be grounded?
Due to errata 13, all the input pins need to be pulled low during power down state. But the CSN pin needs to be high when not in power down, in order to not need a MCU GPIO pin for the CSN pin it can be tied together with the PDN pin.
The MISO, MOSI and SCK pins can be grounded when not using SPI.