2016-01-28 12:36 PM
I generated a project for the STM32L476 Discovery board using CubeMX 4.12.0 and Firmware Package for STM32L4 release 1.2.0 that would never break out of HAL_Delay().
I selected FreeRTOS and USB Device CDC middleware and setup other pins and peripherals as per normal. In the generated stm32l4xx_it.c file the following SysTick_Handler() was created.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 */}Note the lack of a call to HAL_IncTick(); By leaving out that call every instance of HAL_Delay became an infinite loop. There happens to be a call to HAL_Delay in the usb init code so...Easy find and fix, but seemed like something that should have been in the generated source output by CubeMX. Maybe there is the expectation of the developer adding it in somewhere else? All the included examples show it in the handler called before the osSysTickHandler().Love the tools, keep up the good work.2016-01-28 11:10 PM
Hi dziengeleski.seth,
The issue is already reported.You find the official response from our MX team in this [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/CubeMX%204.12.0%20Bug%20Report&FolderCTID¤tviews=68]post-Syrine-