This library contains functions for initializing the functionality in the ROM. Note that the preferred way of initializing the ROM is to simply call the init_rom function. However, you can also initialize the various modules individually. To do this, call these functions in this order:
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
Functions in this library should only be called once on startup. The safety of calling these functions from multiple processes at the same time is irrelevant.
Go to the source code of this file.
Defines | |
| #define | ROM400_INIT_VERSION 19 |
| #define | USE_KEIL_MONITOR |
| #define | INIT_DIVISOR_3MHZ 0x01 |
| #define | INIT_DIVISOR_4MHZ 0x08 |
| #define | INIT_DIVISOR_5MHZ 0x02 |
| #define | INIT_DIVISOR_6MHZ 0x05 |
| #define | INIT_DIVISOR_7MHZ 0x03 |
| #define | INIT_DIVISOR_8MHZ 0x0C |
| #define | INIT_DIVISOR_10MHZ 0x06 |
| #define | INIT_DIVISOR_12MHZ 0x09 |
| #define | INIT_DIVISOR_14MHZ 0x07 |
| #define | INIT_DIVISOR_16MHZ 0x10 |
| #define | INIT_DIVISOR_20MHZ 0x0A |
| #define | INIT_DIVISOR_24MHZ 0x0D |
| #define | INIT_DIVISOR_28MHZ 0x0B |
| #define | INIT_DIVISOR_32MHZ 0x14 |
| #define | INIT_DIVISOR_40MHZ 0x0E |
| #define | INIT_DIVISOR_48MHZ 0x11 |
| #define | INIT_DIVISOR_56MHZ 0x0F |
| #define | INIT_DIVISOR_64MHZ 0x18 |
| #define | INIT_DIVISOR_80MHZ 0x12 |
| #define | INIT_DIVISOR_96MHZ 0x15 |
| #define | INIT_DIVISOR_112MHZ 0x13 |
| #define | INIT_DIVISOR_128MHZ 0x1C |
| #define | INIT_POWERFAIL_RESET 0x08 |
| #define | INIT_WATCHDOG_RESET 0x10 |
| #define | INIT_CRYSTALFAIL_RESET 0x20 |
| #define | DEFAULT_HEAP_START ((((long)&HEAP_START)&0x7fffffL)-0x10000L) |
| #define | init_setfrequency(clock) init_setclock(((clock)*5L)/60) |
| Sets the crystal frequency. | |
Functions | |
| void | HEAP_START (void) |
| void | init_rom (unsigned long mem_start_address, unsigned long mem_end_address) |
| Initializes the modules in the ROM. | |
| void | init_netboot (void) |
| Starts the netboot functionality. Note that this will negate any initialization that has already been performed. | |
| void | init_copyivt (void) |
| Copies the interrupt vector table into memory. | |
| void | init_redirect (void) |
| Sets up the redirect table for ROM redirected calls. | |
| void | init_sched (void) |
| Sets up the default task scheduler. | |
| void | init_clearXSEG (void) |
| Clears system variables in external RAM. | |
| void | init_mm (unsigned long mem_start_address, unsigned long mem_end_address) |
| Initializes the heap. | |
| void | init_km (void) |
| Initializes fast kernel memory. | |
| void | init_ow (unsigned char DIVISOR) |
| Initializes the internal 1-Wire. | |
| void | init_network (void) |
| Initializes the network. | |
| void | init_eth (void) |
| Initializes the ethernet support. | |
| void | init_sockets (void) |
| Initializest the socket layer. | |
| void | init_tick (void) |
| Initializes the system timer. | |
| void | init_enableinterrupts (void) |
| Enables system interrupts. | |
| void | init_usekeilmonitor (void) |
| Performs initialization necessary for using the Keil Monitor. | |
| unsigned int | init_version (void) |
| Returns the version number of this initialization library. | |
| unsigned char | init_getbootstate (void) |
| Returns the boot status flags. | |
| void | init_setclock (unsigned int value) |
| Sets the crystal frequency. | |
|
|
Defines the default start address for the heap.
|
|
|
Crystal failure reset status.
|
|
|
1-Wire divisor value for operating frequencies greater than 10 MHz but less than 12 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 112 MHz but less than 128 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 128 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 12 MHz but less than 14 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 14 MHz but less than 16 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 16 MHz but less than 20 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 20 MHz but less than 24 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 24 MHz but less than 28 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 28 MHz but less than 32 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 32 MHz but less than 40 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 3 MHz but less than 4 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 40 MHz but less than 48 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 48 MHz but less than 56 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 4 MHz but less than 5 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 56 MHz but less than 64 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 5 MHz but less than 6 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 64 MHz but less than 80 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 6 MHz but less than 7 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 7 MHz but less than 8 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 80 MHz but less than 96 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 8 MHz but less than 10 MHz.
|
|
|
1-Wire divisor value for operating frequencies greater than 96 MHz but less than 112 MHz.
|
|
|
Power fail reset status.
|
|
|
Sets the crystal frequency.
|
|
|
Watchdog reset status.
|
|
|
Version number associated with this header file. Should be the same as the version number returned by the init_version function.
|
|
|
Macro that allows the use of a define to determine whether or not to call the function init_usekeilmonitor. This macro can be called after calling init_rom, and will correct some monitor configuration details that are destroyed when init_rom is called.
|
|
|
Used to calculate the default start address for the heap.
|
|
|
Clears system variables in external RAM. Note that calling init_rom is the preferred way of initializing the ROM. This function also sets the EPFI bit.
|
|
|
Copies the interrupt vector table into memory. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Enables system interrupts. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Initializes the ethernet support. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Returns the boot status flags. The status flags are defined as follows: Status.3 (0x08) - Power Fail Reset INIT_POWERFAIL_RESET Status.4 (0x10) - Watchdog Reset INIT_WATCHDOG_RESET Status.5 (0x20) - Crystal Oscillator Failure Reset INIT_CRYSTALFAIL_RESET All other bits are reserved, but not necessarily 0.
|
|
|
Initializes fast kernel memory. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
||||||||||||
|
Initializes the heap. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Starts the netboot functionality. Note that this will negate any initialization that has already been performed.
|
|
|
Initializes the network. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Initializes the internal 1-Wire. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Sets up the redirect table for ROM redirected calls. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
||||||||||||
|
Initializes the modules in the ROM. Initializes the network stack, memory manager, process scheduler, and other modules in the DS80C400 Silicon Software. Calling this method is the preferred way of initializing the ROM. Note that calling this function will cause the ROM to copy its own interrupt table into memory. If you have any interrupts installed before calling this function (for instance, you use the Keil compilers interrupt keyword to declare your function an interrupt handler), the entry in the interrupt table will be erased.
init_rom prints status information to the serial port if serial 0 is set to use timer 2. If that is not desired, clear tr2. init_rom will probe all available 1-Wire devices for an approximate clock frequency and it will try to find a DS2502-E48 for an Ethernet MAC address. If no DS2502-E48 is present, you must use init_setfrequency to specify a clock frequency, and you must modify startup.a51 to manually set a MAC address.
Start address examples...
|
|
|
Sets up the default task scheduler. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Sets the crystal frequency.
|
|
|
Initializest the socket layer. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Initializes the system timer. Note that calling init_rom is the preferred way of initializing the ROM.
|
|
|
Performs initialization necessary for using the Keil Monitor. Performs initialization needed when using the Keil MON390 Monitor to debug programs that access the DS80C400's ROM. This function should be called after calling init_rom, and only if the monitor will be used. This file includes a macro USE_KEIL_MONITOR which is defined to call this function if MONITOR is defined. Use the following code to make use of this macro:
|
|
|
Returns the version number of this initialization library.
|
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |