cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 microsecond delay issue

A Maq
Associate III
Posted on May 23, 2018 at 13:36

Hi,

   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:

  1. Nucleo F767
  2. 216MHz system clock frequency
  3. formula     Freq(timer clock freq)= Fsysclk /  (prescalar+1)   then T(timer interval)=1/ Freq(timer clock freq)
  4. Multiply the timer interval with period to get actual interval .

#stm32f7-timer
3 REPLIES 3
Tilen MAJERLE
ST Employee
Posted on May 23, 2018 at 14:00

Dear

ktcengineer

‌,

please share with us your code implementation how you measure the timings. Do you use oscilloscope?

Best regards,

Tilen

Posted on May 23, 2018 at 15:25

I am using Oscilloscope.

Posted on May 23, 2018 at 15:26

It may also be useful to mention that I have used one of the example code which gave me precisely timing delay of upto 10us with no offset.