nopnop2002 / Arduino-STM32-nRF24L01

Arduino stm32 support files for nRF24L01 RF modules
13 stars 4 forks source link
arduno mirf nrf24l01 rf24 stm32

Arduino-STM32-nRF24L01

Arduino stm32 support files for nRF24L01 RF modules

Arduino_Core_STM32 supports SPI library, but only works in Transaction SPI Mode.

This repository works with Transaction SPI Mode.

Memory usage

Important

When changing the settings of the nRF24L01, it is necessary to power cycle the nRF24L01 before executing.
Because nRF24L01 remembers the previous setting.
nRF24L01 does not have Software Reset function.

Software requirements

When using STM32/ESP8266, you need to install the core library.
There is some core library for STM32.
I used this.

Tested board

Serial.print is output to Arduino Serial Monitor.

Note
UNO's 3.3V output can only supply 50mA.
In addition, the output current capacity of UNO-compatible devices is smaller than that of official products.
So nRF24L01 may not work normally when supplied from the on-board 3v3.
nRF24L01+PA+LNA(nRF24L01+RFX24C01) needs 115mA.
You will need to power it from the 5V pin using a regulator.

Serial.print is output to Arduino Serial Monitor.

Serial.print is output to Arduino Serial Monitor.

Serial.print is output to Arduino Serial Monitor.

Serial.print is output to PA2.

Serial.print is output to PA9.

Serial.print is output to PA9.

Serial.print is output to PA9.

Serial.print is output to PB10.

Serial.print is output to PA9.

SPI Flash W25Q16 (U3) 1 PB0 F_CS 2 PB4 SPI1_MISO 3 WP 3V3 4 GND 5 PB5 SPI1_MOSI 6 PB3 SPI1_SCK 7 HOLD 3V3 8 VCC 3V3


It is necessary to remap SPI and separate NRF24 and on board flash.

void setup() { SPI.setMOSI(PB15); SPI.setMISO(PB14); SPI.setSCLK(PB13);


The following works when you remap SPI.

Nrf24l Mirf = Nrf24l(PB0, PB1); // CE,CSN

Serial.print is output to PA9.

Serial.print is output to IO1.

Serial.print is output to IO1.

Using with PlatformIO

Specify the URL in lib_deps of platform.ini.
PlatformIO automatically deploys the library.

[env:diymore_f407vgt]
platform = ststm32
board = diymore_f407vgt
framework = arduino
lib_deps = https://github.com/nopnop2002/Arduino-STM32-nRF24L01