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,
I want to use RTI timer as free running counter. Need to read its 32-bit and 64-bit value.
From Halcogen, function for reading 32-bit value is getting generated.
But function for 64-bit is not getting generated.
Can you please tell us how to handle read operation for 64-bit counter.
Thanks in advance.
Hello,
In this thread, They have taken FRCx of both counter for 64 bit counter.
According to datasheet: 13.2.1.1
The free running counter (RTIFRCx) must be read first. This priority will ensure that in the cycle when the
CPU reads RTIFRCx, the up counter value is stored in its counter register (RTIUCx). The second read has
to access the up counter register (RTIUCx), which then holds the value which corresponds to the number
of RTICLK cycles that have elapsed at the time reading the free running counter register (RTIFRCx).
NOTE: The up counters are implemented as shadow registers. Reading RTIUCx without having
read RTIFRCx first will return always the same value. RTIUCx will only be updated when
RTIFRCx is read.
So as per my understanding: 64 bit value is combination of RTIFRCx and RTIUCx.
let me know if only FRCX value needs to be taken for 64 bit.
Tejashree
Hello,
Can you please explain if the above method from link provided by you is correct.
this issue is not resolved.
Tejashree
Hello Tejashree,
Your understanding is correct: 64 bit value is combination of RTIFRCx and RTIUCx
1. read RTIFRCx first
2. read RTIUCx which is onlyupdated when RTIFRCx is read