This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RTC PERIOD for ARM INTEGRATOR board
- From: "Roc Chen ???" <rocchen at incomm dot com dot tw>
- To: <ecos-discuss at sources dot redhat dot com>
- Cc: <alanho at incomm dot com dot tw>
- Date: Fri, 14 Dec 2001 15:31:43 +0800
- Subject: [ECOS] RTC PERIOD for ARM INTEGRATOR board
- References: <6476CB7C06B86D46A0C5BF34EACD383303730C@rtpsrv001.rtp.bops.com>
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