2019-06-02 11:00 PM
/* Create the timer(s) */
/* definition and creation of myTimer01 */
osTimerDef(myTimer01, Callback01);
myTimer01Handle = osTimerCreate(osTimer(myTimer01), osTimerPeriodic, (void*) 1);
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
osTimerStart(myTimer01Handle, 1000);
/* USER CODE END RTOS_TIMERS */
/* Callback01 function */
void Callback01(void const * argument)
{
/* USER CODE BEGIN Callback01 */
switch((uint32_t)argument)
{
case 1:
HAL_GPIO_TogglePin(GPIOA, USERLED2_Pin);
break;
}
/* USER CODE END Callback01 */
}
I track program execution, Callback01() can execute, but switch((uint32_t)argument) skips execution. I don't know where the problem is. How to check the problem.