nRF24l01 on Bluepill

Any other microcontroller based boards
User avatar
BennehBoy
Posts: 67
Joined: Tue Mar 05, 2019 7:43 pm
Location: Yorkshire
OS: Windows 10
IDE: 1.8.9, Sloeber
Core: Roger's & STM
Board: Blue/Blackpill, MM, HYTiny, Black407Z/VET6, DiyMroe, FK407M1
Contact:

Re: nRF24l01 on Bluepill

Post by BennehBoy » Fri Mar 22, 2019 1:24 pm

MoDu wrote:
Fri Mar 22, 2019 10:08 am
It does block (on roger's core), I've noticed this behaviour consistently. It's not like an AVR, where the serial output is just lost.
I've yet to try the new version.
I'm pretty sure Roger reverted the PR which caused that.
-Ben

User avatar
MoDu
Posts: 69
Joined: Tue Mar 05, 2019 1:56 pm
Location: Lisbon
OS: Windows
IDE: Visual Studio
Core: Roger's
Board: Maple mini

Re: nRF24l01 on Bluepill

Post by MoDu » Fri Mar 22, 2019 2:48 pm

I was still on the last December commit, thanks, I'll update and see if it improves.

User avatar
Rick Kimball
Posts: 71
Joined: Thu Mar 14, 2019 6:27 pm
Location: Eastern NC, US
OS: Linux
IDE: Arduino 1.8.9, vscode+make, eclipse, vi, emacs
Core: libmaple, STM official, fabooh, none
Board: Bluepill, Nucleos, Discovery
Contact:

Re: nRF24l01 on Bluepill

Post by Rick Kimball » Fri Mar 29, 2019 3:07 pm

FWIW I did try the latest Enrf24 (https://github.com/spirilis/Enrf24) with both a Bluepill and a NUCELO-F103RB using the latest STM core and the libmaple core. Both boards and cores worked fine.

On the bluepill I put a FTDI dongle on USART1 (PA9/PA10). On the NUCELO I used the builtin USART2 (PA2/PA3).
I tried the examples Scan Channel, TX Demo, RX Demo. They all worked fine.

I'm guessing the issues encountered have more to do with Serial issues than deficiencies in the Enrf24 library.

Granted I did change one thing to get rid of warnings in Enrf24.h. I put a block around this code, to prevent Roger's core from spewing warrnings:

Code: Select all

#ifndef BIT0
  #define BIT0                (0x0001)
  #define BIT1                (0x0002)
  #define BIT2                (0x0004)
  #define BIT3                (0x0008)
  #define BIT4                (0x0010)
  #define BIT5                (0x0020)
  #define BIT6                (0x0040)
  #define BIT7                (0x0080)
  #define BIT8                (0x0100)
  #define BIT9                (0x0200)
  #define BITA                (0x0400)
  #define BITB                (0x0800)
  #define BITC                (0x1000)
  #define BITD                (0x2000)
  #define BITE                (0x4000)
  #define BITF                (0x8000)
#endif
I changed the pins used:

Enrf24 radio(PA0, PA1, PA4); // PA0=CE, PA1=CSN, PA4=IRQ

I also changed the references to P1_0 to LED_BUILTIN.
-rick

Post Reply