I am trying to create microsecond level delays for an interrupt to be generated. The problem I am facing is that when I go below 60microsecond it starts having a +1.5us offset for prescalar of 215 and the signal edge starts slight fluctuations. That offset goes down to 0.6us if I use a pre-scalar of 107. Also, I am not able to get any delay below 3us. While I expect using the 216Mhz clock I should be able to get minimum 4.629 ns . Can Anybody give some example code or share their experience about the minimum achieveable precise delay in STM32F MCUs. I have attached an excel file of my observations.
I have the following settings:
- Nucleo F767
- 216MHz system clock frequency
- formula Freq(timer clock freq)= Fsysclk / (prescalar+1) then T(timer interval)=1/ Freq(timer clock freq)
- Multiply the timer interval with period to get actual interval .