AnsweredAssumed Answered

Problem with SPBLE-RF SPI commands

Question asked by marco.v83 on Nov 21, 2016
Latest reply on Nov 22, 2016 by marco.v83
Hello everyone!

I'm working with ST SPBLE-RF using the C code driver provided for BlueNRG-MS. I ported it for an ST8L151G6 microcontroller; the SPI communication works, the device answers correctly (0x02 and the R/W buffer sizes), it pulls up the IRQ pin etc. It sends the vendor specific event (0x04FF03010001) indicating it is initialized. My problem is with all the other commands; i tried (following the examples in the stack) to set the MAC address with the API, but it always return an error, not a timeout but instead of a 'command complete' event i receive a 'command status' with the data 0x040F0101FC0C. The code (inside the hci_send_req API) checks the returned data (in the SPI_IRQ ISR) but it stops because it checks for r->event (always set to 0) and then the third byte (01) of the received data, that it is not null and so it fails. The same problem is found with every command (set TX power, read configuration etc)

What is the problem? someone has some indications? there is something i missed in the initialization of the module?

Thanks everyone.