2016-08-31 05:50 AM
Hello!
I use STM32CubeMX, STM32F429ZIT microcontroller project contains FATFX and FreeRTOS. I have three questions:1) When the STM32CubeMXcode generates function MX_FATFS_Init () is in the code void StartDefaultTask (void const * argument). I want to place MX_FATFS_Init () in main (). How do I do it?2) How to pass an argument to a function void StartDefaultTask (void const * argument) and the description of the creation of the task?3) How to enable STemWin in STM32CubeMX project?Help please.Best Regards!Vadim #stm32cubemx-fatfx-freertos2016-09-01 04:53 AM
Hi khodyrev.vadim,
To make the change in the CubeMx generated code, just add you own in the user-code parts /* user code begin */ ... /* user code end */, in that way you will note lose it in the next generation. Be careful, the function will be generated bydefaut in the same place next code generation.Check the ''code generator'' setting and ensure that you pick ''Keep user code when re-generating'' The current CubeMx version does not yet automatically integrate STemWin in the CubeMx project. User should add it by him self in generated project.For further information , check the user manual .-Hannibal-2016-09-08 05:01 AM
Hi,
Hanibal answers the most of your questions except the StartDefaulTask argument. In StartDefaultTask it is recommended to call your own function which initialize the system, start the application tasks and then die. To do this, in freertos.c in the body of StartDefaultTask, before endless loop, add the call to your code which starts the other tasks. Dont forget that this function dont exit. The function have to end with vTaskDelete(NULL) which means to kill the actual task. Regards, Osto