Skip to main content
Visitor II
June 27, 2024
Question

How can I make BLE work on STWINKT1?

  • June 27, 2024
  • 1 reply
  • 1160 views

Hi,

I am trying to use the BLE (SPBTLE-1S chip) on my STEVAL-STWINKT1 board. The idea was to use a project example from X-Cube-BLE2 with the following configuration :

HCI_TL : Basic
HCI_TL_Interface : UserBoard
Application : SampleApp

I used the SPI2 to communicate with SPBTLE-1S.

However, I can't communicate with the BLE, the void MX_BlueNRG_MS_Init(void) fails. The function tBleStatus aci_hal_read_config_data(uint8_t offset, uint16_t data_len, uint8_t *data_len_out_p, uint8_t *data) returns BLE_STATUS_TIMEOUT.

Maybe an issue with the clock or/and the spi configurations? Or something else?

I would really appreciate your help.

Thanks.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    June 28, 2024

    Hello @KaisBo7 

    Have you already checked the STSW-STWINKT01 package? We are providing an already ready-to-use SampleApp example that streams some sensor data and controls a led on the board.

     

    Best regards

    Simone

    KaisBo7Author
    Visitor II
    July 1, 2024

    Hello @SimonePradolini,

    Thank you for your prompt response.

    I have indeed tried the STSW-STWINKT01 package, and while it is helpful, my current objective is to utilize the X-Cube-BLE2 middleware for configuring the BLE module. I am particularly interested in setting up a custom BLE configuration using this middleware to better align with my project's requirements.

    Could you provide any guidance or suggestions on troubleshooting the communication issue I am experiencing with the SPBTLE-1S chip when using the X-Cube-BLE2 middleware? Any insights into potential clock or SPI configuration issues that might be causing the BLE_STATUS_TIMEOUT error would be greatly appreciated.

    Thank you for your assistance.

    Best regards,

     

    Kais

    Technical Moderator
    July 2, 2024

    Hello @KaisBo7 

    STSW-STWINKT01 includes the same middleware used in X-CUBE-BLE2. It is older than X-CUBE-BLE2, so it uses an older version of the middleware, but it works in the very same way.

    Let me give you a couple of hints, I wish could help you solving your issue.

    Can you update the BLE middleware in STSW-STWINKT01? You should copy/paste the one from X-CUBE-BLE2. If the STSW example still works, it means that both SPI and BLE configuration in STSW are still valid. So, you can try to use them in your X-CUBE-BLE2 based example.

     

    Best regards

    Simone