Other Parts Discussed in Thread: HALCOGEN
Hello,
Very simple question from a beginner.
I am not able to set the RTI UC Compare register (CPUCx) in Halgogen. Where is it possible?
Thanks for all .
Alain
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
Very simple question from a beginner.
I am not able to set the RTI UC Compare register (CPUCx) in Halgogen. Where is it possible?
Thanks for all .
Alain
Hello Alain,
The RTI module has 2 counter blocks and 4 compare units. The counter block is driven by the RTICLK and counts up (RTIUCx) until the compare value in the compare up counter register (RTICPUCx) is reached. When the compare matches, RTIFRCx (free running) is incremented and RTIUCx (up counter) is reset to 0.
The counter values (up counter, and free running counter) can be determined by reading the respective counter registers. A write to this counter presets it with a value. The counter then increments from this written value upwards.
In HalCoGen, you are not able to write a value to UCx register. The code generated through HALCoGen presets those register in rtiInit().
So in a nutshell - the UCx is like a pre scale for the counter.
Increase UC, and the counter resolution decreases (each step is longer in 'ns') but the range of the counter between rollovers is longer (in 'ns' again)