This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138 Experimenter & quickStartOMAPL1x_rCSL examples (looking for documentation)

Hi,

I am trying to learn by modifying the rCSL code samples I got from here. However, I could not find any documentation, specifically on the functions and constants that are used.

For example, in the I2C_io_expander_dspL138 project, the main.c makes a function call

CSL_FINST(i2c0Regs->ICMDR, I2C_ICMDR_IRS, DISABLE)

to reset the I2C. I did find some basic description on the macro 'CSL_FINT' inside cslr.h file. But no further information was available.

I also failed to find where consts like I2C_ICMDR_IRS are defined. I could decode I2C_ICMDR_IRS using http://focus.ti.com/lit/ug/sprufl9d/sprufl9d.pdf (TMS320C674x/OMAP-L1x Processor Inter-Integrated Circuit (I2C) Module). But it would be helpful if I could see the *.h file that has all these consts defined with their values.

 

Thanks

Joe

  • Hi Joe,

    As you noted, there is not any documentation on the CSL macros inside the quickStartOMAPL1x_rCSL package. The rCSL macros are a part of the BIOS Platform Support Package 1.30 release and the examples in the quickStartOMAPL1x_rCSL package are intended to showcase these macros.

    However, there does exist a userguide for the rCSL macros which can be found in the BIOS PSP 1.30 release and is located here:
    ROOT/pspdrivers_01_30_xx/packages/ti/pspiom/cslr/evmOMAPL138/docs

    You can download the BIOS PSP 1.30 release here: http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/index.html

    In addition, there is some documentation inside the quickStartOMAPl1x package which can be found in the following locations where "ROOT" is your installation directory:

    • ROOT/quickStartOMAPL1x_rCSL/quickStartOMAPL1x_rCSL_README - Contains an overview of the package, the directory structure of the package, and instructions on how to run the examples
    • ROOT/quickStartOMAPL1x_rCSL/OMAPL1x/documents/UsefulDocuments - Contains links to user guides and reference manuals that may be useful to understand the examples. (No reference to rCSL user guide)
    • ROOT/quickStartOMAPL1x_rCSL/OMAPL1x/rCSL_examples/evm*/*_examples/peripheral/example/README - Contains individual project details and related documentation

    As for the constant, "I2C_ICMDR_IRS" is actually a part of the names of 5 constants defined here:
    ROOT/quickStartOMAPL1x_rCSL/OMAPL1x/support/includes/ti/pspiom/cslr/cslr_i2s.h

    #define CSL_I2C_ICMDR_IRS_MASK (0x00000020u)
    #define CSL_I2C_ICMDR_IRS_SHIFT (0x00000005u)
    #define CSL_I2C_ICMDR_IRS_RESETVAL (0x00000000u)
    /*----IRS Tokens----*/
    #define CSL_I2C_ICMDR_IRS_DISABLE (0x00000000u)
    #define CSL_I2C_ICMDR_IRS_ENABLE (0x00000001u)

    The rCSL macro "CSL_FINST" uses "I2C_ICMDR_IRS" to identify the correct mask, shift, and token values. In other words,
    CSL_FINST(i2c0Regs->ICMDR, I2C_ICMDR_IRS, DISABLE);
    resolves to:
     i2c0Regs->ICMDR = ((i2c0Regs->ICMDR & ~CSL_I2C_ICMDR_IRS_MASK) | ((CSL_I2C_ICMDR_IRS_DISABLE << CSL_I2C_ICMDR_IRS_SHIFT) & CSL_I2C_ICMDR_IRS_MASK)));

    Hope this helps!

    Regards,
    Kevin

  • Hi Kevin,

    Thank you very much for the detailed response.

    I did see define CSL_I2C_ICMDR_IRS inside cslr_i2c.h before making my initial post, but did not pay close attention as I was looking for "I2C_ICMDR_IRS"!!!

    I will install and look the BIOS PSP docs for more info.

    Thanks

    Joe