cancel
Showing results for 
Search instead for 
Did you mean: 

SP_BTLE returning hardware error and RF_868 entering lock state

euclid
Associate

We use STM32L162xx MCU to communicate with S2_LP and SP_BTLE drivers via SPI.

 

With S2-LP, it returns the MC_STATE as READY during inital setup for power , sync word etc.

But when I Strobe the RX command it returns MC_STATE as LOCK_ST(0x14). 

DMA is enabled for SPI tranfer and we user HAL_SPI_TransmitReceive_DMA(...)  to clock out the bytes.

Similarly for SP_BTLE, As part of initialisation we perform hard reset followed by reading version from SP-BTLE chip:

s part of the BLE initialization, following a hard reset the firmware  attempts to read the Version from SP-BTLE
  1. enable chip select (configured as active low)
  2.  Write Send command(0x10) via SPI and receive a 2 byte response from chip (0x02 and 0x7f)
  3. Disable chip select (with Time delay)
  4. Enable chip select (with minimum delay)
  5. Send actual command to read version ogf = OGF_INFO_PARAM(0x0004), 0cf = OCF_READ_LOCAL_VERSION(0x0001)
  6. Disable chip select.
  7. Wait for interrupt event.
  8. enable chip select.
  9. Write Receive command(0x0b)via spi .
  10. Returns the number of bytes to be read back
  11. Disable and Enable Chip select with time delay(if I perform this routine , not receiving the correct data)
  12. Write command 0xFF to read the next set of bytes
    1. first response contains 6 bytes, with response type as HCI_EVENT_PKT and event set to EVT_VENDOR
    2. Disable chip select GoTo Step 8
    3. Second response contains 4 bytes ,  with response type as HCI_EVENT_PKT and event set to EVT_HARDWARE_ERROR(In this case when I compared with old code base the actual  number of bytes to read should be 15 and the event should be set as EVT_CMD_COMPLETE

Based on the above observations , I suspect something isn't correct with SPI config . Could you provide any suggestions.

0 REPLIES 0