Skip to main content
Graduate
May 13, 2024
Question

STM32F407VETx - LED blink without freeRTOS - but as soon as i activate it nothing happens

  • May 13, 2024
  • 3 replies
  • 3818 views

Hello together,

even this is freeRTOS related, i hope this is the correct place for my problem.

I have the following Board with an STM32F407VET:

STM32F407VET6_Industrial_Board.jpg

I started from a github repo with a working configuration:
https://github.com/art103/JZ-F407VET6

I removed everything I don't need in my .ioc file, created the code and added the following files to the while()-loop in the main function:

HAL_GPIO_TogglePin(GPIOE, LED1_Pin);
HAL_Delay(500);
HAL_GPIO_TogglePin(GPIOE, LED2_Pin);
HAL_Delay(500);
HAL_GPIO_TogglePin(GPIOE, LED3_Pin);
HAL_Delay(500);

and I can see that the LEDs are changing, so I expect the basic setup is correct.
But as soon as I add freeRTOS to my project, create the code again and add the following code to my only task:


for
(;;)

{

osDelay(100);

HAL_GPIO_TogglePin(GPIOE, LED1_Pin);

osDelay(100);

HAL_GPIO_TogglePin(GPIOE, LED2_Pin);

osDelay(100);

HAL_GPIO_TogglePin(GPIOE, LED3_Pin);

osDelay(100);

}

 

nothing happend, it looks like this Task is never started at all.


I use CMSIS_V2 interface for freeRTOS, changed the USE_NEWLIB_REENTRANT to true and switched under "SYS" the Timebase Source to TIM6.

I use STM32CubeIDE with Version: 1.15.1.

 

It would be really great if someone could give me a tip as to what I'm doing wrong

 

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    May 13, 2024

    Hello,

    Need to attach your project including the ioc file, so I will try to have a look.

    splasherAuthor
    Graduate
    May 13, 2024

    Thanks, i've zipped my whole project.
    It's a C++ project - if that is important somehow.


    Maybe I should add that I'm unable to flash via STM32CubeIDE with my ST-Link V2 "CN edition".
    GenerateIntelHexFile.PNG

    So i'm creating the .hex file and flash it via the STM32 ST-Link Utility

    splasher_0-1715615611556.png

     

    Technical Moderator
    May 13, 2024

    Hello,

    I've ported your project to STM32F4-Discovery board and I didn't reproduce the issue.

    The LEDs (three LEDs) are toggling well in StartDefaultTask().

    I'm attaching the project (I just introduced a modification on PD12 to PD15 gpio pins to be as outputs for LEDs + Clock config to adapt it to the disco board).

    PS: ST-Link Utility is a deprecated tool and no more supported. Use STM32CubeProgrammer instead.

    Visitor II
    June 23, 2024

    Hello, I am having trouble finding the Datasheet of the exact development board based on (STM32F407VET6) you are using, Could you share where you got your datasheet.

    splasherAuthor
    Graduate
    June 24, 2024

    https://github.com/art103/JZ-F407VET6

    There is one pull request where the pdf is attached.

    That's everything I found