Hi !
I'm trying to use the sp804 timer of the Foundation model to generate interrupts. I'm unsure about the timer frequency I should use, since there is no entry in the example dtb.
My sp804 driver has been tested on Qemu / Rpi to be quite accurate, and with foundation, I need to set my timer frequency to about 1000 Hz to get accurate interrupt, which seems odd.
How can I find the exact frequency of the sp804 on this model ?
Best,
V.
I spotted a couple erros in my code, and now I have my interrupts back again, with a base clock of 32 Khz.I still wish to find an official source for this value if possible.
Hi,
You can see in this table that the SP804 has a frequency of 35 MHz on the AEMv8-A FVPs (i.e. Base Platform and Foundation Model).
This is corroborated by the SP804 driver in ARM Trusted Firmware here.
Hope that helps,
Ash.
Thank you for these information.
In the ATF, there is this comment before sp804_timer_init:
/* Enable the clock override for SP804 timer 0, which means that no * clock dividers are applied and the raw (35 MHz) clock will be used */ mmio_write_32(V2M_SP810_BASE, FVP_SP810_CTRL_TIM0_OV);
Does this means that there are some default dividers on the sp804 clock that I should remove (with the same input) to get the full 35Mhz ?
By the way, is there any documentation about the SP810, it seems quite hard to get some info about this component ?
After a few test, I confirm that without the override bit set to 1, the frequency seems to be 32 Khz, but with the override bit (see ATF code) we can have the full 35 Mhz.
Thank you sir !
vsiles,
Your answer is here.
There's enough information scattered around in the RealView baseboard docs (and the Fast Models FVP guides) to get good enough use out of it.
Ta,
Matt
Thank you !