cancel
Showing results for 
Search instead for 
Did you mean: 

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

splasher
Associate II

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

 

7 REPLIES 7
SofLit
ST Employee

Hello,

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

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.

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

 

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.

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.

Thanks a lot for your help. I have another board, I'll try it.

So if the other board is also not working with freertos is there something else I can do?

For me it's super wired that everything is only working without RTOS.

Is there another dev board with ethernet available which is freeRTOS tested?

:(

Thanks for your help 

 

Update: other board is also not working 

Update2: I tried to flash the program without freeRTOS with STM32CubeProgrammer => working, but as soon as I enable freeRTOS the issue is back - nothing happens :(

That's weird! And yet I didn' change much to your code and I didn't touch to your project settings!

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.
M4E5TR0
Associate

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.

splasher
Associate II

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

There is one pull request where the pdf is attached.

That's everything I found