AnsweredAssumed Answered

Strange and useful clocking behaviour - please explain

Question asked by PatrickG on Feb 1, 2017
Latest reply on Feb 14, 2017 by PatrickG

If I use the BF706, at maximum speed, to simply pulse a GPIO pin high and low in a loop, I get a frequency of 8.333 MHz. If I now introduce more code in the loop, the frequency does not reduce until the number of instructions reaches around 48. So this:

 

pulser:

[REG_PORTC_DATA]=r0;

[REG_PORTC_DATA]=r1;

 jump pulser;

 

Is the same as this:

 

pulser:

[REG_PORTC_DATA]=r0;

[REG_PORTC_DATA]=r1;

loop lc0=40; // waste time

r2=r3;

loop_end;

jump pulser;

 

My guess is that 8.333 MHz X 48 instructions gives 400 MHz, which is the clock rate of the device. However, it seems weird that the loop doesn't slow down until this limit is reached. How does it know? Does it use multiple threads?

Outcomes