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.

MSP432P401R: Problem with I2C pullups

Part Number: MSP432P401R

Hi! I'm using MSP432 (master) to communicate with some MSP430I2020s over I2C (up to 8 slaves - sensors). The problem is that the high logic level is not 3.3V, as expected, instead it is 2.6V. The communication works, but I want to know why it isn't 3.3V.

This is the code I'm using to initialize I2C:

bool I2C_init(uint32_t moduleInstance)
{ /* Select I2C function for I2C pins */ switch (moduleInstance) { case EUSCI_B0_BASE: MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1, GPIO_PIN6 | GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION); break; case EUSCI_B1_BASE: MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN4 | GPIO_PIN5, GPIO_PRIMARY_MODULE_FUNCTION); break; case EUSCI_B2_BASE: MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P3, GPIO_PIN6 | GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION); break; case EUSCI_B3_BASE: MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P6, GPIO_PIN6 | GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION); break; } /* Initializing I2C Master */ MAP_I2C_initMaster(moduleInstance, &i2cConfig); /* Specify slave address */ //I2C_SetSlaveAddress(EUSCI_B2_BASE, 0x001, TenBitAddressing); /* Enable I2C Module to start operations */ MAP_I2C_enableModule(moduleInstance); MAP_I2C_clearInterruptFlag(moduleInstance, EUSCI_B_I2C_RECEIVE_INTERRUPT0); MAP_I2C_enableInterrupt(moduleInstance, EUSCI_B_I2C_RECEIVE_INTERRUPT0); TimerA2_delayMiliseconds(100); // I2C start up time return true; }

I'm using custom PCBs and 10 bit I2C addressing. I confirm that VCC is 3.3V, on both the MSP432 and MSP430 boards.

And another weird thing that happens. The MSP430 boards are connected to the MSP432 board which can control their power supply (on/off). If I initialize the master without powering up the MSP430 boards (slaves) beforehand, the master will not transmit anything to the slaves.

Devices_powerOn(); // It works only if devices are powered on before initializing I2C
I2C_init(EUSCI_B2_BASE); // MSP430 bus
Devices_powerOff();

This is the schematic:

Any ideas of what I'm doing wrong?

UPDATE

If I remove the diodes:

1. With MSP430 board connected, the lines are in 2.5-2.6V;

2. With MSP430 board disconnected, the lines are in 3.3V, as expected.

  • Hello Cristian,

    Can you check the software code on the MSP430I2020 to see if the pulls downs for the I2C lines are enabled?

    Also if you have a spare board, can you use that as the IOs on the board that you are using could be damaged.

    Did you test a similar set-up with the LaunchPads?

    Thanks,
    Sai

  • Hi,

    First of all I removed the Zener diodes, suspecting that they were causing this behavior and it seems they don't. Without the MSP430 board connected, the lines are in 3.3V (OK), but when I connect the MSP430 board, they stay in 2.6V, suggesting that this behaviour is caused by the MSP430I2020. It suggests that the MSP430 has a pulldown of around ~8.4k (by my calculation), making a voltage divider (2.2k and 8.4k) which drops the voltage from 3.3V to 2.6V.

    I mention that the I2C lines connect directly to the MSP430I2020 and there aren't any other components on these lines.

    I could not find any setting regarding I2C or GPIO pulldowns in driverlib, nor in the datasheet. Can you help me out?

    I haven't any MSP430 Launchpads, but I have another MSP430 board and it behaves the same.

  • The schematic is not complete. Are the grounds connected? Are the VCCs connected, or is there a difference between them?

    Is there any voltage drop over R36/R37?
  • Hi,

    I attached a more complete schematic. I confirm that the GNDs are connected. The MSP432 board supplies 12V to the MSP430 which generates its 3.3V using a DC-DC converter (and 5V needed for the sensor). I measured the voltages on the two boards: 3.28V on the MSP432 board and 3.29V on the MSP430 board.

    With the MSP430 board connected, the I2C lines stay in 2.5-2.6V and the voltage drop over R36/R37 is 34mV (what is draining current? pulldown on MSP430?). It is curious that I get the same result with two different MSP430 boards. I've attached the MSP430 board schematic, also.

    Without the MSP430 board connected, the I2C lines stay in 3.28V and the voltage drop over R36/R37 is 0.

    MSP432 board

    MSP430 board

  • Strange. As shown in section 6.11.2 of the MSP430I2020 datasheet, there are no pull-down resistors. And if the I²C pins were configured as outputs, they would be able to drive much more than 340 µA.

    Is there anything else on the HUB_SDA/SCL signals (not shown in the schematic)? If not, then it must be the pins themselves. If you disconnect only the HUB_SDA/SCL traces, is there still 2.6 V at the P1.6/P1.7 pins?
  • Hello,

    I suspect that the issue here is that the MSP430i2020's are getting powered-up by the +3V3 provided from the MSP432 board over the I2C lines. This would happen when the MSP432 powers up, which happens before you turn on the power to individual MSP430 sensor boards. This would explain why there's a voltage drop over R36/R37. According to the datasheet, the MSP430i2020 can accept a maximum input voltage of VCC + 0.3VDC on its pins, which is getting exceeded here.

    My initial suggestion would be to have individual sets of I2C pull-up resistors that are supplied by the +3V3 on each MSP430 board (e.g. U2 in the MSP430 schematic), not by the MSP432. This way, the device gets powered up at approximately the same time the I2C pull-ups go high.

    However, since the I2C bus is connected to other MSP430 boards, there could be issues if those boards aren't also powered up/down at the same time. In that case, I don't know if you'd need to use a switch (for each MSP430 board) controlled by the MSP432 to delay the I2C connections until after the individual MSP430 gets powered up. Perhaps others have an innovative method for doing this.

    Regards,

    James

    MSP Customer Applications
  • No, there isn't anything else on the I2C lines. The two boards are connected by wires. If I disconnect the I2C traces (wires), the voltage is 3.3V.

  • Hi! Thanks for identifying the cause of the problem. I did not notice this design mistake, but it is good to know for future designs.

    The MSP430 boards will not be powered all at the same time. Only one board will be powered at a given time. So I am thinking that placing the pull-ups on the slave board will not be an issue.

**Attention** This is a public forum