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-L137 I2C port 1 usage (bug found and advice needed)

Other Parts Discussed in Thread: OMAP-L137

CCS v3.3/WinXP Pro

Custom OMAP-L137 board with EEPROM in I2C port 1

---------------------------------

File: D:\Program Files\Texas Instruments\pspdrivers_01_20_00_07\packages\ti\pspiom\platforms\evmOMAPL137\src\i2c_evmInit.c

//#define PINMUX8_I2C_ENABLE      0x00022000  // Only enables I2C0!
#define PINMUX8_I2C_ENABLE      0x00022022  // I2C1 not enabled by TI! Corrected by me

I suppose this is needed to use port 1, right? What else should I change to be able to use GIO on I2C port 1? Trying the test project made for EVMOMAP (D:\Program Files\Texas Instruments\pspdrivers_01_20_00_07\packages\ti\pspiom\examples\evmOMAPL137\i2c\edma) doesn't work, the call

    i2c_outHandle = GIO_create("/I2C1", IOM_OUTPUT, &status, &chanParams, &gioAttrs);

returns a null handle. I suppose this is because there isn't a 'I2C1' entry in the dev table but how can I get it there? The tcf file shows only I2C0, should I add I2C1 there somehow? I tried recompiling the EVMOMAP libs (D:\Program Files\Texas Instruments\pspdrivers_01_20_00_07\packages\ti\pspiom\platforms\evmOMAPL137) with CHIP_OMAPL137 defined to be sure everything concerning two I2C ports are there but it didn't help.

Rgds,

   Harri

 

  • Hi Harri,

    HarriSiirtola said:

    File: D:\Program Files\Texas Instruments\pspdrivers_01_20_00_07\packages\ti\pspiom\platforms\evmOMAPL137\src\i2c_evmInit.c

    //#define PINMUX8_I2C_ENABLE      0x00022000  // Only enables I2C0!
    #define PINMUX8_I2C_ENABLE      0x00022022  // I2C1 not enabled by TI! Corrected by me


    evmInit files like i2c_evmInit.c are part of the evmInit library, which are only references that enable the user for the peripheral settings for a particular board/EVM (for example evmOMAPL137).

    Also, this enables/demonstrates settings for the provided sample application. This is detailed in the User Guide section 1.4.2. One may require changes to adapt these to one's application/board.

    HarriSiirtola said:

    i2c_outHandle = GIO_create("/I2C1", IOM_OUTPUT, &status, &chanParams, &gioAttrs); returns a null handle.
    I suppose this is because there isn't a 'I2C1' entry in the dev table


    Yes, one needs to add/edit the required device entries in the .tci file, with the deviceId (instance number) properly filled.
    Also, one may have to pass the correct details like , h/w interrupt numbers used, along with the device parameters tjhat fits one's application.
    Please refer to i2cSample_main.c and i2cSample.tci files for details.

    You are using old versions of the BIOSPSP.
    New version (01.30.00) can be downloaded from here:-
    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios_psp/BIOSPSP/01_30/index_FDS.html


    Please note that some changes have gone in as part of addition of new features to the driver.

    Hope this helps.

  • I got it working nicely. Thanks for the most helpful information!

    Best Regards,

         Harri