S08SH8 TPM v3 strange behaviour

Discussion created by acno on Mar 13, 2008
Latest reply on Feb 20, 2013 by Bill Thomas

I'm using the new S08SH8 for some projects and I discovered a strange behaviour of the new TPM used in this  controller.
I use a channel in software compare mode (it's like output compare but with no control on pin) and in the irq vector I change the compare value for the next event. The problem arise if I modify the status register (TPMxCnSC) after updating the channel value (TPMxCnV), in this case it seems that the new value is lost. If I touch the status register before updating the value, all is ok.
In datasheet is clearly noted that the new TPMv3 has a different coherency mechanism that update the values on the next change of TPM counter and that it can be forced writing to TPMxCnSC, but it seems wrong.

Anyone experienced this too?