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.

Problems regarding the usage of C2000 I2C-Bus

Dear TI support team,

currently we are working with the TI-Hardwareboard "TI Delfino F28379D Launchpad" in combination with the offical  MATLAB/ Simulink hardware support
package "Embedded Coder Support Package for Texas Instruments C2000 Processors". With this toolchain, we develop and test the control of electrical drive systems. We would like to use the I2C bus on the C2000 Launchpad for communication with external sensors. So far, however, we have not been able to put it into operation.
Here is a short summary of our first tests:

- Test sensor: Inertial measurement unit of type "MPU 9250"
- Reading out the "HowAmI" register to check the general functionality of the communication interface
- Ensure the functionality of the sensor by first testing the communication between the sensor and Arduino using the matlab arduino support package
- Record the I2C level with an oscilloscope for later analysis

To check the general functionality of the sensor I used an Arduino and a matlab script to read out the "HowAmI" register (hex address: 117). The expected result of this query is the hex value "71". I have attached the corresponding matlab script "ArduinoReadI2C.m" as well as the recorded signal level of the I2C "MeasI2CArduino.PNG".
In the next step we tried to read out the sensor using the C2000 launchpad. I have also attached the model "C2000ReadI2C.slx" used for this to the email. However, as can be seen in the figure "MeasI2CC2000.PNG", we only send the device address (hex address 68) and receive no response.

We are also in contact with Mathworks support. The mathworks team examined our implementation and confirmed that it should work. Ultimately, we were forwarded to you. Hence the question of whether you could give us further suggestions on how we can solve this problem.


Please contact me if you need further information

Best regards

Max Espelkott

Note: The following forum posts are known to us. We also use the 10k pull-up resistors suggested there.

e2e.ti.com/.../676372
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/692765?LAUNCHXL-F28379D-I2C-communication-issues-with-MPU-9150-present-on-BOOSTXL-SENSHUB

  • And here are the missing files "ArduinoReadI2C.m" and "C2000ReadI2C.slx":
    MatlabSimulinkImplementation.zip

  • Hi Max,

    In your bottom waveform there is no ACK (9th bit) after the slave address is sent. Therefore the MPU 9250 slave device is not receiving the address properly.

    The SCL line (yellow) is low for some period of time before the START condition occurs. Maybe this is causing the MPU 9250 to not read the START condition properly.

    I think you should figure out what is pulling the line low before communication begins. That looks to be the biggest difference between the working / not-working waveforms. I2C is active low, open-drain, nothing should be holding the lines low while there is no communication occurring.

    Best,

    Kevin