Associate III
December 14, 2019
Question
Free-RTOS on STM32L151C6 using STM32CubeMX [Timing issue]
- December 14, 2019
- 1 reply
- 544 views
Hello,
i am making a simple project for STM32L151C6 using Cube. I am using as timing source the TIM2 and i just use the below code to toggle a LED:
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
/* init code for USB_DEVICE */
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin); //Toggle the state of pin
osDelay(50);
}
/* USER CODE END 5 */
}The problem is that HAL_GPIO_TogglePin() is executed not every 50 mSec but every 6-7 seconds.
Is there something is missed out during configuration? I am attaching the Cube file.
