When using FreeRtos, you should normally be using osDelay().to apply a delay timing within a thread. osDelay calls vTaskDelay which puts the thread on the delay queue to be reawakened some number of ms from now which permits the kernel to immediately allow another thread to execute.
This works very well in all cases with the sole exception that FreeRTOS incorrectly handles tick timing management in tickeless low power modes where threads are currently blocked by osDelay. I've been working on an experimental mod to FreeRTOS which extends the normal tickless sleep method to accommodate threads on the delay queue..
when I put break point in the HAL_TIM_IRQHandler(&htim6);. It does not go to the timer handler.. I checked the NVIC while debug .. all regiters are set to 0x0 .. I think its problem that tim6 does not launch but i am not sure
I've had similar issue using a B-L475E-IOT01A eval board. I was stuck in the HAL-Delay(). It turns out that when i used CubeMX to generate code, that the Clock configuration was not set up correctly. So i would check to make sure your Clock configuration is correct and if you're using the external crystal check with an oscilloscope to see if it is clocking.
If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
HAL_NVIC_SetPriority(SysTick_IRQn, 15, 0); // Least priority, worst possible setting for a value you expect to tick under interrupt context everywhere else
/* Set Systick interrupt in high priority for HAL_Delay() */
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); // Use this to ensure it fires
The HAL_NVIC_SetPriorityGrouping() should create 16 levels of preemption
/**
* @brief This function configures the source of the time base: * The time source is configured to have 1ms time base with a dedicated * Tick interrupt priority. * @note This function is called automatically at the beginning of program after * reset by HAL_Init() or at any time when clock is reconfigured by HAL_RCC_ClockConfig(). * @note In the default implementation, SysTick timer is the source of time base. * It is used to generate interrupts at regular time intervals. * Care must be taken if HAL_Delay() is called from a peripheral ISR process, * The SysTick interrupt must have higher priority (numerically lower) * than the peripheral interrupt. Otherwise the caller ISR process will be blocked. * The function is declared as __weak to be overwritten in case of other * implementation in user file. * @param TickPriority Tick interrupt priority. * @retval HAL status */__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority){ /*Configure the SysTick to have interrupt in 1ms time basis*/ HAL_SYSTICK_Config(SystemCoreClock/1000);