Black, Bluetooth nRF8001, and SPI

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
motorheath
 
Posts: 1
Joined: Sat Aug 02, 2014 8:27 am

Black, Bluetooth nRF8001, and SPI

Post by motorheath »

Has anyone worked on connecting the nRF8001 Bluetooth module to the Beaglebone Black through its native SPI pins? I'm a noob, and the solution is eluding me.

The nRF8001 exposes the standard SPI lines, REQN (for CS0), MOSI/MISO (D1/D0), AND SCK (SCLK). But, additionally it uses a RDY signal to indicate when it is ready to receive information and/or ready to send information. It's how to properly implement this RDY signal that confounds me. The literature suggests the RDY signal is provided in response to the REQN/chip select. So the native processor (Sitara) as well as Linux kernel would need to incorporate it into their operation of the protocol. The Sitara documentation suggests that one interrupt is available for all SPI operations -- but how that interrupt is handled or exposed is beyond my brain.

I have seen some weak indications that the kernel SPIDEV might handle a RDY type signal attached to the SPIO. After not enough Googling I've seen some old code that declares a mode-flag/mask for 'ready' with humorous comments about the chip being not ready -- but I never see the literal referenced. Then there are some device tree discussions about supplying GPIO pins for chip selects. But I don't recall seeing anything to tie a GPIO to a RDY type signal.

So any ideas here would be appreciated.
1) Is there or should there be a SPI-with-RDY-variant-device driver?
2) Is the solution so obvious that it would bite?
3) Would it be reasonable to slow down the 'baud' rate, and ignore the RDY signal altogether assuming that the chip will be ready within a certain number of clock cycles?
4) Or should I consider writing a bit-banged version of SPI through the GPIO? (BTW the Adafruit Arduino examples for nRF8001 seem to implement a bit-banged version of SPI -- they work great on the UNO).

Thanks in advance,
Heath

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”