Skip to main content
Associate II
November 27, 2024
Solved

Sending a notification causes STM32WB55 to go idle and becomes unresponsive to all further BLE requests

  • November 27, 2024
  • 2 replies
  • 2470 views

Upon triggering a notify event calling the following function "Custom_STM_App_Update_Char()", the STM32 successfully sends data, which I receive on my iPhone using ST BLE Toolbox. However, after that, the STM32 becomes unresponsive to further BLE requests. I can see that the system hasn't crashed, as it is continusouly calling "UTIL_SEQ_Idle".

I am using a BLE application: server profile with a custom profile. I have already seen the other forum post titled "STM32WB55 Stops handling events after sending a notification" which sounds similar to this, but I am not deliberately pausing or stopping the sequencer at any point (as far as I'm aware).

Another unusual thing I've noticed, is that every other characteristic has been given a handle for the function "Custom_STM_Event_Handler(void *Event)" in "custom_stm.c", which I am able to use to call other functions to handle thos events, however, for my notify event, I can only see handles for NOTIFY_ENABLED_EVT / NOTIFY_DISABLED_EVT which aren't of much use to me.

Best answer by mbedt

I've found the issue, for those that might be interested. I had called "Custom_STM_App_Update_Char()" through a standard interrupt - the sequencer did not like this!

Having registered the task using UTIL_SEQ_RegTask() and executed it using UTIL_SEQ_SetTask(), all was right with the world. Hope this helps others.

 

Thanks

2 replies

STTwo-32
Technical Moderator
November 28, 2024

Hello @mbedt 

Are you able to reproduce this issue using the last version of the STM32CubeWB (V1.21.0)

Best Regards.

STTwo-32

mbedtAuthor
Associate II
November 28, 2024

I've just tried updating to v1.21 and it seems to have caused further issues.

It still functioned after changing to v1.2.1 but the BLE code wouldn't intialise, meaning I couldn't connect to it at all via BLE / ST BLE Toolbox, even though it was looping through MX_APPE_Process() and UTIL_SEQ_Idle(void) with the debugger.

Moving back to the previous version, v1.19.0, it still no longer works. Is there a way to factory reset or is the device bricked?

STTwo-32
Technical Moderator
November 28, 2024

Hello @mbedt 

First, are you using an ST Board or your own HW?

In both cases, could you please share your the FUS and stack that you are using (you may can perform a test using one of our examples).

Best Regards.

STTwo-32 

mbedtAuthorBest answer
Associate II
December 19, 2024

I've found the issue, for those that might be interested. I had called "Custom_STM_App_Update_Char()" through a standard interrupt - the sequencer did not like this!

Having registered the task using UTIL_SEQ_RegTask() and executed it using UTIL_SEQ_SetTask(), all was right with the world. Hope this helps others.

 

Thanks