RF24 library silently fails on Dash


#1

I have a 3.3v nRF24L01+ RF radio breakout board that uses SPI and the RF24 library with RF24Network that uses it. The RF24 and RF24Network libraries are available in the Arduino IDE library manager. With the RF24Network example code, I have successfully tested this radio on an Arduino Uno. However, it fails silently on the call to RF24::begin() when run on the Hologram Dash.

Here is code modified for the Dash that reproduces the issue. It runs up until after it prints out “RF24 radio starting…” and then the serial output stops and the program does not proceed further, so the failure is in the call to radio.begin(). I have tried checking the return bool value of this function for success but it never returns.

Here is my pin configuration (Dash on left, nRF24L01+ on right):
3.3v => VCC
GND => GND
D01 => CE
D02 => CSN
D11/SCK => SCK
D12/MOSI => MOSI
D14/MISO => MISO
(nothing) => IRQ

I substituted the Dash constants D01 and D02 in the example code above as the parameters for CE and CSN of the RF24 constructor. Perhaps this is where my error is? Are pins D01/D02 incompatible for use with CE/CSN of this radio?

Or is the RF24 library which works great on the Arduino Uno incompatible with the Dash? If so, any particular reason why? Thanks in advance!


#2

I was able to get it to work by modifying RF24.cpp such that beginTransaction passes in the csn_pin value, and removed the #if around endTransaction:

inline void RF24::beginTransaction() {
	_SPI.beginTransaction(csn_pin);
	csn(LOW);
}

inline void RF24::endTransaction() {
	csn(HIGH);
	_SPI.endTransaction();
}

I am not entirely confident of the code changes I would need to submit back to the RF24 project to do a pull request, however. Are there any defined values I can #if on to have Hologram-specific code?


#3

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