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.

CCS/LAUNCHXL-F280049C: F280049c I2c

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hello,

Is this your problem resolved. I  am facing same problem on F28049c launchxl board.

If your problem is resolved then please guide me.

Thanking You,

Sourabh Patil

  • Sourabh,

    Which GPIOs are you using as I2C pins? F280049 launchpad uses GPIO37 / GPIO35 as I2C pins. Please check whether you have configured GPIO37 / 35 pins as I2C pins in your code.\

    Regards,

    Manoj

  • Hello Manoj Sir,

    Thank for your reply.

    Yes i configure GPIO35 and GPIO37 for I2c communication in the code.

    Like

    GpioCtrlRegs.GPBPUD.bit.GPIO35 = 0; // Enable pull-up for GPIO32 (SDAA)
    GpioCtrlRegs.GPBPUD.bit.GPIO37 = 0; // Enable pull-up for GPIO33 (SCLA)

    GpioCtrlRegs.GPBQSEL1.bit.GPIO35 = 3; // Asynch input GPIO32 (SDAA)
    GpioCtrlRegs.GPBQSEL1.bit.GPIO37 = 3; // Asynch input GPIO33 (SCLA)

    GpioCtrlRegs.GPBGMUX1.bit.GPIO35 = 1; 
    GpioCtrlRegs.GPBGMUX1.bit.GPIO37 = 1; 
    GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // Configure GPIO32 for SDAA
    GpioCtrlRegs.GPBMUX1.bit.GPIO37 = 3; // Configure GPIO33 for SCLA

    I2CA_Init(void)
    {

    I2caRegs.I2CPSC.all = 9; // Prescaler - need 7-12 Mhz on module clk
    // Set I2CCLKL/I2CCLKH for 100KHz SCL clock
    I2caRegs.I2CCLKL = 20; // NOTE: must be non zero
    I2caRegs.I2CCLKH = 10; // NOTE: must be non zero
    I2caRegs.I2CIER.all = 0x0; // Disable interrupts

    //
    // Take I2C out of reset. Stop I2C when suspended
    //
    I2caRegs.I2CMDR.all = 0x0020;

    return;
    }

    But i am not able to generate clock on I2c

    Thanking You,

    Sourabh

  • Hello Manoj Sir,

    I am trying to interface tm1637 4 digit led module with f280049c launchpad using I2C. but i am unable to interface it.

    If you know any details regarding this please let me know.

    Thanking You,

    Sourabh

  • Patil,

    GPIO multiplexing in controlled by both GPBGMUX1 and GPBMUX1 register.

    With the below configuration, you are configuring GPIO35 / 37 to be used as LINRX / LINTX

    GpioCtrlRegs.GPBGMUX1.bit.GPIO35 = 1; 
    GpioCtrlRegs.GPBGMUX1.bit.GPIO37 = 1; 
    GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // Configure GPIO32 for SDAA
    GpioCtrlRegs.GPBMUX1.bit.GPIO37 = 3; // Configure GPIO33 for SCLA

    To configure, GPIO35 / 37 as I2C pins, you need the below configuration

    GpioCtrlRegs.GPBGMUX1.bit.GPIO35 = 0; 
    GpioCtrlRegs.GPBGMUX1.bit.GPIO37 = 0; 
    GpioCtrlRegs.GPBMUX1.bit.GPIO35 = 3; // Configure GPIO32 for SDAA
    GpioCtrlRegs.GPBMUX1.bit.GPIO37 = 3; // Configure GPIO33 for SCLA

    Example I2C example code if you wish you I2C driverlib

    C2000Ware_2_01_00_00\driverlib\f28004x\examples\i2c

    Regards,

    Manoj