00001 /*--------------------------------------------------------------------------- 00002 * Copyright (C) 2003-2004 Dallas Semiconductor Corporation, All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Dallas Semiconductor 00023 * shall not be used except as stated in the Dallas Semiconductor 00024 * Branding Policy. 00025 * --------------------------------------------------------------------------- 00026 * 00027 * This file contains function definitions for the built-in ROM functions 00028 * of the Dallas Semiconductor 400 processor. This file is intended for use 00029 * with the Keil MicroVision (uVision) C compiler. 00030 * 00031 * --------------------------------------------------------------------------- 00032 */ 00033 #ifndef __rom400_init_ 00034 #define __rom400_init_ 00035 00071 #define ROM400_INIT_VERSION 17 00072 00073 00085 #ifdef MONITOR 00086 #define USE_KEIL_MONITOR init_usekeilmonitor(); 00087 #else 00088 #define USE_KEIL_MONITOR 00089 #endif 00090 00091 00096 #define INIT_DIVISOR_3MHZ 0x01 // 00000001B 00097 00102 #define INIT_DIVISOR_4MHZ 0x08 // 00001000B 00103 00108 #define INIT_DIVISOR_5MHZ 0x02 // 00000010B 00109 00114 #define INIT_DIVISOR_6MHZ 0x05 // 00000101B 00115 00120 #define INIT_DIVISOR_7MHZ 0x03 // 00000011B 00121 00126 #define INIT_DIVISOR_8MHZ 0x0C // 00001100B 00127 00132 #define INIT_DIVISOR_10MHZ 0x06 // 00000110B 00133 00138 #define INIT_DIVISOR_12MHZ 0x09 // 00001001B 00139 00144 #define INIT_DIVISOR_14MHZ 0x07 // 00000111B 00145 00150 #define INIT_DIVISOR_16MHZ 0x10 // 00010000B 00151 00156 #define INIT_DIVISOR_20MHZ 0x0A // 00001010B 00157 00162 #define INIT_DIVISOR_24MHZ 0x0D // 00001101B 00163 00168 #define INIT_DIVISOR_28MHZ 0x0B // 00001011B 00169 00174 #define INIT_DIVISOR_32MHZ 0x14 // 00010100B 00175 00180 #define INIT_DIVISOR_40MHZ 0x0E // 00001110B 00181 00186 #define INIT_DIVISOR_48MHZ 0x11 // 00010001B 00187 00192 #define INIT_DIVISOR_56MHZ 0x0F // 00001111B 00193 00198 #define INIT_DIVISOR_64MHZ 0x18 // 00011000B 00199 00204 #define INIT_DIVISOR_80MHZ 0x12 // 00010010B 00205 00210 #define INIT_DIVISOR_96MHZ 0x15 // 00010101B 00211 00216 #define INIT_DIVISOR_112MHZ 0x13 // 00010011B 00217 00222 #define INIT_DIVISOR_128MHZ 0x1C // 00011100B 00223 00224 /* 00225 OWM_DIVISOR_TABLE: 00226 ; Clock Rate (MHz) Divisor to use 00227 db 3, 00001B 00228 db 4, 01000B 00229 db 5, 00010B 00230 db 6, 00101B 00231 db 7, 00011B 00232 db 8, 01100B 00233 db 10, 00110B 00234 db 12, 01001B 00235 db 14, 00111B 00236 db 16, 10000B 00237 db 20, 01010B 00238 db 24, 01101B 00239 db 28, 01011B 00240 db 32, 10100B 00241 db 40, 01110B 00242 db 48, 10001B 00243 db 56, 01111B 00244 db 64, 11000B 00245 db 80, 10010B 00246 db 96, 10101B 00247 db 112, 10011B 00248 OWM_DIVISOR_TABLE_MAX: 00249 db 128, 11100B 00250 */ 00251 00252 00257 #define INIT_POWERFAIL_RESET 0x08 00258 00263 #define INIT_WATCHDOG_RESET 0x10 00264 00269 #define INIT_CRYSTALFAIL_RESET 0x20 00270 00271 00276 extern void HEAP_START(void); 00277 #define DEFAULT_HEAP_START ((((long)&HEAP_START)&0x7fffffL)-0x10000L) 00278 00279 00337 //--------------------------------------------------------------------------- 00338 void init_rom(unsigned long mem_start_address, unsigned long mem_end_address); 00339 00346 //--------------------------------------------------------------------------- 00347 void init_netboot(void); 00348 00356 //--------------------------------------------------------------------------- 00357 void init_copyivt(void); 00358 00366 //--------------------------------------------------------------------------- 00367 void init_redirect(void); 00368 00376 //--------------------------------------------------------------------------- 00377 void init_clearSystemRAM(void); 00378 00388 //--------------------------------------------------------------------------- 00389 void init_clearXSEG(void); 00390 00413 //--------------------------------------------------------------------------- 00414 void init_mm(unsigned long mem_start_address, unsigned long mem_end_address); 00415 00423 //--------------------------------------------------------------------------- 00424 void init_km(void); 00425 00460 //--------------------------------------------------------------------------- 00461 void init_ow(unsigned char DIVISOR); 00462 00470 //--------------------------------------------------------------------------- 00471 void init_network(void); 00472 00480 //--------------------------------------------------------------------------- 00481 void init_eth(void); 00482 00490 //--------------------------------------------------------------------------- 00491 void init_sockets(void); 00492 00500 //--------------------------------------------------------------------------- 00501 void init_tick(void); 00502 00510 //--------------------------------------------------------------------------- 00511 void init_enableinterrupts(void); 00512 00532 //--------------------------------------------------------------------------- 00533 void init_usekeilmonitor(void); 00534 00535 //void init_resetMII(void); 00536 00542 //--------------------------------------------------------------------------- 00543 unsigned int init_version(void); 00544 00545 00561 //--------------------------------------------------------------------------- 00562 unsigned char init_getbootstate(void); 00563 00564 00580 //--------------------------------------------------------------------------- 00581 void init_setclock(unsigned int value); 00582 00597 //--------------------------------------------------------------------------- 00598 #define init_setfrequency(clock) init_setclock(((clock)*5L)/6) 00599 00600 #endif
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |