STM32WB55 BLE and LPM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-10 11:15 AM - last edited on ‎2025-06-11 2:29 AM by STTwo-32
Hello,
I am using p-nucleo-wb55. I have a code with an RTC alarm interrupt triggered every 5 seconds. In the ISR, I set a sequencer task that sends a message via BLE. I have enabled the LPM as I want the MCU to enter sleep mode while it isn't working and only wakeup with the RTC alarm. I realized that the MCU doesn't stay in the sleep mode and when I debug, I realized that it wakes up so fast as the IPCC RX Interrupt is triggered continuously with high frequency.
How can I control this, knowing that I don't need the MCU to do any task through those 5 seconds, I just want it to sleep and wakeup only after 5 seconds.
Thanks in advance
- Labels:
-
BLE
-
Power
-
STM32WB series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-11 2:55 AM
Ahlin @MahmoudAhmed11 and welcome to the ST Community.
Could you try to disable the IPCC RX Interrupt and all unnecessary interrupts before entering the Sleep mode and reenable them directly after the wake-up.
Best Regards.
STTwo-32
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-11 2:09 PM - edited ‎2025-06-11 2:10 PM
Ahlin @STTwo-32 , thanks for your reply.
If you mean trying HAL_NVIC_DisableIRQ(IPCC_C1_RX_IRQn); before entering the sleep mode and HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); after it.
Yes, I tried that, and for some reason, the code enters hard fault ISR and gets stuck in the while(1) at some point. I have asked an AI if this solution is possible, and he replies that it isn't possible as disabling it will break BLE Stack operations, and in fact, it doesn't just affect the BLE, it makes the whole application stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-12 1:51 AM
Hello @MahmoudAhmed11
Could you try to use to tasks one is the sending task, and the other one is the IDLE task that take the system to sleep mode when there is no transmission. and for the 5 seconds interval, you may use a HW timer. More details are available on the AN5289;
Best Regards.
STTwo-32
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 8:35 AM - edited ‎2025-06-18 2:20 AM
Yes, I made only one task that is triggered from the ISR that happens every 5 seconds, and since there aren't any other tasks, the sequencer enters the stop mode. The problem is that it wakes up quickly due to the IPCC RX interrupt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-23 12:38 AM
Hello,
would it be possible to share the project?
Thank you.
Best regards,
Filip Kremen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-07-05 5:26 AM
Hello @FilipKremen
Thanks for your message.
Unfortunately, I can't share the project as it's confidential.
But if you can make a simple example that sends dummy data via BLE every 1 minute and enters sleep mode and never wakes up unless the minute is finished, this will be very helpful, and I will really appreciate that.
I think I can compare it with my project to understand the problem or consider it as a template.
Also, I will try to communicate with the client and ask him if he doesn't mind if I share the project with you.
Thanks for your consideration.
Best Regards,
Mahmoud A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-07-17 4:22 AM
Hello,
I apologize for late reply due to my vacation.
Can you please visit this topic on ST community?
Sending sensor data via BLE - Page 2 - STMicroelectronics Community
It's similar to your needs and there is attached project.
After certain interval, RTC wakes up the MCU and the data from sensor are read and sent via BLE.
You can set the sleep mode by disabling stop and standby mode. More information can be found here.
How to build wireless applications with STM32WB MCUs - Application note
UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_DISABLE);
UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_DISABLE);
Also, please note that CFG_DEBUGGER_SUPPORTED must be set to 1 if you want to use the debugger in low power mode.
Please let me know, if you need further help.
Best regards,
Filip Kremen
