Changeset 4dd1aa5 in rtems
- Timestamp:
- 01/22/01 14:11:09 (22 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 9f87484
- Parents:
- d6b1d73
- Location:
- c/src/lib/libcpu/sh/sh7045
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/sh/sh7045/ChangeLog
rd6b1d73 r4dd1aa5 1 2001-01-22 Radzislaw Galler <rgaller@et.put.poznan.pl> 2 3 * clock/ckinit.c (Install_clock): Modified MTU timer 0 initialization 4 to generate an interrupt exactly every 1us 5 1 6 2001-01-05 Joel Sherrill <joel@OARcorp.com> 2 7 -
c/src/lib/libcpu/sh/sh7045/clock/ckinit.c
rd6b1d73 r4dd1aa5 45 45 #include <rtems/score/iosh7045.h> 46 46 47 #define _MTU_COUNTER0_MICROSECOND (Clock_MHZ/ 4)47 #define _MTU_COUNTER0_MICROSECOND (Clock_MHZ/16) 48 48 49 49 #ifndef CLOCKPRIO … … 54 54 #define MTU0_SYNCMASK 0xfe 55 55 #define MTU0_MODEMASK 0xc0 56 #define MTU0_TCRMASK 0x 01/* bit 7 also used, vs 703x */56 #define MTU0_TCRMASK 0x22 /* bit 7 also used, vs 703x */ 57 57 #define MTU0_STAT_MASK 0xc0 58 58 #define MTU0_IRQMASK 0xfe … … 151 151 { 152 152 unsigned8 temp8 = 0; 153 unsigned32 factor = 1000000; 154 153 155 154 156 /* … … 159 161 Clock_isrs_const = rtems_configuration_get_microseconds_per_tick() / 10000; 160 162 Clock_isrs = Clock_isrs_const; 161 162 Clock_MHZ = rtems_cpu_configuration_get_clicks_per_second() / 1000000 ; 163 164 factor /= rtems_configuration_get_microseconds_per_tick(); /* minimalization of integer division error */ 165 Clock_MHZ = rtems_cpu_configuration_get_clicks_per_second() / factor ; 163 166 164 167 rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker ); … … 183 186 write8( temp8, MTU_TMDR0); 184 187 185 /* TCNT is cleared by GRA ; internal clock / 4*/188 /* TCNT is cleared by GRA ; internal clock /16 */ 186 189 write8( MTU0_TCRMASK , MTU_TCR0); 187 190 … … 202 205 203 206 /* set counter limits */ 204 write16( _MTU_COUNTER0_MICROSECOND * 205 rtems_configuration_get_microseconds_per_tick(), MTU_GR0A); 207 write16( _MTU_COUNTER0_MICROSECOND, MTU_GR0A); 206 208 207 209 /* start counter */
Note: See TracChangeset
for help on using the changeset viewer.