From b335c503112791edc634167b59ed98d377547701 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 20 Apr 2001 13:14:55 +0000 Subject: 2001-04-20 Joel Sherrill * include/bsp.h (Clear_tm27_intr): Stop the timer and disable the interrupt. This was not quite right before and we were getting uncontrolled interrupt nesting in tm27. * timer/timer.c (Timer_Initialize): Added an extra reset and changed the ITMR register so we will never get an interrupt. (Read_timer): Fixed so the timer actually stops before it is read. Before some times reported were outraguously high. * start/start.S: Major clean including using stack in linkcmds, deleting unused code, and zeroing the BSS using the linkcmds information. * startup/linkcmds: Put heap in lower memory than workspace and move _clear_end so both are zeroed. --- c/src/lib/libbsp/mips/jmr3904/timer/timer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libbsp/mips/jmr3904/timer') diff --git a/c/src/lib/libbsp/mips/jmr3904/timer/timer.c b/c/src/lib/libbsp/mips/jmr3904/timer/timer.c index 5a4375fe5e..241e719fea 100644 --- a/c/src/lib/libbsp/mips/jmr3904/timer/timer.c +++ b/c/src/lib/libbsp/mips/jmr3904/timer/timer.c @@ -31,12 +31,12 @@ void Timer_initialize() * the compare register is set to the maximum value. */ + TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TCR, 0x20 ); TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_CCDR, 0x3 ); TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TRR, 0x0 ); TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_CPRA, 0xFFFFFFFF ); TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TISR, 0x00 ); - TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_ITMR, 0x8001 ); - TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TCR, 0x20 ); + TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_ITMR, 0x0001 ); TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TCR, 0xe0 ); } @@ -49,7 +49,6 @@ int Read_timer() { rtems_unsigned32 total; - TX3904_TIMER_WRITE( TX3904_TIMER1_BASE, TX3904_TIMER_TCR, 0x03 ); total = TX3904_TIMER_READ( TX3904_TIMER1_BASE, TX3904_TIMER_TRR ); if ( Timer_driver_Find_average_overhead == 1 ) -- cgit v1.2.3