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/RM46L852: change pin mux programmatically

Part Number: RM46L852

Tool/software: Code Composer Studio

Hello, we have an application in which  RM46L852 is an I2C master; all works well except very rare events with I2C hanging.

I would like to implement a release procedure, just like described in Analog Device application note AN-686 "implementing an I2C bus reset".

To do this, I have to change I2C_SDA and I2C_SCL pins mux to GIO , and then back to I2C.

Is there some simple way to do this?

Thanks

  • Hello,
    The following registes are used to set I2C pin functionality:
    - I2CPFNC Register: When PINFUNC bit is set then SDA and SCL pins function as I/O. When When PINFUNC bit is cleared then SDA and SCL are I2C pins (functional).
    - I2CPDIR register is used to set pin direction (input/output).
    - Using I2CDOUT and I2CDIN are used for reading/driving the I2C pins.
    Please refer to Chapter 30 in device TRM: www.ti.com/.../spnu514c.pdf (register description starts in chapter 30.6)

    You can use gio.c APIs as well for accessing I2C port when I2C pins were set as GIO.

    Best regards,
    MIro