Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


STM32 Freertos - Task gets suspended

Posted by benjamingraef95 on February 7, 2019


I have a problem with my project. I am using a STM32F303 MCU with freeRTOS and everything runs fine until a specific task is send into the suspended state. I never call vTaskSuspend(). I have a total of 7 tasks. One is doing some stuff and blinking an LED approx. every 800ms. Suddenly the LED stops and the task gets suspended ( I checked with the debuger). Then I restart the MCU and the task now is suspended from the beginning, meaning the LED never light up. Any ideas what could be the cause? I am really clueless. I check the stack of every task and no task is running out of stack. Any help is welcome :)

Regards, Benjamin.

STM32 Freertos - Task gets suspended

Posted by rtel on February 7, 2019

Sorry - without seeing some code I can't even begin to guess. However, note that some debuggers will show tasks that are blocked indefinitely (blocked with a timeout of portMAX_DELAY) as being in the Suspended state whereas they are actually in the Blocked state. Does that give you any clues?

STM32 Freertos - Task gets suspended

Posted by benjamingraef95 on February 8, 2019

Thank you for you answer. I wanted to delete my post because the answer to my problem was not related to the code but to the hardware. I could not find where to delete it, sorry for that. Nevertheless, your answer helped me because the debuger showed the task as suspended but it was not, as you said i used portMAX_DELAY and thats why the debugger showed suspended. My MCU got reset due to high negative voltage spices on my 3.3V supply and it behaved like this task was not running.
So problem solved (more or less xD)

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner