Definition in file plf_misc.c.
Go to the source code of this file.
Functions | |
| externC void | __default_interrupt_vsr (void) |
| Default interrupt vector service routine. | |
| void | hal_platform_init (void) |
| Additional platform initialisation. | |
| void | hal_clock_initialize (cyg_uint32 period) |
| Timer (TPU channel 5) initialisation. | |
| void | hal_clock_read (cyg_uint32 *pvalue) |
| Reads current value of timer counter. | |
| void | cyg_plf_memory_segment (int seg, unsigned char **start, unsigned char **end) |
| Provide information about additional memory segment. | |
Variables | |
| externC volatile CYG_ADDRESS | hal_vsr_table [CYGNUM_HAL_VSR_COUNT] |
| Contains vector service routines for all interrupt vectors (vectors.S). | |
|
|
Default interrupt vector service routine.
|
|
||||||||||||||||
|
Provide information about additional memory segment. We provide information about the internal H8S/2674 ram.
Definition at line 205 of file plf_misc.c.
00206 {
00207 cyg_uint32 mem_start;
00208
00209 //
00210 // we have one additional memory segment - the H8S/2674 internal ram
00211 //
00212 if (seg == 1)
00213 {
00214 //
00215 // the internal ram contains VSR table, virtual vector table and
00216 // shadow vector table. these areas are reserved and not available
00217 // so we end at start of CYGHWR_HAL_VSR_TABLE an not at ffc000
00218 //
00219 mem_start = 0xff4000;
00220 *start = (unsigned char *)(mem_start);
00221 *end = (unsigned char *)(CYGHWR_HAL_VSR_TABLE);
00222 }
00223 else
00224 {
00225 diag_printf("** Invalid memory segment #%d - ignored\n", seg);
00226 *start = NO_MEMORY;
00227 *end = NO_MEMORY;
00228 }
00229 }
|
|
|
Timer (TPU channel 5) initialisation. Initializes the timer device to interrupt at the given period. The period is essentially the value used to initialize the timer counter and must be calculated from the timer frequency and the desired interrupt rate.
Definition at line 139 of file plf_misc.c.
00140 {
00141 cyg_uint8 tmp;
00142
00143 //
00144 // start 16 bit timer module in MSTPCRH register
00145 //
00146 HAL_READ_UINT8(CYGARC_MSTPCRH, tmp);
00147 tmp &= ~CYGARC_MSTPCRH_TPU;
00148 HAL_WRITE_UINT8(CYGARC_MSTPCRH, tmp);
00149 //
00150 // initialize 16 bit timer - first we select timer counter clock and
00151 // counter clearing source TGR
00152 // Clock prescaler is 16 (clock/16) and TCNT is clear at compare match A
00153 //
00154 HAL_WRITE_UINT8(CYGARC_TCR5, CYGARC_TCR_CLR_CMA |
00155 CYGARC_TCR_TPSC_16);
00156 //
00157 // Select output compare register - Designate the TGRA as an output compare
00158 // register by means of TIOR.
00159 //
00160 HAL_WRITE_UINT8(CYGARC_TIOR5, 0x00); // output compare - output disabled
00161 HAL_WRITE_UINT16(CYGARC_TGRA5, period); // set compare match value to period
00162 HAL_WRITE_UINT16(CYGARC_TCNT5, 0x00); // reset up counter
00163 //
00164 // Now start the counter 5 - intterrupts will be enabled from HAL later
00165 //
00166 HAL_WRITE_UINT8(CYGARC_TSTR, CYGARC_TSTR_CST5);
00167 }
|
|
|
Reads current value of timer counter. Reads the current value of the timer counter and puts the value in the location pointed to by pvalue. The value stored will always be the number of timer cycles since the last interrupt, and hence ranges between zero and the initial period value. If this is a count-down cyclic timer, some arithmetic may be necessary to generate this value.
Definition at line 183 of file plf_misc.c.
00184 {
00185 cyg_uint16 val;
00186 HAL_READ_UINT16(CYGARC_TCNT5, val);
00187 *pvalue = val;
00188 }
|
|
|
Additional platform initialisation. These will perform any additional initialization needed by platform. This typically includes further initialization of the interrupt controller, PCI bus bridges, basic IO devices and enabling the caches.
Definition at line 112 of file plf_misc.c.
00113 {
00114 //
00115 // intialize virtual vector calling interface
00116 //
00117 hal_if_init();
00118 }
|
|
|
Contains vector service routines for all interrupt vectors (vectors.S).
Definition at line 93 of file plf_misc.c. |
1.3.5