I have been using SAMD21 and the Tickless FreeRTOS coming with ASF.
When I switched to tickless I have removed the Systick driver from ASF and substituted my
cpu_delay_ms( ) with
vTaskDelay( ) available through FreeRTOS, however, I require couple of delays inside some of the i2c callback methods in which are operating outside of the body of my tasks and (in the hard way) I realised, since I am not issuing the
vTaskDelay( ) inside the body of the task, I don’t get a delay.
So now I am looking for a solution which could mimic a ms delay (in a rough ms ballpark) without enabling and initializing the Systick and using
cpu_delay_ms( ), which I believe would cancel out the benefits of switching to a tickless edition.
Is there such a method you could suggest that I could use all over the code which would delay for the required amount of ms regardless of the place the delay is used?
PS: please correct me if any of my assumptions where wrong.