VxWorks BSP Reference : wrMdpPro8xx
sysLib [wrMdpPro8xx] - system-dependent library
sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusIntAck( ) - acknowledge a bus interrupt
sysBusIntGen( ) - generate a bus interrupt
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
sysMailboxEnable( ) - enable the mailbox interrupt
sysBusTas( ) - test and set a location across the bus
sysSerialHwInit2( ) - connect BSP serial device interrupts
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
sysSerialReset( ) - reset the serail device
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
eepromNvRamSetup( ) - setup non-volatile ram system
eepromReadByte( ) - read one byte of Non-Volatile Ram
eepromWriteByte( ) - write one byte to Non-Volatile Ram
eepromUnlock( ) - Unlock the eeprom via the software protection mechanism
eepromLock( ) - Lock the eeprom via the software protection mechanism
eepromDelay( ) - eeprom delay routine
sysLedBarOn( ) - turn all the LED's on.
sysLedBarAllOn( ) - turn selected LED on.
sysLedBarOff( ) - turn selected LED off.
sysLedBarAllOff( ) - turn off all LED's.
sysClkConnect( ) - connect a routine to the system clock interrupt
sysClkEnable( ) - turn on system clock interrupts
sysClkDisable( ) - turn off system clock interrupts
sysClkRateGet( ) - get the system clock rate
sysClkRateSet( ) - set the system clock rate
sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt
sysAuxClkDisable( ) - turn off auxiliary clock interrupts
sysAuxClkEnable( ) - turn on auxiliary clock interrupts
sysAuxClkRateGet( ) - get the auxiliary clock rate
sysAuxClkRateSet( ) - set the auxiliary clock rate
sysTimestampConnect( ) - connect a user routine to the timestamp timer interrupt
sysTimestampEnable( ) - initialize and enable the timestamp timer
sysTimestampDisable( ) - turn off auxiliary clock interrupts
sysTimestampPeriod( ) - get the period of a timestamp timer
sysTimestampFreq( ) - get a timestamp timer clock frequency
sysTimestamp( ) - get a timestamp timer tick count
sysTimestampLock( ) - lock interrupts and get the timestamp timer tick count
sysCheckIfVware( ) - check if we were lunched by vWARE
sysMotCpmEndLoad( ) - load an istance of the motCpmEnd driver
sysCpmEnetDisable( ) - disable the Ethernet controller
sysCpmEnetEnable( ) - enable the Ethernet controller
sysCpmEnetAddrGet( ) - get the hardware Ethernet address
sysCpmEnetCommand( ) - issue a command code to the ethernet controller.
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
sysNetHwInit( ) - initialize the network interface
sysNetHwInit2( ) - initialize additional features of the network interface
sysEnetAddrGet( ) - gets the 6 byte ethernet address
sysEnetAddrSet( ) - sets the 6 byte ethernet address
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the BSP version and revision number
sysHwInit( ) - initialize the system hardware
sysPhysMemTop( ) - get the address of the top of physical memory
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysHwInit2( ) - initialize additional system hardware
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysCpuNum( ) - determines CPU Number: 860,823, etc.
sysCpuType( ) - determines the 8xx CPU type
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency
sysCpuSpeed( ) - determines operating frequence via PLPRCR Register
sysCpuSpeedAdjust( ) - change CPU Speed via PLPRCR
sysCpmReset( ) - issues a CPM reset command
sysMsDelay( ) - delay for the specified amount of time (MS)
sysDelay( ) - delay for approx. 1ms
sysIntEnablePIC( ) - enable an ISA/PCI interrupt
sysIntDisablePIC( ) - disable an ISA/PCI interrupt
Depending on the value of CPU passed to the system by the compiler command line, the CPU_FAMILY is defined. This must be the first header file included by vxWorks.h.
sysLocalToBusAdrs( ) - convert a local address to a bus address
STATUS sysLocalToBusAdrs ( int adrsSpace, /* bus address space in which busAdrs */ /* resides, use address modifier codes defined */ /* in vme.h, such as VME_AM_STD_SUP_DATA */ char * localAdrs, /* local address to convert */ char * *pBusAdrs /* where to return bus address */ )
This routine gets the VMEbus address that accesses a specified local memory address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusToLocalAdrs( ) - convert a bus address to a local address
STATUS sysBusToLocalAdrs ( int adrsSpace, /* bus address space in which busAdrs */ /* resides, use address modifier codes defined */ /* in vme.h, such as VME_AM_STD_SUP_DATA */ char * busAdrs, /* bus address to convert */ char * *pLocalAdrs /* where to return local address */ )
This routine gets the local address that accesses a specified VMEbus address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusIntAck( ) - acknowledge a bus interrupt
int sysBusIntAck ( int intLevel /* interrupt level to acknowledge */ )
This routine acknowledges a specified VMEbus interrupt level.
This routine has no effect, since there is no VMEbus.
NULL.
sysBusIntGen( ) - generate a bus interrupt
STATUS sysBusIntGen ( int level, /* bus interrupt level to generate */ int vector /* interrupt vector to return (0-255) */ )
This routine generates a VMEbus interrupt for a specified level with a specified vector.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
STATUS sysMailboxConnect ( FUNCPTR routine, /* routine called at each mailbox interrupt */ int arg /* argument with which to call routine */ )
This routine specifies the interrupt service routine to be called at each mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysMailboxEnable( ) - enable the mailbox interrupt
STATUS sysMailboxEnable ( INT8 * mailboxAdrs /* mailbox address */ )
This routine enables the mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysBusTas( ) - test and set a location across the bus
BOOL sysBusTas ( INT8 * addr /* address to be tested and set */ )
This routine performs a test-and-set (TAS) instruction across the backplane.
This routine is equivalent to vxTas( ), since there is no VMEbus.
TRUE if the value had not been set but is now, or FALSE if the value was set already.
sysSerialHwInit2( ) - connect BSP serial device interrupts
void sysSerialHwInit2 (void)
This routine connects the BSP serial device interrupts. It is called from sysHwInit2( ). Serial device interrupts could not be connected in sysSerialHwInit( ) because the kernel memory allocator was not initialized at that point, and intConnect( ) calls malloc( ).
N/A
sysLib, sysHwInit2( )
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
SIO_CHAN *sysSerialChanGet ( int channel /* serial channel */ )
This routine gets the SIO_CHAN device associated with a specified serial channel.
A pointer to the SIO_CHAN structure for the channel, or ERROR if the channel is invalid.
sysSerialReset( ) - reset the serail device
void sysSerialReset (void)
This function calls sysSerialHwInit( ) to reset the serail device
N/A
ppc860IntrInit( ) - initialize the interrupt manager for the PowerPC 800 series
STATUS ppc860IntrInit ( VOIDFUNCPTR * cpmIntrVec /* Intr level of the CPM Intr ctrl */ )
This routine connects the default demultiplexers, ppc860IntrDeMux( ) and ppc860CpmIntrDeMux, to the external interrupt vector and associates all interrupt sources with the default interrupt handler. This routine is called by sysHwInit( ) in sysLib.c.
All interrupt from the SIU and CPM unit are enabled, CICR is setup so that SCC1 has the highest relative interrupt priority, through SCC4 with the lowest.
OK or ERROR if the SUI interrupt level to connect the CPM interrupt contoller is wrong.
sysNvRamGet( ) - get the contents of non-volatile RAM
STATUS sysNvRamGet ( char * string, /* where to copy non-volatile RAM */ int strLen, /* maximum number of bytes to copy */ int offset /* byte offset into non-volatile RAM */ )
This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.
OK, or ERROR if access is outside the non-volatile RAM range.
sysLib, sysNvRamSet( )
sysNvRamSet( ) - write to non-volatile RAM
STATUS sysNvRamSet ( char * string, /* string to be copied into non-volatile RAM */ int strLen, /* maximum number of bytes to copy */ int offset /* byte offset into non-volatile RAM */ )
This routine copies a specified string into non-volatile RAM.
OK, or ERROR if access is outside the non-volatile RAM range.
sysLib, sysNvRamGet( )
eepromNvRamSetup( ) - setup non-volatile ram system
void eepromNvRamSetup (void)
This routine setup the Non-Volatile RAM.
N/A
sysLib, eepromReadByte( ), eepromWriteByte( ), eepromUnlock( ), eepromLock( )
eepromReadByte( ) - read one byte of Non-Volatile Ram
UINT8 eepromReadByte ( int offset )
This routine read one byte of Non-Volatile RAM.
One byte of data.
sysLib, eepromNvRamSetup( ), eepromWriteByte( ), eepromUnlock( ), eepromLock( )
eepromWriteByte( ) - write one byte to Non-Volatile Ram
STATUS eepromWriteByte ( int offset, UINT8 data )
This routine write one byte of data to nonvolatile ram.
OK or ERROR if cannot write nvram
sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromUnlock( ), eepromLock( )
eepromUnlock( ) - Unlock the eeprom via the software protection mechanism
void eepromUnlock (void)
This routine unlock the eeprom via the software protection mechanism.
N/A
sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromWriteByte( ), eepromLock( )
eepromLock( ) - Lock the eeprom via the software protection mechanism
void eepromLock (void)
This routine lock the eeprom via the software protection mechanism.
N/A
sysLib, eepromNvRamSetup( ), eepromReadByte( ), eepromWriteByte( ), eepromUnlock( )
eepromDelay( ) - eeprom delay routine
void eepromDelay ( ULONG delay )
This routine is the eeprom delay routine.
N/A
sysLedBarOn( ) - turn all the LED's on.
void sysLedBarOn ( UCHAR value, UCHAR action )
This routine set the selected LED to on.
N/A.
sysLib, sysLedBarAllOn( ), sysLedBarOff( ), sysLedBarAllOff( ).
sysLedBarAllOn( ) - turn selected LED on.
void sysLedBarAllOn (void)
This routine set all the LED's on.
N/A.
sysLib, sysLedBarOn( ), sysLedBarOff( ), sysLedBarAllOff( ).
sysLedBarOff( ) - turn selected LED off.
void sysLedBarOff ( UCHAR value, UCHAR action )
This routine set the selected LED to off.
N/A.
sysLib, sysLedBarOn( ), sysLedBarAllOn( ), sysLedBarAllOff( ), sysLedBarTest( ).
sysLedBarAllOff( ) - turn off all LED's.
void sysLedBarAllOff (void)
This routine set all LED's to off.
N/A.
sysLib, sysLedBarOn( ), sysLedBarAllOn( ), sysLedBarOff( ).
sysClkConnect( ) - connect a routine to the system clock interrupt
STATUS sysClkConnect ( FUNCPTR routine, /* routine to connect */ int arg /* argument for the routine */ )
This routine specifies the interrupt service routine to be called at each clock interrupt. Normally, it is called from usrRoot( ) in usrConfig.c to connect usrClock( ) to the system clock interrupt.
OK, or ERROR if the routine cannot be connected to the interrupt.
sysLib, intConnect( ), usrClock( ), sysClkEnable( )
sysClkEnable( ) - turn on system clock interrupts
void sysClkEnable (void)
This routine enables system clock interrupts.
N/A
sysLib, sysClkConnect( ), sysClkDisable( ), sysClkRateSet( )
sysClkDisable( ) - turn off system clock interrupts
void sysClkDisable (void)
This routine disables system clock interrupts.
N/A
sysLib, sysClkEnable( )
sysClkRateGet( ) - get the system clock rate
int sysClkRateGet (void)
This routine returns the system clock rate.
The number of ticks per second of the system clock.
sysLib, sysClkEnable( ), sysClkRateSet( )
sysClkRateSet( ) - set the system clock rate
STATUS sysClkRateSet ( int ticksPerSecond /* number of clock interrupts per second */ )
This routine sets the interrupt rate of the system clock. It is called by usrRoot( ) in usrConfig.c.
OK, or ERROR if the tick rate is invalid or the timer cannot be set.
sysLib, sysClkEnable( ), sysClkRateGet( )
sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt
STATUS sysAuxClkConnect ( FUNCPTR routine, /* routine called at each aux. clock interrupt */ int arg /* argument to auxiliary clock interrupt */ /* routine */ )
This routine specifies the interrupt service routine to be called at each auxiliary clock interrupt. It does not enable auxiliary clock interrupts.
OK, or ERROR if the routine cannot be connected to the interrupt.
sysLib, intConnect( ), sysAuxClkEnable( )
sysAuxClkDisable( ) - turn off auxiliary clock interrupts
void sysAuxClkDisable (void)
This routine disables auxiliary clock interrupts.
N/A
sysAuxClkEnable( ) - turn on auxiliary clock interrupts
void sysAuxClkEnable (void)
This routine enables auxiliary clock interrupts.
N/A
sysLib, sysAuxClkConnect( ), sysAuxClkDisable( ), sysAuxClkRateSet( )
sysAuxClkRateGet( ) - get the auxiliary clock rate
int sysAuxClkRateGet (void)
This routine returns the interrupt rate of the auxiliary clock.
The number of ticks per second of the auxiliary clock.
sysLib, sysAuxClkEnable( ), sysAuxClkRateSet( )
sysAuxClkRateSet( ) - set the auxiliary clock rate
STATUS sysAuxClkRateSet ( int ticksPerSecond /* number of clock interrupts per second */ )
This routine sets the interrupt rate of the auxiliary clock. It does not enable auxiliary clock interrupts.
OK, or ERROR if the tick rate is invalid or the timer cannot be set.
sysLib, sysAuxClkEnable( ), sysAuxClkRateGet( )
sysTimestampConnect( ) - connect a user routine to the timestamp timer interrupt
STATUS sysTimestampConnect ( FUNCPTR routine, /* routine called at each timestamp timer */ /* interrupt */ int arg /* argument with which to call routine */ )
This routine specifies the user interrupt routine to be called at each timestamp timer interrupt. It does not enable the timestamp timer itself.
OK, or ERROR if sysTimestampInt( ) interrupt handler is not used.
sysTimestampEnable( ) - initialize and enable the timestamp timer
STATUS sysTimestampEnable (void)
This routine connects interrupts, and enables the timer device
TRUE always
sysTimestampDisable( ) - turn off auxiliary clock interrupts
STATUS sysTimestampDisable (void)
This routine disables auxiliary clock interrupts.
OK, always
sysTimestampPeriod( ) - get the period of a timestamp timer
UINT32 sysTimestampPeriod (void)
This routine gets the period of the timestamp timer, in ticks. The period, or terminal count, is the number of ticks to which the timestamp timer counts before rolling over and restarting the counting process.
The period of the timestamp timer in counter ticks.
sysTimestampFreq( ) - get a timestamp timer clock frequency
UINT32 sysTimestampFreq (void)
This routine gets the frequency of the timer clock, in ticks per second. The rate of the timestamp timer is set explicitly by the hardware and typically cannot be altered.
Because the PowerPC decrementer clock serves as the timestamp timer, the decrementer clock frequency is also the timestamp timer frequency.
The timestamp timer clock frequency, in ticks per second.
sysTimestamp( ) - get a timestamp timer tick count
UINT32 sysTimestamp (void)
This routine returns the current value of the timestamp timer tick counter. The tick count can be converted to seconds by dividing it by the return of sysTimestampFreq( ).
This routine should be called with interrupts locked. If interrupts are not locked, sysTimestampLock( ) should be used instead.
The current timestamp timer tick count.
sysLib, sysTimestampFreq( ), sysTimestampLock( )
sysTimestampLock( ) - lock interrupts and get the timestamp timer tick count
UINT32 sysTimestampLock (void)
This routine locks interrupts when the tick counter must be stopped in order to read it or when two independent counters must be read. It then returns the current value of the timestamp timer tick counter.
The tick count can be converted to seconds by dividing it by the return of sysTimestampFreq( ).
If interrupts are already locked, sysTimestamp( ) should be used instead.
The current timestamp timer tick count.
sysLib, sysTimestampFreq( ), sysTimestamp( )
sysCheckIfVware( ) - check if we were lunched by vWARE
BOOL sysCheckIfVware (void)
This routine check if we were lunched by vWARE
TRUE if yes, FALSE if no
sysLib, sysVwareBuildBootLine( ), sysVware2BuildBootLine( ), sysVware1BuildBootLine( )
sysMotCpmEndLoad( ) - load an istance of the motCpmEnd driver
END_OBJ *sysMotCpmEndLoad ( char * pParamStr, /* ptr to initialization parameter string */ void * unused /* unused optional argument */ )
This routine loads the motCpmEnd driver with proper parameters. It also reads the BCSR3 to find out which type of processor is being used, and sets up the load string accordingly.
The END device load string formed by this routine is in the following format. motCpmAddr:ivec:sccNum:txBdNum:rxBdNum:txBdBase:rxBdBase: bufBase
This routine only loads and initializes one instance of the device. If the user wishes to use more than one motCpmEnd devices, this routine should be changed.
pointer to END object or NULL.
sysLib, motCpmEndLoad ()
sysCpmEnetDisable( ) - disable the Ethernet controller
void sysCpmEnetDisable ( int unit )
This routine is expected to perform any target specific functions required to disable the Ethernet controller. This usually involves disabling the Transmit Enable (TENA) signal.
N/A
sysCpmEnetEnable( ) - enable the Ethernet controller
STATUS sysCpmEnetEnable ( int unit )
This routine is expected to perform any target specific functions required to enable the Ethernet controller. These functions typically include enabling the Transmit Enable signal (TENA) and connecting the transmit and receive clocks to the SCC.
OK, or ERROR if the Ethernet controller cannot be enabled.
sysCpmEnetAddrGet( ) - get the hardware Ethernet address
STATUS sysCpmEnetAddrGet ( int unit, /* not used - only slave SCC1 is wired to port */ UINT8 * pAddr /* Location address is returned in */ )
This routine provides the six byte Ethernet hardware address that will be used by each individual Ethernet device unit. This routine must copy the six byte address to the space provided by addr.
OK, or ERROR if the Ethernet address cannot be returned.
sysCpmEnetCommand( ) - issue a command code to the ethernet controller.
STATUS sysCpmEnetCommand ( int unit, UINT16 command /* Command to be issued */ )
This routine issue a command code to the ethernet controller.
OK
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
void sysCpmEnetIntEnable ( int unit )
This routine disable the interrupt for the Ethernet interface specified by unit.
N/A.
sysCpmEnetIntDisable( ) - disable the Ethernet interface interrupt
void sysCpmEnetIntDisable ( int unit )
This routine disable the interrupt for the Ethernet interface specified by unit.
N/A.
sysCpmEnetIntClear( ) - clear the Ethernet interface interrupt
void sysCpmEnetIntClear ( int unit )
This routine clears the interrupt for the Ethernet interface specified by unit.
N/A.
sysNetHwInit( ) - initialize the network interface
void sysNetHwInit (void)
This routine initializes the network hardware to a quiescent state. It does not connect interrupts.
Only polled mode operation is possible after calling this routine. Interrupt mode operation is possible after the memory system has been initialized and sysNetHwInit2( ) has been called.
sysNetHwInit2( ) - initialize additional features of the network interface
void sysNetHwInit2 (void)
This routine completes initialization needed for interrupt mode operation of the network device drivers. Interrupt handlers can be connected. Interrupt or DMA operations can begin.
sysEnetAddrGet( ) - gets the 6 byte ethernet address
STATUS sysEnetAddrGet ( int unit, /* not used - only slave SCC1 is wired to port */ UINT8 * pAddr /* LOcation address is returned in */ )
This routine gets the 6 byte ethernet address used by the ethernet device.
OK
sysLib, sysEnetAddrSet( )
sysEnetAddrSet( ) - sets the 6 byte ethernet address
void sysEnetAddrSet ( UCHAR byte5, UCHAR byte4, UCHAR byte3, UCHAR byte2, UCHAR byte1, UCHAR byte0 )
This routine sets the 6 byte ethernet address used by the ethernet device.
OK
sysLib, sysEnetAddrGet( )
sysModel( ) - return the model name of the CPU board
char *sysModel (void)
This routine returns the model name of the CPU board.
A pointer to the string.
sysBspRev( ) - return the BSP version and revision number
char *sysBspRev (void)
This routine returns a pointer to a BSP version and revision number, for example, 1.2/0. BSP_REV is concatenated to BSP_VERSION and returned.
A pointer to the BSP version/revision string.
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various feature of the EST MPC8260 board. It sets up the control registers, initializes various devices if they are present.
This routine should not be called directly by the user.
N/A
sysPhysMemTop( ) - get the address of the top of physical memory
char *sysPhysMemTop (void)
This routine returns the address of the first missing byte of memory, which indicates the top of memory.
Normally, the user specifies the amount of physical memory with the macro LOCAL_MEM_SIZE in config.h. BSPs that support run-time memory sizing do so only if the macro LOCAL_MEM_AUTOSIZE is defined. If not defined, then LOCAL_MEM_SIZE is assumed to be, and must be, the true size of physical memory.
Do no adjust LOCAL_MEM_SIZE to reserve memory for application use. See sysMemTop( ) for more information on reserving memory.
The address of the top of physical memory.
sysMemTop( ) - get the address of the top of VxWorks memory
char *sysMemTop (void)
This routine returns a pointer to the first byte of memory not controlled or used by VxWorks.
The user can reserve memory space by defining the macro USER_RESERVED_MEM in config.h. This routine returns the address of the reserved memory area. The value of USER_RESERVED_MEM is in bytes.
The address of the top of VxWorks memory.
sysToMonitor( ) - transfer control to the ROM monitor
STATUS sysToMonitor ( int startType /* parameter passed to ROM to tell it how */ /* to boot */ )
This routine transfers control to the ROM monitor. Normally, it is called only by reboot( )--which services ^X--and by bus errors at interrupt level. However, in some circumstances, the user may wish to introduce a startType to enable special boot ROM facilities.
Does not return.
sysHwInit2( ) - initialize additional system hardware
void sysHwInit2 (void)
This routine connects system interrupt vectors and configures any required features not configured by sysHwInit( ).
N/A
sysProcNumGet( ) - get the processor number
int sysProcNumGet (void)
This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).
The processor number for the CPU board.
sysLib, sysProcNumSet( )
sysProcNumSet( ) - set the processor number
void sysProcNumSet ( int procNum /* processor number */ )
This routine sets the processor number for the CPU board. Processor numbers should be unique on a single backplane. It also maps local resources onto the VMEbus.
N/A
sysLib, sysProcNumGet( )
sysCpuNum( ) - determines CPU Number: 860,823, etc.
int sysCpuNum (void)
This routine determines CPU Number: 860,823, etc.
CPU num
sysCpuType( ) - determines the 8xx CPU type
BOOL sysCpuType ( int cpuType )
This routine determines the 8xx CPU type
CPU type
sysClkRateAdjust( ) - calculates proper decrementer frequency for a cpu frequency
void sysClkRateAdjust ( int * sysDecClkFrequency )
This routine calculates proper decrementer frequency for a cpu frequency
Speed in Hz
sysCpuSpeed( ) - determines operating frequence via PLPRCR Register
UINT32 sysCpuSpeed (void)
This routine determines operating frequence via PLPRCR Register
CPU speed in Hz
sysCpuSpeedAdjust( ) - change CPU Speed via PLPRCR
void sysCpuSpeedAdjust ( UINT32 speedMhz )
This routine change CPU Speed via PLPRCR
UPM values must be set for worst-case scenario (eg. 50Mhz)
N/A
sysCpmReset( ) - issues a CPM reset command
void sysCpmReset (void)
This routine issues a CPM reset command
N/A
sysMsDelay( ) - delay for the specified amount of time (MS)
void sysMsDelay ( UINT delay /* length of time in MS to delay */ )
This routine will delay for the specified amount of time by counting decrementer ticks.
This routine is not dependent on a particular rollover value for the decrementer, it should work no matter what the rollover value is.
A small amount of count may be lost at the rollover point resulting in the sysMsDelay( ) causing a slightly longer delay than requested.
This routine will produce incorrect results if the delay time requested requires a count larger than 0xffffffff to hold the decrementer elapsed tick count.
N/A
sysDelay( ) - delay for approx. 1ms
void sysDelay (void)
This implements an unsupported system call to support drivers ported from Intel platforms.
N/A
sysIntEnablePIC( ) - enable an ISA/PCI interrupt
STATUS sysIntEnablePIC ( int intNum )
This function call is used by certain vxWorks device drivers. It calls the system routine intEnable.
OK or ERROR
sysIntDisablePIC( ) - disable an ISA/PCI interrupt
STATUS sysIntDisablePIC ( int intNum )
This function call is used by certain vxWorks device drivers. It calls the system routine intDisable.
OK or ERROR