2023-02-09 10:15 AM
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.
The error is:
2023-02-10 06:15 AM
>>send data through BLE every specified duration (e.g. 1s)
Youre talking about BLE characteristic notification.
How long is your data?
2023-02-12 01:51 AM
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.
2023-02-16 11:12 AM
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
2023-03-11 05:32 PM
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?
2023-03-11 05:33 PM
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?
2023-03-16 11:05 AM
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
2023-03-16 11:33 AM
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.
2023-03-20 02:56 AM
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