The serialBLEbridge project found here:
processors.wiki.ti.com/.../SerialBLEbridge_V_1.4.1
It is great... I have modified it to work on the keyfob kit with a CC2540.
I am working on creating a BLE -> Zigbee translator for a product. I'll be using the CC2540 (SPI master) to communicate with a CC2520 (SPI slave) over SPI.
The SPI interface that is available in the SerialBLEbridge project requires hardware handshaking, which is not really normal for SPI. I am having a little trouble getting the handshaking out of there as the whole library relies on the ready signal dropping to create an interrupt that handles various things required for the system to work.
Any advice for switching this to a normal SPI interface? I have tried HAL_SPI = TRUE but it requires hal_spi.h which doesn't seem to exist in the BLE stack. Or is there a good way to wire the CC2540 -> CC2520 so that the handshaking requirement is satisfied.
Here's a copy of the comments from the top of _hal_uart_spi.c
5 GPIO lines are required: MOSI, MISO, SPI Clock, SPI CSn/MRDY, and SRDY.
MRDY/CS = SPI Master Ready to send and serves as a SPI Slave wakeup from sleep.
SRDY = SPI Slave Ready to send and serves as a SPI Master wakeup from sleep.
The SRDY output from SPI Slave to SPI Master will transition from high to low
if the SPI slave receives an MRDY falling edge ISR from the SPI Master. But, if
the SPI slave has nothing to send, the SRDY line will be pulled high again.