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.

RTOS/Msp432p401r: Msp432, i2c, possibility to configure in master transmit slave recieve mode

Part Number: Msp432p401r

Tool/software: TI-RTOS

Need to configure i2c bus, where mcu host must be able to transmit whenever required by asserting itself as master,

Otherwise, other member in bus asserts as master, during that time host mcu (msp) should be able to receive the data as a slave with a configured slave address

  • Hello,
    Thank you for posting to the community. You will need to generate separate configurations for the master and slave in then use the init, open, and close as the application changes modes.

    dev.ti.com/.../

    dev.ti.com/.../

    Hope that helps,
    Chris
  • Guruprasad,

    Please also see the following e2e thread which has an example that has two RTOS threads running I2C master/slave off of USCIB0 and B1.
    e2e.ti.com/.../2165083
  • Thanks Evan,

    The link describes about using diffrent USIC_Bx modules.

    Is there a possibility to configure the same i2c bus as master and slave dynamically during run time?

    Bt using different threads,  i2c_open, i2c_transfer, i2c_close for each master and slave.

  • Guruprasad,

    It is not recommended to do that on the same bus. Can I ask why this is a necessity?
  • A gps module we are interfacing has only one configuration mode possible, which is master transmit and slave receive mode.
    In which the module asserts itself as master on the bus. And only transmits . MCU must act as a slave to receive the data

    MCU needs to send some command to the module, It can send commands only as a master,
    To do this, MCU should assert itself as a master when the bus is idle.
    This is recommended in application note of the module which has to be interfaced via I2C.
  • Guruprasad,

    My apologies. My suggestion was actually wrong. You should be able touse the I2C both as a master/slave dynamically on the same bus using the I2C open, I2C transfer, I2c_close and the I2C Slave drivers. We haven't had a chance to make an example though. Have you looked into this? My apologies for the delay, I was out on vacation from work.

**Attention** This is a public forum