00001 /*--------------------------------------------------------------------------- 00002 * Copyright (C) 2003-2006 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 00036 #pragma SAVE 00037 #pragma REGPARMS 00038 00074 #define ROM400_INIT_VERSION 19 00075 00076 00088 #ifdef MONITOR 00089 #define USE_KEIL_MONITOR init_usekeilmonitor(); 00090 #else 00091 #define USE_KEIL_MONITOR 00092 #endif 00093 00094 00099 #define INIT_DIVISOR_3MHZ 0x01 // 00000001B 00100 00105 #define INIT_DIVISOR_4MHZ 0x08 // 00001000B 00106 00111 #define INIT_DIVISOR_5MHZ 0x02 // 00000010B 00112 00117 #define INIT_DIVISOR_6MHZ 0x05 // 00000101B 00118 00123 #define INIT_DIVISOR_7MHZ 0x03 // 00000011B 00124 00129 #define INIT_DIVISOR_8MHZ 0x0C // 00001100B 00130 00135 #define INIT_DIVISOR_10MHZ 0x06 // 00000110B 00136 00141 #define INIT_DIVISOR_12MHZ 0x09 // 00001001B 00142 00147 #define INIT_DIVISOR_14MHZ 0x07 // 00000111B 00148 00153 #define INIT_DIVISOR_16MHZ 0x10 // 00010000B 00154 00159 #define INIT_DIVISOR_20MHZ 0x0A // 00001010B 00160 00165 #define INIT_DIVISOR_24MHZ 0x0D // 00001101B 00166 00171 #define INIT_DIVISOR_28MHZ 0x0B // 00001011B 00172 00177 #define INIT_DIVISOR_32MHZ 0x14 // 00010100B 00178 00183 #define INIT_DIVISOR_40MHZ 0x0E // 00001110B 00184 00189 #define INIT_DIVISOR_48MHZ 0x11 // 00010001B 00190 00195 #define INIT_DIVISOR_56MHZ 0x0F // 00001111B 00196 00201 #define INIT_DIVISOR_64MHZ 0x18 // 00011000B 00202 00207 #define INIT_DIVISOR_80MHZ 0x12 // 00010010B 00208 00213 #define INIT_DIVISOR_96MHZ 0x15 // 00010101B 00214 00219 #define INIT_DIVISOR_112MHZ 0x13 // 00010011B 00220 00225 #define INIT_DIVISOR_128MHZ 0x1C // 00011100B 00226 00227 /* 00228 OWM_DIVISOR_TABLE: 00229 ; Clock Rate (MHz) Divisor to use 00230 db 3, 00001B 00231 db 4, 01000B 00232 db 5, 00010B 00233 db 6, 00101B 00234 db 7, 00011B 00235 db 8, 01100B 00236 db 10, 00110B 00237 db 12, 01001B 00238 db 14, 00111B 00239 db 16, 10000B 00240 db 20, 01010B 00241 db 24, 01101B 00242 db 28, 01011B 00243 db 32, 10100B 00244 db 40, 01110B 00245 db 48, 10001B 00246 db 56, 01111B 00247 db 64, 11000B 00248 db 80, 10010B 00249 db 96, 10101B 00250 db 112, 10011B 00251 OWM_DIVISOR_TABLE_MAX: 00252 db 128, 11100B 00253 */ 00254 00255 00260 #define INIT_POWERFAIL_RESET 0x08 00261 00266 #define INIT_WATCHDOG_RESET 0x10 00267 00272 #define INIT_CRYSTALFAIL_RESET 0x20 00273 00278 extern void HEAP_START(void); 00279 00284 #define DEFAULT_HEAP_START ((((long)&HEAP_START)&0x7fffffL)-0x10000L) 00285 00286 00349 //--------------------------------------------------------------------------- 00350 void init_rom(unsigned long mem_start_address, unsigned long mem_end_address); 00351 00358 //--------------------------------------------------------------------------- 00359 void init_netboot(void); 00360 00368 //--------------------------------------------------------------------------- 00369 void init_copyivt(void); 00370 00378 //--------------------------------------------------------------------------- 00379 void init_redirect(void); 00380 00388 //--------------------------------------------------------------------------- 00389 void init_sched(void); 00390 00400 //--------------------------------------------------------------------------- 00401 void init_clearXSEG(void); 00402 00425 //--------------------------------------------------------------------------- 00426 void init_mm(unsigned long mem_start_address, unsigned long mem_end_address); 00427 00435 //--------------------------------------------------------------------------- 00436 void init_km(void); 00437 00472 //--------------------------------------------------------------------------- 00473 void init_ow(unsigned char DIVISOR); 00474 00482 //--------------------------------------------------------------------------- 00483 void init_network(void); 00484 00492 //--------------------------------------------------------------------------- 00493 void init_eth(void); 00494 00502 //--------------------------------------------------------------------------- 00503 void init_sockets(void); 00504 00512 //--------------------------------------------------------------------------- 00513 void init_tick(void); 00514 00522 //--------------------------------------------------------------------------- 00523 void init_enableinterrupts(void); 00524 00544 //--------------------------------------------------------------------------- 00545 void init_usekeilmonitor(void); 00546 00547 //void init_resetMII(void); 00548 00554 //--------------------------------------------------------------------------- 00555 unsigned int init_version(void); 00556 00557 00573 //--------------------------------------------------------------------------- 00574 unsigned char init_getbootstate(void); 00575 00576 00592 //--------------------------------------------------------------------------- 00593 void init_setclock(unsigned int value); 00594 00609 //--------------------------------------------------------------------------- 00610 #define init_setfrequency(clock) init_setclock(((clock)*5L)/60) 00611 00612 #pragma RESTORE 00613 #endif
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |