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/MSP432E401Y: msp432 i2c slave

Part Number: MSP432E401Y

Tool/software: Code Composer Studio

Hello. I am using msp432 for i2c slave. I used an example from the SDK, "i2c_slavemode_simple_transfer". The only difference is that I use I2C0. The master is a single-board computer on Linux. There is also an ADC on the same bus - it works fine. I use i2ctools (i2cdetect) on a single board. When trying to scan a bus, the ADC is detected, its address is shown, but the bus hangs when scanning the msp432 address. Without msp432, everything works. Also tried to talk to msp432 using python-smbus. When I try to send one byte to the slave msp432, the bus hangs, which prevents me from communicating with either the msp432 or the ADC. This helps remove msp432 or reset msp432.

Sample python code:

from smbus import SMBus

ADC_addr = 0x22
MSP_addr = 0x26

bus = SMBus (1)

b = bus.read_byte_data (ADC_addr, 0) #ok
print (b)

bus.write_byte_data (ADC_addr, 0, 0) #ok
bus.write_byte_data (MSP_addr, 0, 0) #error timeout or busy

bus.close ()

As a result, I can not communicate with the slave msp432 on I2C. I would appreciate if you can help me.

  • Have you been able to confirm operation with the example as is? Do you think the example is in error or your change to I2C0?

    Regards,
    Chris
  • Hello Chris. I can not check the example, as it is, because i2c1 is not displayed on the board. In my code for msp432, I changed only the port from portG to portB, as well as i2c1 to i2c0. Maybe I do not correctly refer to msp432 from python? Can you try to make msp432 a slave and connect to a raspberry pi using python-smbus? In any case, I will be grateful.

    Regards,
    Nikolay
  • I have some limitations in testing other components and will need to focus on the MSP432.

    Some questions:
    (1) What value of external pullups are used on SDA and SCL? Are they pulled up to Vdd?
    (2) Is the alert line being implemented for SMBUS and what is the responsibility of the MSP432 with that alert line?
    (3) Code verification, can you show what changes you made to the example?

    Regards,
    Chris
  • Any updates?

    Regards,
    Chris

**Attention** This is a public forum