Skip to main content
SWong.10
Associate II
February 9, 2023
Question

How to use timer interrupt to trigger the sending of BLE data every specified second for STM32WB5MMG using STM32CubeIDE?

  • February 9, 2023
  • 8 replies
  • 7406 views

Hi,

I'm using STM32WB5MMG and want to send 8-bit data through BLE every specified duration (e.g. 1s). I have tested the Bluetooth and timer interrupt separately and both works fine. However, when I tried to trigger the Bluetooth using timer interrupt as shown in the following code, both stop working.

0693W00000YAOY8QAP.pngThe error is:

0693W00000YAX34QAH.png 

This topic has been closed for replies.

8 replies

Javier1
Principal
February 10, 2023

>>send data through BLE every specified duration (e.g. 1s)

Youre talking about BLE characteristic notification.

How long is your data?

hit me up in https://www.linkedin.com/in/javiermuñoz/
SWong.10
SWong.10Author
Associate II
February 12, 2023

Hi,

The data is 8-bit. I have tested the Bluetooth separately and it is able to send data successfully. The problem is when I tried to use timer interrupt to trigger the Bluetooth. Or is there other methods to send the data every specified second without using timer?

I'm quite new to this and any reply would be appreciated.

Thanks.

Jtron.11
Senior
March 12, 2023

Hi SWong,

I am sorry to intrude your thread question. I am trying to implement the BLE communication with STM32WB5MMGH with my customer board. I am able to load BLE_HeartRate example that I got from STM32 example successfully, but when I tried to implement my own custom template because I don't want to use HeartRate BT SIG, I never successfully get BLE advertises nor seen by ST BLE tool box.

Can you please give me some advices or suggestions about your approach how did you do implement BLE on your application?

Remy ISSALYS
ST Technical Moderator
February 16, 2023

Hello,

You can look BLE_HeartRate example available in STM32CubeWB package which allow to send heart rate measurement to the smartphone each second through BLE using a timer (see TimerMeasurement_Id) which trig a task (see CFG_TASK_MEAS_REQ_ID) that send data each second.

Best Regards

Jtron.11
Senior
March 12, 2023

Hi Remy,

May I ask if there is any video or any document showing how to develop a simple BLE using custom template that can send and receive data from ST BLE tool box for STM32WB5MMG mcu?

Remy ISSALYS
ST Technical Moderator
March 16, 2023

Hello,

You can look this wiki page which describes how to generate a Bluetooth® Low Energy (BLE) server custom application for STM32WB55RG MCU using STM32CubeMX software.

Best Regards

Jtron.11
Senior
March 16, 2023

Remy,

Thank you for your pointer. Just for my confirmation, the STM32WB5MMG will work exactly like STM32WB55RG MCU if I follow the wiki page? I already tried it before I asked the question anyway. Is there any additional step I need to do extra for STM32WB5MMGx?

Also, is there any github so I can download the source code as the wiki page example?

The reason I asked because after I follow the steps and the code was generated, I still see there is a missing function call  APPD_Init(); under APPE_Init() function.

Remy ISSALYS
ST Technical Moderator
March 20, 2023

Hello,

Yes, the STM32WB5MMG will work exactly like STM32WB55RG MCU. There isn't additional step for STM32WB5MMGx. The source code generated with STM32CubeMX tool describes in the wiki is available in STM32CubeWB Package see BLE_Custom project.

You can also find some examples running on the discovery kit which embeds the STM32WB5MMG in the STM32CubeWB package.

Best Regards