-
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
on bcm2835, grabs CE1 unnecessarily #785
Comments
Hmm. This is interesting. Have you tried using the SPIDEV driver instead of the RPi driver? Since we really don't modify the bcm2xxx src, I would think this bug needs to be elevated upstream, but I might be missing something... I also have no idea where the bcm2xxx src is hosted from (its docs only provide a direct download - nothing is said about version control) |
from http://www.airspayce.com/mikem/bcm2835/
|
@combs You could research the issue more at the google groups discussions page pointed to by the bcm2xxx libs home page |
Oh right, I don't know why I didn't think to try the SPIDEV driver already. Bet that'll fix it. Will try tomorrow or Monday and report back. Thank you! |
ping |
Oops, thanks. I got this working in my project with the SPIDEV driver. I believe this was caused by the behavior in bcm2835.h. (More about why I need three i2c buses here, if you're curious.) I will do some more careful testing sometime soon and reopen this issue if there's anything in RF24 causing it. Thank you for all of your work on this library! |
Describe the bug
On my Pi 4 running current Raspbian, I am using GPIO 7 for another purpose (I2C 4 SCL).
The bug: When I initialize RF24, it forces GPIO 7 to become CE1 for SPI0, even if my RF24 device is attached (and configured to use) CE0.
https://github.com/nRF24/RF24/blob/master/utility/RPi/bcm2835.c#L699
In my ideal world, it would initialize only CE0 or CE1, depending on which CE is chosen by the user.
raspi-gpio get
output, pins 5-11, before RF24 init:raspi-gpio get
output, pins 5-11, after RF24 init:My application code is using the Python binding and looks like this:
where
"nrf_ce":22, "nrf_csn_ce": 0
Additional context
note: I have tried the
spi0-1cs
dtoverlay; RF24 still force-enables the CE1 pin.I have also tried
dtparam=spi=off
and RF24 creates the SPI bus automatically (handy!) but grabs CE1. Can't see any logic that would avoid CE1 grab if CE0 is specified.The text was updated successfully, but these errors were encountered: