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.

LP-MSPM0G3507: Repeated Start Condition Settings

Part Number: LP-MSPM0G3507

Tool/software:

Hi team,

My customer would like to confirm the following.

When they read access to the target device with I2C, it is necessary to output in a format that corresponds to "repeated Start condition".

Could you tell us how to set it?

Thank you in advance.

Best regards,

Kenley

  • Hello Kenley,

    About the description about the "repeated start condition" of I2C, you can refer to the chapter 18.2.3.5 Repeated Start in the Series G User guide: 

    MSPM0 G-Series 80-MHz Microcontrollers Technical Reference Manual (Rev. A) (ti.com)

    And my colleague has written a segment of demo code about the repeated start condition, you can refer to its logic at the same time.

    RepeatStart.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    //i2c for drv8234 with mspm0
    uint8_t i2c_read(uint8_t reg_address){
    uint8_t write,read;
    write = reg_address;
    /*************************************************************************************
    * Fill the FIFO * The FIFO is 8-bytes deep, and this function will return number of bytes written to FIFO */
    DL_I2C_flushControllerRXFIFO(I2C_INST);
    DL_I2C_flushControllerTXFIFO(I2C_INST);
    DL_I2C_fillControllerTXFIFO(I2C_INST, &write, 1);
    /* Send the packet to the controller.
    * This function will send Start + Stop automatically.
    */
    /* Wait for I2C to be Idle */
    while (!(DL_I2C_getControllerStatus(I2C_INST) & DL_I2C_CONTROLLER_STATUS_IDLE));
    DL_I2C_startControllerTransferAdvanced(I2C_INST,
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best Regards,

    Janz Bai