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.

MSP430F5529LP I2C DriverLib Example Question

Other Parts Discussed in Thread: MSP430F5529, DAC8571

Dear TI,

I am trying the I2C examples shipped with DriverLib: usci_b_i2c_ex3_masterTxSingle.

The only modification that I made in the Source is the following: 

//Assign I2C pins to USCI_B0
GPIO_setAsPeripheralModuleFunctionInputPin(
GPIO_PORT_P3,
GPIO_PIN0 + GPIO_PIN1
);

I have connected the saleae jumper wires to MSP430 P3.0 and P3.1 to see the data transfer. But here is the result.

According to the code, the Transferred data should be incremented but I can not see it. ( I have tested with SPI and the Logic Analyzer works great. ) My second problem is the Clock signal.  As you can see this is not very normal. 

Looking forward any help & suggestion. 

Thank you in advance,

 

  • Hi Daniel,

    Did you change the slave address? The example uses 0x48 but your code is sending to 0x00. Which device are you using as a slave?
    In addition, your SCL looks weird, have you looked at it with an oscilloscope?

    Do you have external pull-ups in your system? Can you try with a different, stronger value (i.e. 1K-3.3K)? Have you tried using 100Khz instead of 400Khz?

    Regards,
    Luis R
  • Dear Luis,

    Thank you for your reply. I am very new in I2C, this is the first time I have tried. My goal is to connect MSP430F5529 with ADS1258EVM module I2C pins to control the ADC. 

    Right now, the MSP430 has not connected to any slave device, only the Saleae wires are connected to P3.0 and P3.1 hoping to see anything useful. Without any pull up resistors that should be the problem.

    Regarding your questions I have tried both the 100 and 400 Khz and with different MCLK freq. with Power Level 2 without any success.

    (Looking at the DAC8571 I2C protocol It looks a bit complicated for me for the first time to jump into, thats why I tried it with saleae at first.) 

    I am going to connect MSP430 to the ADS1258EVM J6A.16 and J6A20 without MMB0 board and connect the Saleae too. I hope I will see any info.

    Do you think, if I connect two MSP430F5529 to each other to test i2C Master and Slave communication, should I use any additional pull-up resistors?

    Thank you for your answer. 

  • Hi Daniel,

    Daniel Vamos said:
    Do you think, if I connect two MSP430F5529 to each other to test i2C Master and Slave communication, should I use any additional pull-up resistors?

    Yes, I2C pins are open drain and they need pull-ups. You could potentially use the internal pull-up resistors (~35K Typical) but it's recommended to use external ones. Check the I2C spec for more details (Section 7.1 in http://www.nxp.com/documents/user_manual/UM10204.pdf

    Regards,

    Luis R

  • On 5x family, the internal pull-ups are disabled when the pin is output - and on I2C, all pins are output every now and then (e.g. during sending a NACK for ending a transfer) etc. So external pull-ups are mandatory. For <100kHz, 10k are usually sufficient. For up to 400kHz, 4,7k or even less are required. It somewhat depends on line capacitance and number of peers.

**Attention** This is a public forum