Hi,
I am considering the possible solutions for time measurement on TMS570LS3137ZWT microcontroller.
1- Using RTI: I can configure a counter that increments the Free Running counter each time it overflows, then I can have a VCLK tick counter on 64 bits.
Pros:
- Counter on 64 bits
- Registers writeable only in Privileged mode, and read-accessible in User mode
Cons:
- Counting VCLK ticks instead of GCLK ticks.
- I guess the access time is bigger than using the PMU (access through the Peripheral Central Resource Bridge)
2- Using PMU: I can enable the Cycle counter and count the GCLK ticks with it.
Pros:
- Counting GCLK bits (more accurate for time measurement)
- I guess the access time is better since the PMU is in the core
Cons:
- Cycle Counter Register is only a 32 bits counter (max value corresponds to something like 26 seconds if the CPU runs at 180MHz).
- The documentation indicates that the registers are not accessible (at all...?) for User mode. If I want the User mode can access to them, I have to enable the user access (via the User Enable Register of the PMU) but this gives more than only a read-access for user-mode, and this can not be allowed for our critical system.
Finally, here are my questions: do I understand correctly the documentation about the user access for PMU registers or is there a way to configure only a read-access for User mode on these registers (writeable only in privileged mode)?
How can I simulate a 64 bits counter for GCLK ticks with the PMU (without interruptions if possible)?
Thanks to everyone for your help.
Gael