forked from Imagelibrary/rtems
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
This commit is contained in:
committed by
Joel Sherrill
parent
635ed82a12
commit
e77f625401
@@ -50,8 +50,10 @@ static void raspberrypi_clock_handler_install(void)
|
||||
static void raspberrypi_clock_initialize(void)
|
||||
{
|
||||
BCM2835_REG(BCM2835_TIMER_CTL) = 0x003E0000;
|
||||
BCM2835_REG(BCM2835_TIMER_LOD) = 10000 - 1;
|
||||
BCM2835_REG(BCM2835_TIMER_RLD) = 10000 - 1;
|
||||
BCM2835_REG(BCM2835_TIMER_LOD) =
|
||||
rtems_configuration_get_microseconds_per_tick() - 1;
|
||||
BCM2835_REG(BCM2835_TIMER_RLD) =
|
||||
rtems_configuration_get_microseconds_per_tick() - 1;
|
||||
BCM2835_REG(BCM2835_TIMER_DIV) = BCM2835_TIMER_PRESCALE;
|
||||
BCM2835_REG(BCM2835_TIMER_CLI) = 0;
|
||||
BCM2835_REG(BCM2835_TIMER_CTL) = 0x003E00A2;
|
||||
|
||||
Reference in New Issue
Block a user