Other Parts Discussed in Thread: LDC1614
Tool/software: TI-RTOS
Hello,
I am working with MSP432P401R, CCS V6.2, currently on the PZ100 breakout socket, but moving to a custom board soon. I am trying to interface with 4 separate LDC1614 inductive sensors, 2 per I2C bus (only have high/low address selection on each chip). I can successfully talk to the chip on different I2C lines, but can't figure out how to map different pins for an I2C_open() command.
I started from the i2ctmp006 I2C w/ RTOS example. I can start I2C and change the pins.
I have changed the pin mapping in MSP_EXP432P401R.c in MSP_EXP432P401R_initI2C(void) to map to pins on USCI_B2
/* Configure Pins 3.6 & 3.7 as SDA & SCL, respectively. */ MAP_GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P3, GPIO_PIN6 | GPIO_PIN7, GPIO_PRIMARY_MODULE_FUNCTION);
And I see how I can change/add I2C names here
typedef enum MSP_EXP432P401R_I2CName {
//MSP_EXP432P401R_I2CB0 = 0,
MSP_EXP432P401R_I2CB0,
MSP_EXP432P401R_I2CCOUNT
} MSP_EXP432P401R_I2CName;
This name is defined in board.h, and I can change that. I am having trouble figuring out how the i2c_open() index will map to the correct USCI bus so I can open a separate I2C bus. Or do I need to set up a new set of I2C params, rather than the default ones.
Thanks for the help, let me know if you need more info/context!