Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hi,
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?
https://developer.arm.com/Processors/Cortex-A9
2. Do you know which register I need in order to get the cpu frequency in case cntfrq doesn't exists? (baremetal app)
Thanks again
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).