Marco Menchise

Assembler instruction TPF takes 2 clock cycles

Discussion created by Marco Menchise on Oct 2, 2007
Latest reply on Oct 2, 2007 by Marco Menchise
    Hello,
I need to write a routine to generate precise waveform, and I plan to use GPIO. I tried to use QSPI for this purpose but I didn't manage to have no clock delays between consecutive data.

I'm using the TPF (trap false) assembler instruction to align time in my code. I read on the Coldfire programmer manual that  the  TPF is  better than NOP because it lasts exactly 1 clock cycle. I made some test and I found that  I could  not get 1 clock cycle delay, but only multiple of 2 clock cycles.

I mean that a single TPF lasts 0 clock cycle, 2 TPF last 2 clock cycle, and I have no way to get, say, 3 clock cycles.

Am I missing something?

Thanks,
Marco

Outcomes