mod_regs_tmr.h

Go to the documentation of this file.
00001 #ifndef CYGONCE_MOD_REGS_TMR_H
00002 #define CYGONCE_MOD_REGS_TMR_H
00003 
00004 //==========================================================================
00005 //
00006 //      mod_regs_tmr.h
00007 //
00008 //       TPU/TMR Register
00009 //
00010 //==========================================================================
00011 //####ECOSGPLCOPYRIGHTBEGIN####
00012 // -------------------------------------------
00013 // This file is part of eCos, the Embedded Configurable Operating System.
00014 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
00015 //
00016 // eCos is free software; you can redistribute it and/or modify it under
00017 // the terms of the GNU General Public License as published by the Free
00018 // Software Foundation; either version 2 or (at your option) any later version.
00019 //
00020 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
00021 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
00022 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00023 // for more details.
00024 //
00025 // You should have received a copy of the GNU General Public License along
00026 // with eCos; if not, write to the Free Software Foundation, Inc.,
00027 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00028 //
00029 // As a special exception, if other files instantiate templates or use macros
00030 // or inline functions from this file, or you compile this file and link it
00031 // with other works to produce a work based on this file, this file does not
00032 // by itself cause the resulting work to be covered by the GNU General Public
00033 // License. However the source code for this file must still be made available
00034 // in accordance with section (3) of the GNU General Public License.
00035 //
00036 // This exception does not invalidate any other reasons why a work based on
00037 // this file might be covered by the GNU General Public License.
00038 //
00039 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
00040 // at http://sources.redhat.com/ecos/ecos-license/
00041 // -------------------------------------------
00042 //####ECOSGPLCOPYRIGHTEND####
00043 //==========================================================================
00044 //#####DESCRIPTIONBEGIN####
00045 //
00046 // Author(s):    yoshinori sato
00047 // Contributors: yoshinori sato, Uwe Kindler
00048 // Date:         2003-12-06
00049 //              
00050 //####DESCRIPTIONEND####
00051 //
00052 //==========================================================================
00053 
00054 
00055 //==========================================================================
00056 //                            DOXYGEN FILE HEADER
00061 //==========================================================================
00062 
00063 
00064 //==========================================================================
00065 //                            16-Bit Timer Unit (TPU)
00066 //==========================================================================
00067 #define CYGARC_TSTR   0xFFFFC0
00068 #define CYGARC_TSNC   0XFFFFC1
00069 
00070 //--------------------------------------------------------------------------
00071 // Timer 0
00072 //
00073 #define CYGARC_TCR0   0xFFFFD0
00074 #define CYGARC_TMDR0  0xFFFFD1
00075 #define CYGARC_TIORH0 0xFFFFD2
00076 #define CYGARC_TIORL0 0xFFFFD3
00077 #define CYGARC_TIER0  0xFFFFD4
00078 #define CYGARC_TSR0   0xFFFFD5
00079 #define CYGARC_TCNT0  0xFFFFD6
00080 #define CYGARC_TGRA0  0xFFFFD8
00081 #define CYGARC_TGRB0  0xFFFFDA
00082 #define CYGARC_TGRC0  0xFFFFDC
00083 #define CYGARC_TGRD0  0xFFFFDE
00084 
00085 //--------------------------------------------------------------------------
00086 // Timer 1
00087 //
00088 #define CYGARC_TCR1   0xFFFFE0
00089 #define CYGARC_TMDR1  0xFFFFE1
00090 #define CYGARC_TIOR1  0xFFFFE2
00091 #define CYGARC_TIER1  0xFFFFE4
00092 #define CYGARC_TSR1   0xFFFFE5
00093 #define CYGARC_TCNT1  0xFFFFE6
00094 #define CYGARC_TGRA1  0xFFFFE8
00095 #define CYGARC_TGRB1  0xFFFFEA
00096 
00097 //--------------------------------------------------------------------------
00098 // Timer 2
00099 //
00100 #define CYGARC_TCR2   0xFFFFF0
00101 #define CYGARC_TMDR2  0xFFFFF1
00102 #define CYGARC_TIOR2  0xFFFFF2
00103 #define CYGARC_TIER2  0xFFFFF4
00104 #define CYGARC_TSR2   0xFFFFF5
00105 #define CYGARC_TCNT2  0xFFFFF6
00106 #define CYGARC_TGRA2  0xFFFFF8
00107 #define CYGARC_TGRB2  0xFFFFFA
00108 
00109 //--------------------------------------------------------------------------
00110 // Timer 3
00111 //
00112 #define CYGARC_TCR3   0xFFFE80
00113 #define CYGARC_TMDR3  0xFFFE81
00114 #define CYGARC_TIORH3 0xFFFE82
00115 #define CYGARC_TIORL3 0xFFFE83
00116 #define CYGARC_TIER3  0xFFFE84
00117 #define CYGARC_TSR3   0xFFFE85
00118 #define CYGARC_TCNT3  0xFFFE86
00119 #define CYGARC_TGRA3  0xFFFE88
00120 #define CYGARC_TGRB3  0xFFFE8A
00121 #define CYGARC_TGRC3  0xFFFE8C
00122 #define CYGARC_TGRD3  0xFFFE8E
00123 
00124 //--------------------------------------------------------------------------
00125 // Timer 4
00126 //
00127 #define CYGARC_TCR4   0xFFFE90
00128 #define CYGARC_TMDR4  0xFFFE91
00129 #define CYGARC_TIOR4  0xFFFE92
00130 #define CYGARC_TIER4  0xFFFE94
00131 #define CYGARC_TSR4   0xFFFE95
00132 #define CYGARC_TCNT4  0xFFFE96
00133 #define CYGARC_TGRA4  0xFFFE98
00134 #define CYGARC_TGRB4  0xFFFE9A
00135 
00136 //--------------------------------------------------------------------------
00137 // Timer 5
00138 //
00139 #define CYGARC_TCR5   0xFFFEA0
00140 #define CYGARC_TMDR5  0xFFFEA1
00141 #define CYGARC_TIOR5  0xFFFEA2
00142 #define CYGARC_TIER5  0xFFFEA4
00143 #define CYGARC_TSR5   0xFFFEA5
00144 #define CYGARC_TCNT5  0xFFFEA6
00145 #define CYGARC_TGRA5  0xFFFEA8
00146 #define CYGARC_TGRB5  0xFFFEAA
00147 
00148 //--------------------------------------------------------------------------
00149 // Register Bit definition for TPU
00150 //
00151 // TCR bit definitions
00152 //
00153 #define CYGARC_TCR_CLR_CMA     0x20  // TCNT cleared by TGRA compare match/input capture
00154 #define CYGARC_TCR_CLR_CMB     0x40  // TCNT cleared by TGRB compare match/input capture
00155 #define CYGARC_TCR_CLR_CMC     0xA0  // TCNT cleared by TGRC compare match/input capture
00156 #define CYCARC_TCR_CLR_CMD     0xC0  // TCNT cleared by TGRA compare match/input capture
00157 #define CYGARC_TCR_CKE_RISING  0x00  // Count at rising input cock edge
00158 #define CYGARC_TCR_CKE_FALLING 0x08  // Count at falling input cock edge
00159 #define CYGARC_TCR_CKE_BOTH    0x10  // Count at both input cock edges
00160 #define CYGARC_TCR_TPSC_1      0x00  // Internal clock: counts on clock/1
00161 #define CYGARC_TCR_TPSC_4      0x01  // Internal clock: counts on clock/4
00162 #define CYGARC_TCR_TPSC_16     0x02  // Internal clock: counts on clock/16
00163 #define CYGARC_TCR_TPSC_64     0x03  // Internal clock: counts on clock/64
00164 //
00165 // TSTR - Counter start 0 - 5
00166 //
00167 #define CYGARC_TSTR_CST0       0x01  
00168 #define CYGARC_TSTR_CST1       0x02
00169 #define CYGARC_TSTR_CST2       0x04
00170 #define CYGARC_TSTR_CST3       0x08
00171 #define CYGARC_TSTR_CST4       0x10
00172 #define CYGARC_TSTR_CST5       0x20
00173 //
00174 // TSR bit definitions
00175 //
00176 #define CYGARC_TSR_TCFD        0x80
00177 #define CYGARC_TSR_RSV6        0x40
00178 #define CYGARC_TSR_TCFU        0x20
00179 #define CYGARC_TSR_TCFV        0x10
00180 #define CYGARC_TSR_TGFD        0x08
00181 #define CYGARC_TSR_TGFC        0x04
00182 #define CYGARC_TSR_TGFB        0x02
00183 #define CYGARC_TSR_TGFA        0x01
00184 
00185 
00186 //==========================================================================
00187 //                            8-Bit Timers (TMR)
00188 //==========================================================================
00189 
00190 //--------------------------------------------------------------------------
00191 // TCR selects the clock source and the time at which TCNT is cleared, and 
00192 // controls interrupts.
00193 //
00194 // Register Addresses:
00195 //
00196 #define CYGARC_8TCR0   0xFFFFB0
00197 #define CYGARC_8TCR1   0xFFFFB1
00198 //
00199 // TCR Bit definitions
00200 // 
00201 #define CYGARC_8TCR_CMIEB     0x80       // Compare Match Interrupt Enable B
00202 #define CYGARC_8TCR_CMIEA     0x40       // Compare Match Interrupt Enable A
00203 #define CYGARC_8TCR_OVIE      0x20       // Timer Overflow Interrupt Enable
00204 #define CYGARC_8TCR_CLR_DIS   0x00       // TCNT clearing disabled
00205 #define CYGARC_8TCR_CLR_CMA   0x08       // TCNT clear by compare match A
00206 #define CYGARC_8TCR_CLR_CMB   0x10       // TCNT clear by compare match B
00207 #define CYGARC_8TCR_CLR_EXT   0x18       // TCNT clear by rising edge of external reset input
00208 #define CYGARC_8TCR_CKS_DIS   0x00       // Clock input disabled
00209 #define CYGARC_8TCR_CKS_8     0x01       // Internal clock, counted at falling edge of clock/8
00210 #define CYGARC_8TCR_CKS_64    0x02       // Internal clock, counted at falling edge of clock/8
00211 #define CYGARC_8TCR_CKS_8192  0x03       // Internal clock, counted at falling edge of clock/8
00212 #define CYGARC_8TCR_CKS_TCNT  0x04       // Count at TCNT_x overflow signal
00213 
00214 
00215 //--------------------------------------------------------------------------
00216 // TCSR displays status flags, and controls compare match output.
00217 //
00218 // Register Addresses:
00219 //
00220 #define CYGARC_8TCSR0  0xFFFFB2
00221 #define CYGARC_8TCSR1  0xFFFFB3
00222 //
00223 // TCSR bit definitions
00224 //
00225 #define CYGARC_8TSCR_CMFB         0x80  // compare match flag B
00226 #define CYGARC_8TSCR_CMFA         0x40  // compare match flag A
00227 #define CYGARC_8TSCR_OVF          0x20  // timer overflow flag
00228 #define CYGARC_8TSCR_ADTE         0x10  // A/D Trigger enable
00229 #define CYGARC_8TSCR_CMB_OUT_NO   0x00  // 00: No change when compare match B occurs
00230 #define CYGARC_8TSCR_CMB_OUT_0    0x04  // 01: 0 is output when compare match B occurs
00231 #define CYGARC_8TSCR_CMB_OUT_1    0x08  // 10: 1 is output when compare match B occurs
00232 #define CYGARC_8TSCR_CMB_OUT_TOG  0x0C  // 11: Output is inverted when compare match B occurs (toggle output)
00233 #define CYGARC_8TSCR_CMA_OUT_NO   0x00  // 00: No change when compare match A occurs
00234 #define CYGARC_8TSCR_CMA_OUT_0    0x01  // 01: 0 is output when compare match A occurs
00235 #define CYGARC_8TSCR_CMA_OUT_1    0x02  // 10: 1 is output when compare match A occurs
00236 #define CYGARC_8TSCR_CMA_OUT_TOG  0x03  // 11: Output is inverted when compare match A occurs (toggle output)
00237 
00238 
00239 #define CYGARC_8TCORA0 0xFFFFB4
00240 #define CYGARC_8TCORA1 0xFFFFB5
00241 #define CYGARC_8TCORB0 0xFFFFB6
00242 #define CYGARC_8TCORB1 0xFFFFB7
00243 #define CYGARC_8TCNT0  0xFFFFB8
00244 #define CYGARC_8TCNT1  0xFFFFB9
00245 
00246 
00247 //---------------------------------------------------------------------------
00248 #endif // End of #define CYGONCE_MOD_REGS_TMR_H
00249 

Generated on Tue Feb 17 09:06:13 2004 for eCos EDOSK-2674 HAL by doxygen 1.3.5