PR 1766/bsps
	* clock/ckinit.c: Add missing read of Timer_Counter_1.
This commit is contained in:
Joel Sherrill
2011-07-21 20:52:19 +00:00
parent add4f336fb
commit f37f593da4
2 changed files with 7 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2011-07-21 Jorge Lopez <jorge.lopez.trescastro@esa.int>
PR 1766/bsps
* clock/ckinit.c: Add missing read of Timer_Counter_1.
2011-06-19 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Fix broken path to clockdrv_shell.h.

View File

@@ -64,6 +64,8 @@ uint32_t bsp_clock_nanoseconds_since_last_tick(void)
uint32_t clicks;
uint32_t usecs;
clicks = LEON_REG.Timer_Counter_1;
if ( LEON_Is_interrupt_pending( LEON_INTERRUPT_TIMER1 ) ) {
clicks = LEON_REG.Timer_Counter_1;
usecs = (2*rtems_configuration_get_microseconds_per_tick() - clicks);