This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Foundation v8: sp804 frequency

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.

Parents
  • Hi !

    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 ?

Reply
  • Hi !

    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 ?

Children