What time granularity do you expect? The STM module could provide the shortest
time duration step of about 7.5ns (If the reference
clock of the STM is 133MHz and the module clock divider is 1). In free running
mode, the duration from 0x0000_0000 to 0xFFFF_FFFF will be more than 30s. If
that matches your requirements, I would like to suggest
using any STM available to provide the timing ticks.
To reduce the time consumption of the code, you can simply enable any STM in
free running mode and take that STM counter as timestamp source.
Then both A53 or M7 can read the same counter in any time with the
simplest bare metal code.
Hope this helps,
Platon