Skip to main content
Associate II
May 4, 2026
Solved

Toggling LED on STM32WBA25CE1 in the task

  • May 4, 2026
  • 4 replies
  • 151 views

I am using NUCLEO-STM32WBA25CE1. I created STM32CubeMX project for this board. I activated RF, WPAN, RTC. I configured a wakeup every 10 seconds and set up a task for the sequencer to toggle the LED. The LED pin is correctly configured. I can toggle the LED before the main loop starts. But in the task LED toggling is not working. How should i configure GPIO and anything else to get LED working?

I am using STM32CubeMX 6.17.0 and STM32CubeIDE 2.1.1 versions.

Moreover, I try to use USART1 or LPUART1 for debugging. Before the MCU goes into low power mode, i can output the message to the terminal. But after the low power mode it stops working.

Best answer by Joe_

Hi,
Which low power mode are you using?

Furthermore, I recommend that you take a look at basic projects such as the BLE_HeartRate, which uses low power and transmits data every second.
You can find the example here:
STM32CubeWBA/Projects/NUCLEO-WBA25CE/Applications/BLE/BLE_HeartRate at main · STMicroelectronics/STM32CubeWBA

BR, Joé

4 replies

mƎALLEm
Technical Moderator
May 4, 2026

Hello,

As admin, let me intervene here. You said in the title: "Toggling LED on STM32WBA25CE1 in the task".

What RTOS are you using? ThreadX, FreeRTOS? you didn't tell in your post.

Please review How to write your question to maximize your chances to find a solution

Also need to separate questions in the community. For the last question, please post a new thread for it.

Thank you.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
suiunbekAuthor
Associate II
May 4, 2026

Thank you for pointing me to the "How to". I will follow the recommendations next time.

 

I am using bare metal. STM provides the sequencer to manage various tasks. I created my own task to toggle the LED. I configured pins according to UM3610.

I think the second question is similar to this one. If i get this resolved i will check again if i need to post a separate post.

Joe_Answer
Technical Moderator
May 4, 2026

Hi,
Which low power mode are you using?

Furthermore, I recommend that you take a look at basic projects such as the BLE_HeartRate, which uses low power and transmits data every second.
You can find the example here:
STM32CubeWBA/Projects/NUCLEO-WBA25CE/Applications/BLE/BLE_HeartRate at main · STMicroelectronics/STM32CubeWBA

BR, Joé

suiunbekAuthor
Associate II
May 13, 2026

Dear Joe,

thank you for the direction. I looked at HeartRate project. Although it does not use the wakeup timer (it uses an alarm), it is a viable solution for me. I think i can close this thread now.

Regards,

Suiunbek