Question
delay function and execution time
Posted on October 25, 2012 at 09:18
Hi, I wanted to create a delay function, and I thought of something classic like this:
whlile(n_count){
n_count--;
} but how do you know how long it loses precisely my function? I believe that there should be a link between the value of n_count and sysclock but do not know which one.
I would also like to understand how can I calculate how long it takes each instruction to be executed by STM32F4 and how long it takes my development board to run the entire program!
anyone know how to do these things?
#hll-timing-loop---just-say-no