Question
SPBTLE-RF dialog over SPI
Posted on March 31, 2016 at 11:41
Hi,
I'm currently working on using SPBTLE-RF module with the evaluation board of the KL25Z from Freescale.After I set up the SPI interface, I tried a byte-communication with the module by sending Write Header ( 0x0a, 0x00, 0x00,0x00, 0x00), some data (supposed to be HCI command, see further) and then the Read Header ( 0x0b, 0x00, 0x00,0x00, 0x00) in order to get something in return . Here is what I send/receive :---- START ----****
SLAVE HEADER WRITE
0x02 0x7F 0x00 0x07 0x00
****
Received : 0xFF
Sent : 0x01
Received : 0xFF
Sent : 0x09
Received : 0xFF
Sent : 0x04
Received : 0xFF
Sent : 0x00
****
SLAVE HEADER READ
0x02 0x00 0x00 0x00 0x00
****
---- END ----Whenever I try to read some data (by sending read header) coming from the module after performing a write operation (by sending write header, even without data), the slave seems to announce that he's ready (CTRL byte = 0x02) but he hasn't anything to offer (W/RBUF_lo/hi = 0x00).Plus, if I try to read data without sending any write request before, here is what I get :---- START ----
****
SLAVE HEADER READ
0x02 0x7D 0x00 0x07 0x00
****
READ RECEPTION BUFFER
Received : 0x04
Received : 0x0F
Received : 0x04
Received : 0x01
Received : 0x01
Received : 0x09
Received : 0x04
---- END ----I'm quite new to SPI communications, am I doing this right ? About using HCI commands, is there any special formatting step before sending that I could missed ? Is it even possible to send that kind of frame with direct bytes on the SPI bus ?Thanks,B.TOMAS #hci #spi #kl25z #spbtle-rf