Tool/software: TI C/C++ Compiler
Good afternoon,
We are trying to connect a board with a MSP432P4111 MCU to a CO2 sensor (SCD30). We hace to use the pins 3_6 and 3_7. We have checked and they can be used for I2C communication. We have started by changing the code of the example i2cmasterexample1_MSP_EXP432P4111_tirtos_ccs but we cannot make it work. This is what we have done (the changes are in red):
board.h
#define Board_I2C_TMP MSP_EXP432P4111_I2CB2
MSP_EXP432P4111.h
typedef enum MSP_EXP432P4111_I2CName {
MSP_EXP432P4111_I2CB0 = 0,
MSP_EXP432P4111_I2CB2,
MSP_EXP432P4111_I2CCOUNT
} MSP_EXP432P4111_I2CName;
MSP_EXP432P4111.C
const I2CMSP432_HWAttrsV1 i2cMSP432HWAttrs[MSP_EXP432P4111_I2CCOUNT] = {
{
.baseAddr = EUSCI_B0_BASE,
.intNum = INT_EUSCIB0,
.intPriority = (~0),
.clockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK,
.dataPin = I2CMSP432_P1_6_UCB0SDA,
.clkPin = I2CMSP432_P1_7_UCB0SCL
},
{
.baseAddr = EUSCI_B2_BASE,
.intNum = INT_EUSCIB2,
.intPriority = (~0),
.clockSource = EUSCI_B_I2C_CLOCKSOURCE_SMCLK,
.dataPin = I2CMSP432_P3_6_UCB0SDA,
.clkPin = I2CMSP432_P3_7_UCB0SCL
}
};
const I2C_Config I2C_config[MSP_EXP432P4111_I2CCOUNT] = {
{
.fxnTablePtr = &I2CMSP432_fxnTable,
.object = &i2cMSP432Objects[MSP_EXP432P4111_I2CB0],
.hwAttrs = &i2cMSP432HWAttrs[MSP_EXP432P4111_I2CB0]
},
{
.fxnTablePtr = &I2CMSP432_fxnTable,
.object = &i2cMSP432Objects[MSP_EXP432P4111_I2CB2],
.hwAttrs = &i2cMSP432HWAttrs[MSP_EXP432P4111_I2CB2]
}
};
We have connected an oscilloscope to the SDA and CLK buses and we observe no signal at all. Do you have any idea? Are we doing something wrong?
Thank you!