MicroSecond Delay in FreeRTOS
I am dealing with an I2C lockup issue where the I2C bus is locked up periodically and I need to toggle the SCL pin to free up the bus. To test my theory and make sure that the fix works I just used an osDelay(1) call. I know this is a 1ms delay but it was enough to prove that if I do that it fixes my problem. However, there is no reason to take up an entire 20 ms to complete this operation (from what I've read it's recommended to toggle 10 times to reliably unlock the bus) when 20us is enough. How would I implement a 1us delay function or is there one already available to use?
