|
Post by lockstepper on Mar 26, 2019 14:54:54 GMT
Hello,
I want to read timervalues from Tim0_Ch0.cnt and Tim0_Ch1.cnt to compute a phase difference between these channels.
Since my system uses many interrupts it happens every now and then that in between the reading of both channels an interrupt occurse which corrupts my measurement. To disable the interrupts before the reading and enable them afterwards is not an option.
I thought about using GTM-MCS to put both timervalues somewhere where my CPU can access them. I want to look into that but i cannot find hands-on documentation or even examples. Where do I find helpful things, or is there any other way to handle this problem?
|
|
|
Post by Admin on Apr 1, 2019 14:47:34 GMT
You may be better to use Tim0_Ch0.GPR1 and Tim0_Ch1.GPR1 as these are only updated at the end of a PWM period.
|
|