Hello Mac,
you wrote what I also expected / wished, but sadly it's not what we get:
0. The initial output state under TPM control is not determined by the previous output state in GPIO mode. Not after reset and not later. Out of reset, the initial state is 0. So the TPM can't produce a 0 pulse starting at a certain CNT value without a preceding '0' glitch!
1. Setting TPMxCnSC to 0 doesn't change the state of the internal flipflop. As soon as you change it to output compare with pin control, the pin switches to the last state under OC control.
2. Disabling the TPM module doesn't change the state of the internal flipflop.
3. Clearing the TPM counter doesn't change the state of the internal flipflop.
It would be extremly disappointing if the S08TPMV3 had really no way to control the putput flipflop.
Oliver