mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2006-03-07 Lars Munch <lars@segv.dk>
* at91rm9200/clock/clock.c: The clock tick is not very precise on at91rm9200. The attached patch improves the situation by: (1) Not reloading the "period interval timer" register in the interrupt handler since this is done automatically. (2) Use integer rounding in the calculation of the "period interval timer" register value to get as close as posible to the CONFIGURE_MICROSECONDS_PER_TICK value.
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
2006-03-07 Lars Munch <lars@segv.dk>
|
||||
|
||||
* at91rm9200/clock/clock.c: The clock tick is not very precise on
|
||||
at91rm9200. The attached patch improves the situation by:
|
||||
(1) Not reloading the "period interval timer" register in the
|
||||
interrupt handler since this is done automatically.
|
||||
(2) Use integer rounding in the calculation of the "period interval
|
||||
timer" register value to get as close as posible to the
|
||||
CONFIGURE_MICROSECONDS_PER_TICK value.
|
||||
|
||||
2005-11-04 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Remove RTEMS_CHECK_CUSTOM_BSP.
|
||||
|
||||
@@ -54,9 +54,6 @@ rtems_isr clock_isr(rtems_vector_number vector)
|
||||
/* read the status to clear the int */
|
||||
st_str = ST_REG(ST_SR);
|
||||
|
||||
/* reload the timer value */
|
||||
ST_REG(ST_PIMR) = st_pimr_reload;
|
||||
|
||||
rtems_clock_tick();
|
||||
}
|
||||
|
||||
@@ -71,7 +68,7 @@ void Install_clock(rtems_isr_entry clock_isr)
|
||||
|
||||
/* the system timer is driven from SLCK */
|
||||
slck = at91rm9200_get_slck();
|
||||
st_pimr_reload = ((BSP_Configuration.microseconds_per_tick * slck) /
|
||||
st_pimr_reload = (((BSP_Configuration.microseconds_per_tick * slck) + (1000000/2))/
|
||||
1000000);
|
||||
|
||||
/* read the status to clear the int */
|
||||
|
||||
Reference in New Issue
Block a user