Hi guys,
I was using a GT16A today and I found that when I wrote to the TPM1C0VL and H registers, the values didnt seem to get written the result was rather strange. I monitored the values of the register on the debugger and got '"' 34 . I am not sure why this happens and every time I over write it it still remains the same (the initialised value),
What has to be done to change the value every duty cycle?
Solved! Go to Solution.
Hello Karthick,
The only limitation here should be the coherency latch mechanism. You need to read and write BOTH bytes every time.
It is also possible to get this "out of step" if you are not writing to TPMxCnSC in between update pairs i.e. you are writing the second byte then the first each update rather than first/second.
in other words
how do we over write the counter in PWM mode after every duty cycle?
Cheers
Karthick
Hello Karthick,
The only limitation here should be the coherency latch mechanism. You need to read and write BOTH bytes every time.
It is also possible to get this "out of step" if you are not writing to TPMxCnSC in between update pairs i.e. you are writing the second byte then the first each update rather than first/second.
Hi Peg,
Thanks but the debugger is bizarre!!!
When you restart code-warrior and try it it works fine! I cannot believe it.
So moral of the story, restart the program and try again if you think you have done everything you can and it still dosent work!
Cheers
Karthick