Ignore:
Timestamp:
Mar 7, 2006, 9:05:28 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
ab8394f6
Parents:
d3490f27
Message:

2006-03-07 Lars Munch <lars@…>

  • 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/arm/at91rm9200/clock/clock.c

    rd3490f27 r75bf564  
    5555    st_str = ST_REG(ST_SR);
    5656
    57     /* reload the timer value */
    58     ST_REG(ST_PIMR) = st_pimr_reload;
    59 
    6057    rtems_clock_tick();
    6158}
     
    7269    /* the system timer is driven from SLCK */
    7370    slck = at91rm9200_get_slck();
    74     st_pimr_reload = ((BSP_Configuration.microseconds_per_tick * slck) /
     71    st_pimr_reload = (((BSP_Configuration.microseconds_per_tick * slck) + (1000000/2))/
    7572                      1000000);
    7673
Note: See TracChangeset for help on using the changeset viewer.