Hi!
With the MSP430F5438A I have some strange behaviour that I'd like to mention with the following code snippet:
For oscilloscope measurement I simply did the following:
bis.b #BIT2,&P8OUT
jmp $+2
nop
bic.b #BIT2,&P8OUT
jmp $+2
nop
bis.b #BIT2,&P8OUT
jmp $+2
nop
bic.b #BIT2,&P8OUT
jmp $+2
nop
followed by
bis.b #BIT2,&P8OUT
nop
jmp $+2
bic.b #BIT2,&P8OUT
nop
jmp $+2
bis.b #BIT2,&P8OUT
nop
jmp $+2
bic.b #BIT2,&P8OUT
nop
jmp $+2
The first sequence takes 8 clock cylces for keeping the pin high or low (1 too much) and the second version is correct with 7 cycles.
What's the problem with the jmp instruction?