cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS: LED not blinking with Blue Pill board

Muhammad_Umer_Asif
Associate II

Split from USART in Proteus not displaying any characters as this is now a new situation (real hardware; not simulation)


Now as per your advise i have moved from simulation to real hardware can you please why under freertos its not working the led is counitnusly onn instead of blinking?

  • Working behavior:

    • LED blinks correctly without FreeRTOS using a simple while loop in the same setup .

    • Flashing and debugging via ST-LINK works without issues.

  • Problem:

    • When FreeRTOS is enabled, the LED stays continuously ON instead of blinking under the same hood .

  • CubeMX configuration:

    • FreeRTOS enabled (CMSIS V2)

    • Default task created

    • USE_NEWLIB_REENTRANT enabled in FreeRTOS advanced settings

    • SYS timebase tested with:

      • SysTick

      • TIM1

    • GPIO PC13 configured as:

      • Output ( that is fine as it worked without freertos but stays counitnuoly on with freertos )

  • Code behavior:

    • Using osDelay() inside the task

    • Same toggle logic works outside FreeRTOS but not inside

  • What I have tried:

    • Switching between SysTick and TIM1 timebase

    • Re-generating code multiple times

    • Verifying task loop logic

    • Replacing HAL_Delay with osDelay

  • Question:

    • Why does the LED remain ON when FreeRTOS is enabled instead of blinking can you please check configurations for freertos ?

    • Is this related to timebase configuration, scheduler issue, or HAL vs RTOS conflict?

    • What am I missing in my configuration ?I m so confused here why it might beahvees like this  i  have attached the project folder can you please check this and inform where is an actual issue underlying?

Any help or suggestions would be appreciated. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

As stated by the OP in this post, he's using a Blue Pill board.

As ST we cannot help on that.

I suggest you to purchase a ST board with a genuine chip for example NUCLEO-F103RB, so we will happy to help you.

Thank you for your understanding.

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.

View solution in original post

2 REPLIES 2
Andrew Neil
Super User

@Muhammad_Umer_Asif wrote:

i have moved from simulation to real hardware 


So what hardware are you using ?

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

 

What debugging have you done ?

Is your code which blinks the LED ever getting called ?

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Employee

As stated by the OP in this post, he's using a Blue Pill board.

As ST we cannot help on that.

I suggest you to purchase a ST board with a genuine chip for example NUCLEO-F103RB, so we will happy to help you.

Thank you for your understanding.

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.