#include <SPI.h>
#include "RF24.h"
#include "nRF24L01.h"
#define PINCSN 7
#define PINCE 18
const uint64_t pipe = 0xE8E8F0F0E1LL;
void setup(){
Serial.begin(115200);
radio.begin();
radio.setPALevel(RF24_PA_MAX);
radio.setDataRate(RF24_1MBPS);
radio.openReadingPipe(1,pipe);
radio.startListening();
}
void loop(){
if(radio.available()){
radio.read(&data, sizeof(data));
}
Serial.println(data);
}
You must use the ported library here:
The STM32 is a 32-bit device, so libraries must be reworked a bit to be compatible.
Ray
Edit: I made a funny “reworked a bit”
working with maple mini, where do I connect it to? Thanks
(LOL) I just checked and 7 is NSS which is PA4, so this will only work if you use a fairly recent version of the repo which has the fix for STM’s NSS feature / bug

Setup:
NRF24 – MAPLE MINI
GND – GND
VCC – VCC
CE – 3 (PB0)
CSN – 7 (PA4)
SCK – 6 (PA5)
MOSI – 4 (PA7)
MISO – 5 (PA6)
IRQ – 1 (PB10)
Some info is from here – http://www.stm32duino.com/viewtopic.php?t=138
EDITED
- Maple Mini.png (232.4 KiB) Viewed 8346 times
Maple Mini.png
But still nowhere to connect CSN..
But still nowhere to connect CSN..