cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong code creation with STM32CubeMX V. 5.0 for STM32H743 and FreeRTOS

GS1
Senior III

I am working on a project with several STM32H743 processors, TouchGFX and FreeRTOS active. The board with the LCD and TouchGFX is already working, but is not yet completely finished.

Now I converted the project to work with the latest release of STM32CubeMX Version 5.0 and after converting the project the board did not work anymore. When debugging it the Hard fault interrupt is entered short after startup of the system.

Up to now I can report the following 4 issues:

1. HAL_SYSTICK_Config and according initialisations are missing. I had to add the following function, which is now called after SystemClock_Config() is called in the main function:

void SysTickEnable(void)

{

   /**Configure the Systick interrupt time

   */

 HAL_SYSTICK_Config(SystemCoreClock/1000);

   /**Configure the Systick

   */

 HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

 /* SysTick_IRQn interrupt configuration */

 HAL_NVIC_SetPriority(SysTick_IRQn, 15, 0);

}

2. Systick Handling in stm32h7xx_it.c / .h is missing

void SysTick_Handler(void);

/**

* @brief This function handles System tick timer.

*/

void SysTick_Handler(void)

{

   /* USER CODE BEGIN SysTick_IRQn 0 */

   /* USER CODE END SysTick_IRQn 0 */

  osSystickHandler();

    /* USER CODE BEGIN SysTick_IRQn 1 */

   /* USER CODE END SysTick_IRQn 1 */

}

3. in FreeRTOSConfig.h uncomment the entry for SysTick_Handler:

/* IMPORTANT: This define is commented when used with STM32Cube firmware, when timebase is systick,

             to prevent overwriting SysTick_Handler defined within STM32Cube HAL */

//#define xPortSysTickHandler SysTick_Handler

4. in the Keil project tree the file system_stm32h7xx.c is included twice under Drivers/CMSIS which causes the linker to create errors due to double declarations. I have to delete this file from the tree every time after generating code.

Hope this information helps others and these issues will be fixed soon.

Actually I am wondering what is behind these changes in the new code creation concerning sysTick_Handler.

1 REPLY 1
GS1
Senior III

Second project converted to V. 5.0. This one uses SD-Card FAT-FS and has now created 3 compiler errors:

Declarations were missing in bsp_driver_sd.h for:

__weak void BSP_SD_WriteCpltCallback(void);

__weak void BSP_SD_AbortCallback(void);

__weak void BSP_SD_ReadCpltCallback(void);

When I read all the threads on STM32CubeMX 5.0 I hope that the extremely slowed down GUI and the issues I found up to now are the only things which I have to accept...