I'm validating instruction timings prior to implementing __delay_cycles in mspgcc. I understand the timings for a given instruction may be different among the base MSP430 CPU, CPUX (2xx/4xx), and CPUXV2 (5xx/6xx). The anomaly I'm seeing doesn't seem to be documented.
My test program maps SMCLK and another pin to PCB test pins. I run the following loop (adjusted for MCU-specific port/pin) with a logic analyzer attached.
8072: f2 e0 40 00 xor.b #64, &0x0203 ;#0x0040
8076: 03 02
8078: f2 e0 40 00 xor.b #64, &0x0203 ;#0x0040
807c: 03 02
807e: f9 3f jmp $-12 ;abs 0x8072
All the documentation for all the chips suggests that the xor instruction should take 5 cycles, and all jumps take 2 cycles, whether taken or not (the differences between CPU and CPUX and CPUXV2 do not apply to these instructions).
So comparing the output pin with SMCLK I should see 5 cycles in one mode, then 7 (5 plus the jump) in the other mode.
What I see is:
msp430g2231 [CPU]: 5 + 7
msp430f2619 [CPUX]: 5 + 7
cc430f5137 [CPUXV2]: 5 + 8
msp430f5438a [CPUXV2]: 5 + 8
This implies that a jump on CPUXV2 really takes three cycles. I confirmed this by inserting "jmp $2" between the xor instructions, and measured 7+7 for CPU and CPUX, and 8+8 for CPUXV2.
The 2xx guide has separate instruction timing sections for 430 and 430X, both of which state jumps take 2 cycles, which matches my measurements. The 4xx and 5xx/6xx guides also have separate timing sections for 430 and 430X, but only the 430 one mentions jumps (5xx/6xx section 5.5.1.5) and it also says jumps take two cycles.
Am I doing something wrong, did I miss something in the documentation, or is the documentation in the 5xx/6xx users guide incomplete/incorrect?
Peter