Can I get an example of reading the CNTFRQ register in cortex-a9 using assembly inline of arm compiler 5 (DS built in) ?
I didn't find anywhere...
Thank you for your detailed reply.
I have 2 followups , by your permission:
1. I read below that cortex-a9 is armv7-a architecture. so why it lacks this register?
2. Do you know which register I need in order to get the cpu frequency in case cntfrq doesn't exists? (baremetal app)
bsp_user said:1. I read below that cortex-a9 is armv7-a architecture. so why it lacks this register?
Armv7-A supports a number of optional extensions (e.g. Virtualisation, Generic Timer, Large Physical Addresses...). Not all Armv7-A processors will support all of the extensions.
You can check a processor's TRM to see which extensions are implemented, and the information is also reported via feature registers in the processor.
Thank you for your help. Do you have any Idea how I can read the frequency in another way (since this register doesn't exists)
I think Ronan answered on the other thread. But one comment, for processors that support the Generic Timer, CNTFRQ reports the frequency of the timers - not of the core. The timer frequency is fixed and typically slower than the core's frequency (which might be subject to DVFS).