This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RTC PERIOD for ARM INTEGRATOR board


Hello,

I work on the ARM INTEGRATOR board.

According to the configuration in  hal_arm_integrator.cdl ,  the time tick
is
CYGNUM_HAL_RTC_NUMERATOR / CYGNUM_HAL_RTC_DENUMERATOR = 10 ms.
And the CYGNUM_HAL_RTC_PERIOD was set to 12500.

Then we see the clock initialization function in  integrator_misc.c :

    void hal_clock_initialize(cyg_uint32 period)
    {
        //diag_init();  diag_printf("%s(%d)\n", __PRETTY_FUNCTION__,
period);
        //diag_printf("psr = %x\n", psr());
        HAL_WRITE_UINT32(CYG_DEVICE_TIMER_CONTROL, CTL_DISABLE);    // Turn
off
        HAL_WRITE_UINT32(CYG_DEVICE_TIMER_LOAD, period);
        HAL_WRITE_UINT32(CYG_DEVICE_TIMER_CONTROL,
         CTL_ENABLE | CTL_PERIODIC | CTL_SCALE_16);
        _period = period;
    }

The code use Timer2 of Integrator board as the time tick source,
which is clocked at 24M Hz,  so the time tick value is :
12500 * 16 / 24E6 = 8333.3333E-6  =  8.3333 ms
It's not  10ms !

So I believe the correct value of  CYGNUM_HAL_RTC_PERIOD
should be 15000 for INTEGRATOR board.
Plese check that.

Best Regards,

/ Roc Chen



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]