My question is about implementing the functionality of HAL_Delay(), which is implemented based on the SysTick timer tick count. In my FreeRTOS project, I am using another timer, namely TIM1, therefore using HAL_Delay() doesn’t give me correct behaviour. I would like to write my own function to create a delay in a FreeRTOS task, without leaving that task, but I am not sure how to start off. Suggestions appreciated, thank you!
Note: vTaskDelay() causes the task to be blocked, and therefore does not do what I want.
My first comment is why? The main reason for using something like a RTOS is to get something like task switching so that while one piece of code is waiting for somethng, other parts can run.
Second is that generally (you don’t say what processor your using), functions like HAL_Delay() are fairly easy to change what timer they are using, so making HAL_Delay work should be that hard, and if you are using other parts of the HAL package, may be important to get to work.