Replies: 5 comments 9 replies
-
Hey, |
Beta Was this translation helpful? Give feedback.
-
For me, there is a point of calibration where the count pass from negative to positive (or 1/.) |
Beta Was this translation helpful? Give feedback.
-
Your thechnic is nice... but I3m qustionning about the effect of the print... it seems that it doesn't have any effect on yours results... |
Beta Was this translation helpful? Give feedback.
-
With the Winner Micro w600 (Cortex-M3) it's strange: Every 2
|
Beta Was this translation helpful? Give feedback.
-
Last week I found that with the RP2 Pico by adding to the program counter (PC = R15) you may jump into a table of successive
nop()
s to get a precisely resolved delay.Granularity of delays there was 1 clock cycle (8 ns at 125 MHz clock), as expected.
Note that the LSB of the PC always is 0, so it makes sense to add even values only. This is no problem for resolution, as the
nop()
instruction takes 2 bytes like most of the Thumb instructions.Now with the Pyboard (at 168 MHz clock) I observe that the delays with the same program have a granularity of 12 ns instead of the expected 6 ns.
Now my question (for boring X-Mas nights perhaps :-)): Does anyone have a simple explanation for this?
It superficially looks like the PC is incremented by 4 in every step.
Could it be that 2
nop()
instructions are always read together (i.e. 32 bits) and executed in 2 clocks? The STM32F407 has no instruction cache, has it?Is there another instruction that allows for a single clock resolution?
Can this resolution be transferred to a gpio pin at all or is the peripheral temporal resolution restricted by other lower clocks anyway?
In the latter case it would make less sense to mind that at all, from a practical point of view, given that the STM chips have quite elaborate timers on board.
Code:
Result (on Pyboard 1.1):
Beta Was this translation helpful? Give feedback.
All reactions