Site Index
   Support Home
   C6000 Home
   DaVinci EVM
   EVMDM6437
   EVM6424
   EVMDM642
   XEVM642
   DSKTCI6482
   EVMTCI6482
   DSK6455
   EVM6455
   EVM6418
   DSK6713
   DSK6416
   Ordering Info.
Google

C6000 Site
Support Site
Main Site

EVM6418 Board Setup Module

The Board Setup API provides general functions used for board initialization. The EVM6418_init() call must be made before any other BSL functions as it is responsible for all BSL initialization. The EVM6418_rget() and EVM6418_rset() functions are used to access to the asynchronous CPLD interface registers.

The following list summarizes the Board Setup API in terms of its function calls. All programs that use the BSL should include the evm6418.h header file.

Function Description
EVM6418_init Initialize the BSL
EVM6418_rget Read an 8-bit value from a CPLD register
EVM6418_rset Write an 8-bit value to a CPLD register
EVM6418_wait Wait for a specified number of cycles
EVM6418_waitusec Wait for a specified number of microseconds

In addition to other things, it contains several useful constants:

Name Typical Value Description
EVM6418_CPLD_BASE 0x900F0010 Address of CPLD in data space
EVM6418_USER_REG 0x0 Index of USER_REG CPLD register
EVM6418_DC_REG 0x1 Index of DC_REG CPLD register
EVM6418_VERSION 0x4 Index of VERSION CPLD register
EVM6418_MISC 0x6 Index of MISC CPLD register
EVM6418_LCD0 0x8 Index of LCD0 CPLD register
EVM6418_LCD1 0x9 Index of LCD1 CPLD register
EVM6418_BOARD 0xA Index of BOARD CPLD register

EVM6418_init()

Description
Sets all CPLD registers to their power-on states and initializes internal BSL data structures. Must be called before any other BSL functions.

Required Headers
evm6418.h

Required Libraries
evm6418bsl.lib

Function Prototype
void EVM6418_init( )

Parameters
None

Return Value
None

Example

    /* Initialize the board support library */
    EVM6418_init(); 

EVM6418_rget()

Description
Read an 8-bit value from a CPLD register.

Required Headers
evm6418.h

Required Libraries
evm6418bsl.lib

Function Prototype
Uint16 EVM6418_rget(Int16 regnum)

Parameters
regnum – Index of CPLD register.

Return Value
Value of CPLD register

Example

    /* Read the FPGA revision number */
    version = EVM6418_rget(EVM6418_VERSION);

EVM6418_rset()

Description
Write an 8-bit value to a CPLD register.

Required Headers
evm6418.h

Required Libraries
evm6418bsl.lib

Function Prototype
void EVM6418_rset(Int16 regnum, Uint16 regval)

Parameters
regnum – Index of CPLD register.
regval – Value to set the register to. Only the lower 8 bits are used.

Return Value
None

Example

    /* Turn all 8 LEDs on */
    EVM6418_rset(EVM6418_LED, 0xff); 

EVM6418_wait()

Description
Spin in a loop. Used for short timing loops.

Required Headers
evm6418.h

Required Libraries
evm6418bsl.lib

Function Prototype
void EVM6418_wait(Uint32 delay)

Parameters
delay – number of loop iterations to spin

Return Value
None

Example

    /* Spin for 100 loop iterations */
    EVM6418_wait(100);

EVM6418_waitusec()

Description
Spin in a loop for a number of microseconds. Used for short timing loops. Roughly calibrated to wall clock time.

Required Headers
evm6418.h

Required Libraries
evm6418bsl.lib

Function Prototype
void EVM6418_waitusec(Uint32 delay)

Parameters
delay – number of microseconds to delay.

Return Value
None

Example

    /* Spin for 100 microseconds */
    EVM6418_waitusec(100);
©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.