NRF24L01+ and Raspberry Pi Pico Does Not Work on Arduino Mbed OS2040 v 2.8.0

My setup for NRF24L01+ and Raspberry Pi Pico on Arduino IDE using board - Mbed OS 2040 version 2.8.0 does not work but is OK on version 2.6.1. Has anyone encountered the same thing? I had to keep the version on 2.6.1 to make it work

Hi @arduino-iot-developer. Please provide a detailed explanation of what you mean by "does not work", including:

  • What did you do?
  • What were the results you expected from doing that?
  • What were the results you observed that did not match your expectations?
    • Make sure to include the full and exact text of any error or warning message you might have encountered.

What about 2.7.2? Is that version in the "does not work" or in the "OK" category?

It is often useful for troubleshooting to employ the "bisection" technique, where you narrow down the differences between the "good" state and the "bad" state as far as possible. That allows you to focus your attention on understanding the impact of those specific differences rather than wasting time on irrelevant differences.

1 Like

Hi,

Thanks for the response.

For your question - What did I do, here are the items I did.
I use Arduino IDE 2.x beta for setting up Raspberry Pi Pico and NRF24L01 with the Arduino Mbed OS 2040 version 2.6.1 - supporting Raspberry Pi Pico.
This setup works for my transmitter and receiver - both Raspberry Pi Pico and NRF24L01. This also uses the RF24 library version 1.4.2 and I can send and receive messages using them.

Since there is a new board version available - Arduino Mbed OS 2040 v 2.7.2 and 2.8.0, I tried to upgrade from version 2.6.1. NOTE that I tried even the version 2.7.2 and this does not work either. I had to wait for 2.8.0 on assumption it will be fixed.

For the question, what were the results I expected from doing that:
I'm expecting that my transmitter and receiver will still work as these versions are upgrade from 2.6.1.

Results observed:

  • NRF24L01 is not initialized / not available after uploading the same sketch built based on the Arduino Mbed OS 2040 board version 2.8.0 and even on 2.7.2. I had to uninstall version 2.8.0 and reinstall back 2.6.1 to make it work

The only difference made is the use of Arduino Mbed OS 2040 board version from 2.6.1 to either 2.7.2 / 2.8.0. Sketch is same, pin setup are the same

This change made between the 2.6.1 and 2.7.2 releases looks relevant:

So maybe you need to change the connections of the NRF24L01 to the new SPI pins.


By the way, "Arduino Mbed OS RP2040 Boards" version 3.0.0 was released just earlier today!

Hi,

Thanks for the explanations. It's working now.
Here are the things I did:

  1. I updated my pin mappings in both transmitter and receiver pi picos to use the default SPI pin set instead of my earlier "convenient" SPI pin mapping set.
  2. upgraded to use the Mbed OS 2040 to version 3.0.0 from 2.6.1

It works now and hoping that this will not have future version forward compatibility issues since the default SPI pin sets are now used.

Thanks a lot. This issue can be closed for now.

You are welcome. I'm glad it is working now. Thanks for taking the time to share your findings!

My setup is same as yours. I am trying to build a remote control with raspberry pi pico and nRF24L01+ using Arduino IDE 1.8.19. My SPI connections are MISO:16, CS:17, SCK:18, MOSI:19 and CE:20. I have installed Arduino Mbed OS RP2040 V3.0.0 Boards manager and also RF24 V1.4.2. I could not run the nRF24L01+. The error is coming out at .begin(). Could you share your code and connections?

Yup, Im using the same pin mapping as you do, as that is the default SPI mappings. If you are using the NRF24L01+ with Raspberry Pi Pico directly, you need to use capacitor. If you are using an NRF24L01+ breakout board to connect to Raspberry Pi Pico, it should work without capacitor. Also, I use the Arduino RC 5 beta IDE and the Mbed RP2040 v3.0.0 board - and upgraded also to 3.1.1. So far it works but in RC6 does not. The sample code in the NRF24 library (1.4.2) is the one I used as baseline code.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.