Hello,
I have got XMC4500 Relax Lite Kit and task to calculate a number of pulses for certain period of time.
Say, the frequency around 10MHz due 1mS time interval.
I decided to use the CNT001 application in Gating mode.
To form 1mS Gating pulse, I use PWSMP001 application with 900Hz frequency and 90% Duty cicle.
Then I connect it's "Status" output to CNT001->"Gating" internally. IO002 input is connected to "CNT001"->Input respectively.
Additionaly, I have to write fuction to read CNT001 counter.
I apply 10MHz test signal on Input, and get 10000 value after first 1mS pulse.
Surprisingly, after second 1mS pulse I get 20000 value, despite that CNT001_ResetCounter() was used before.
So, I've discovered that CNT001 counter in this mode can not be reset or stopped, then "Gating" is inactive.
It is only possible, then internal "Gating" pulse is active, but that has not got practical sence.
Finally, I just use additional variable to store previous value of CNT001, and calculate difference with current value.
Probably someone can advise a better solution?
BR
K
I have got XMC4500 Relax Lite Kit and task to calculate a number of pulses for certain period of time.
Say, the frequency around 10MHz due 1mS time interval.
I decided to use the CNT001 application in Gating mode.
To form 1mS Gating pulse, I use PWSMP001 application with 900Hz frequency and 90% Duty cicle.
Then I connect it's "Status" output to CNT001->"Gating" internally. IO002 input is connected to "CNT001"->Input respectively.
Additionaly, I have to write fuction to read CNT001 counter.
I apply 10MHz test signal on Input, and get 10000 value after first 1mS pulse.
Surprisingly, after second 1mS pulse I get 20000 value, despite that CNT001_ResetCounter() was used before.
So, I've discovered that CNT001 counter in this mode can not be reset or stopped, then "Gating" is inactive.
It is only possible, then internal "Gating" pulse is active, but that has not got practical sence.
Finally, I just use additional variable to store previous value of CNT001, and calculate difference with current value.
Probably someone can advise a better solution?
BR
K