Hello, I have a problem on my DSPIC33EP32MC202.
I have set the clock oscillator and PLL to have 140MHz oscillator. 70 MHz instruction (~140ns).
I have set the output clock divided by 16. With my oscillo, I'm measuring 8,75 MHz, so the oscillator fréquency is OK.
But if I make a loop like that :
bset PORTA,#0
nop
nop
nop
bclr PORTA,#0
nop
nop
nop
............etc (no goto)
I'm measuring ~136ns
If I make a loop like that :
loop: bset PORTA,#0
nop
nop
nop
bclr PORTA,#0
nop
goto loop
I'm measuring 163ns
And if I make a loop like that :
loop1: bset PORTA,#0
nop
goto loop2
loop2: bclr PORTA,#0
nop
goto loop1
I'm measuring 190ns
All the loop take, normally, 8 instruction's cycles :
first : 1+1+1+1+1+1+1+1
second : 1+1+1+1+1+1+2
third : 1+1+2+1+1+2
If I suppose NOP and BSET or BCLR are 1 cycle instruction, the GOTO take 3,5 cycles !!!
I'm programming in ASM30.
A person could explain me please ?