Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello,
In advance: we do not use SysCfg. We have our own driver-wrapper and we directly use the TimerP-API for that and set the clock-source to the timer-clocksrcMux-address directly.
This will be used for our internal time as well the same way SysCfg would do that.
currently I am trying to utilize the TimerP to get a 1 ms-tick.
With the standard-setting of a clock-source MCU_HF0SC0 we have 25 MHz. if we now input to timerP to have a 1 ms intervall with this clock-rate it isn't really 1 ms at all. We also tried to use the 1-ms-tick-module which is advertised in the TRM. it simply states "Generates a 1-ms tick clock when functional clock is 32.768 kHz". SysCfg does not set the clock to 32.768 Hz, but to 32000 Hz, when the MCU_HFOSC0_CLKOUT_32K gets selected.
We utilized HWTimer 5 for that.
To verify the 1 ms-tick of the timer I just did some manual noting. We output the system-timestamp via the console from a task that sleeps for 5 seconds. It just reads the HWTimer-value. In my understanding any sw shouldn't impact the HW-Timer since it's free-running, generating an interrupt in 1 ms intervall.
the timestamp-variable which gets updated with every interrupt is an 64-bit integer, a unix timestamp in ms-resolution.
So here are the measurings I made:
As you can see in a short amount of time the general time and the time in the device deviate much in the seconds range already! This is not useable for us. We need a way more exact 1ms-tick.
Also to me it seems the TimerP does not support the 1 ms-tick-module of the Sitara-timers, since the TRM states much more configuration than I can see in the TimerP-implementation.
If we check the registers:
And check the settings of them from the TRM:

They are not the same.
So will this functionality be implemented? This is really really important for us and our devices. We need an exact timestamp, even solely for security reasons. We additionally have an NTP-synchronisation but those drift-times are way too big!
Additions: I also saw the clocktree-tool for Am64 does not support all possible clock-inputs for the timer-module:
Best regards
Felix
