CubeIDE 1.4 Hangs Using FreeRTOS
- 6 replies
- 1965 views
Hello everyone,
I have Nucleo-L4P5ZG and the development environment is WIN10 , CubeIde1.4 and CubeMx 6.2.
I am facing a strange behavior while I'm trying to debug a simple FREERTOS toggle Led code here are details:
1- I started with Cube Mx and generated code for Cube IDE with the following configurations:
- Only GPIO Pin PB7 [LD2= Blue Led on Nucleo] configured as output
- Sysclk = 120 MHz drived by PLLCLK which is drived by MSI = 4MHz
- Select FreeRtos Support without creating any OS resources except the Default task
- Select TIM7 as a systick timer
and that's it.
2- I put the toggle led code in the default task
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1000);
HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_RESET);
osDelay(1000);
HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_SET);
}
/* USER CODE END 5 */
}3-Everything is working fine without launching the debug session
4-When I started debug session the code stops at main function as expected and when I pressed the play button the Led started to toggle
5- when I stopped and relaunched the debug session I noticed that code doesn't stop at main function and
- LD2 Blue Led is not toggling
- LD3 [RED Led on Nucleo] and LD8 are on
6- when I stopped and relaunched the debug session again everything works as expected but this scenario must be repeated (one time debug hangs and nothing works then the next one everything is perfect)
I need to know the reason behind this hang behavior?
Thanks in advance.
Edit: Project is attached
