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.