I want to make some delay to the microcontroller based on the number of clock cycle. What API can I use it?
I'm trying to control the timing of ADC for best performance.
So, I want to give exact delay based on the number of clock cycles.
However, I don't know what API should I use to give delay.
Right know, I turned on TIM16 and I know how to get timer like below.
t = __HAL_TIM_GET_COUNTER(&htim16);
I also know HAL_Delay(ms); commend but sometimes it doesn't work.
Is there any method give delay to the microcontroller based on the number of clock cycle?