cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make BLE work on STWINKT1?

KaisBo7
Associate II

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.

3 REPLIES 3
SimonePradolini
ST Employee

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.