2015-12-15 01:38 AM
Hi all,
Could someone also verify if there is a bug inside cube. Steps involved to reproduce: 1. Generate basic template (stm32f407 discovery in my case) inside CubeMX 2. Inside main file write: char buffer[]=''some text\n\r''; while (1) { HAL_UART_Transmit(&huart6,buffer,strlen(buffer),200); HAL_Delay(1000); } Result: it works. Now repeat same procedure but add FreeRTOS support. Before kernel init and start run the same code. while(1){ HAL_UART_Transmit(&huart6,buffer,strlen(buffer),200); HAL_Delay(1000); } /* USER CODE END 2 */ /* Call init function for freertos objects (in freertos.c) */ MX_FREERTOS_Init(); /* Start scheduler */ osKernelStart(); HAL_Delay function doesn't work!2015-12-15 01:46 AM
Hi,
Although i am new to FreeRtos & CMSIS i guess you need to use osDelay(xx) instead of HAL_Delay(xx)Rob2015-12-15 03:23 AM
Hi,
It's normal HAL_Delay use the ticks timer interrupt and freeRTOS too. see my anwer to thomas, here https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/STM32CubeMx%204.12.0%20freertos%20missing%20HAL_IncTick()%20in%20SysTick_Handler()2015-12-15 08:03 AM
It seems that this same issue is making LwIP halt in ethernet configuration.
Stm32f4 with expansion board (ethernet) doesn't work and halts on HAL_Delay. /** * @brief Initializes the Ethernet MAC and DMA according to default * parameters. * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) .... HAL_Delay(PHY_RESET_DELAY); ....2015-12-20 03:31 PM
Seems to be an issue with the new 4.12 driver update to CubeMX. Didn't have this issue with the previous version. Same issue here where the SD Driver won't ever start because HAL_delay() never exits when FreeRTOS is enabled.
2015-12-21 01:54 AM
Have you worked out any solution maybe?