-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
radio.begin() hangs on raspberry pi pico since b5a905b #899
Comments
There isn't any loops in The only reason I can think of is if the specified SPI bus interface isn't initialized correctly (via I'm not at home yet, but soon I'll spin up 1 of our lib's examples_pico binaries to try and reproduce. |
The mentioned commit neglects RF24/utility/rp2/RF24_arch_config.h Line 31 in da89874
which is the Maybe, the removal of SPI spi = SPI(); |
yep, we didn't thoroughly test the default diff --git a/RF24.cpp b/RF24.cpp
index c0ceef8a..68144a25 100644
--- a/RF24.cpp
+++ b/RF24.cpp
@@ -999,6 +999,7 @@ bool RF24::begin(void)
_spi->begin(csn_pin);
#elif defined(RF24_RP2)
+ _spi = new SPI();
_spi->begin(PICO_DEFAULT_SPI ? spi1 : spi0);
#else // using an Arduino platform || defined (LITTLEWIRE)
diff --git a/utility/rp2/RF24_arch_config.h b/utility/rp2/RF24_arch_config.h
index 7d5a1a93..3f24e949 100644
--- a/utility/rp2/RF24_arch_config.h
+++ b/utility/rp2/RF24_arch_config.h
@@ -28,8 +28,6 @@
#define _SPI SPI
#define RF24_SPI_PTR
-static SPI spi;
-
#ifdef SERIAL_DEBUG
#define IF_SERIAL_DEBUG(x) ({ x; })
#else However, I'm not receiving any data, only sending data works. This might be a separate issue with my RPi4 setup, so I'll try again with a different device... I'm testing the examples_pico/getting_started.cpp on my Feather RP2040. |
It wasn't my RPi setup, it was the adapter board I had connecting my nRF24 module to my Feather RP2040. This above patch works fine to fix this regression @felher I pushed the fix to the master branch, so you should be good to go now |
Holy moly, this was fast! Thank you! |
That was fast! You rock @2bndy5 |
Hey all!
When using the library on my raspbery pi pico, calling
radio.begin()
hangs forever. This was not always the case. I used a former version of this library in an older project and it worked fine. I run a git bisect with the version I had used in the old project and it seems that since commit b5a905b, callingradio.begin()
just hangs.Here is a minmal code example:
I did expect to see blinking, but I'm not seeing any. If I remove the
radio.begin()
line, the LED starts to blink again. If I reset library to a version before b5a905b I can leaveradio.begin()
in and it works fine.I'm not an expert by any stretch, so this might well be an misunderstanding/mistake on my part. If so, I apologize for the spurious bug report
The text was updated successfully, but these errors were encountered: