Changeset e77f625 in rtems


Ignore:
Timestamp:
Jul 7, 2015, 8:33:51 PM (4 years ago)
Author:
Jan Sommer <summerspam@…>
Branches:
4.11, master
Children:
4c68431
Parents:
635ed82
git-author:
Jan Sommer <summerspam@…> (07/07/15 20:33:51)
git-committer:
Joel Sherrill <joel.sherrill@…> (07/07/15 21:01:28)
Message:

RaspberryPi?: Use rtems_configuration_get_microseconds_per_tick to set clock counter

timer interrupt was hard coded to 10 ms per tick.
Fix uses the setting of CONFIGURE_MICROSECONDS_PER_TICK to compute the correct start value for the counter
See for more information: http://permalink.gmane.org/gmane.os.rtems.user/22691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c

    r635ed82 re77f625  
    5151{
    5252   BCM2835_REG(BCM2835_TIMER_CTL) = 0x003E0000;
    53    BCM2835_REG(BCM2835_TIMER_LOD) = 10000 - 1;
    54    BCM2835_REG(BCM2835_TIMER_RLD) = 10000 - 1;
     53   BCM2835_REG(BCM2835_TIMER_LOD) =
     54                rtems_configuration_get_microseconds_per_tick() - 1;
     55   BCM2835_REG(BCM2835_TIMER_RLD) =
     56                rtems_configuration_get_microseconds_per_tick() - 1;
    5557   BCM2835_REG(BCM2835_TIMER_DIV) = BCM2835_TIMER_PRESCALE;
    5658   BCM2835_REG(BCM2835_TIMER_CLI) = 0;
Note: See TracChangeset for help on using the changeset viewer.