cancel
Showing results for 
Search instead for 
Did you mean: 

Delay function for STM32F4

theanswer
Associate II
Posted on July 08, 2015 at 13:50

Does anyone know of a good delay function I could use with my STM32F4. I need delay in miliseconds and microseconds.

#nano-delay() #ns-delay
20 REPLIES 20
q2
Associate
Posted on December 10, 2015 at 07:03

Hi,

To clarify, 

SystemCoreClock for STM32F4Discovery is 168Mhz.

ticks = (SystemCoreClock) / 1000000000;

.168= 168000000/1000000000.

This doesn't work.  Tick value below 76 will cause MCU to fault.

Is this possible?  1= 168000000/168000000.  I tried it and the MCU fails.

What the lowest value can we use for tick?

Thank you,

Kyu