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: Why does the I2C need to be reinitialized before each command?

Part Number: MSP432P401R

Hello! I'm trying to understand the Fuel Tank MKII Battery BoosterPack SDK example (boostxl_batpakmkii_fuelgauge_MSP_EXP432P401R_nortos_ccs).

I see in HAL_BQ27441.c, that some functions used to interface with the battery gauge circuit (i.e., BQ27441_control(), BQ27441_read16() and BQ27441_readChecksum()), first call I2C_init(). Why is it necessary to reinitialize the I2C peripheral?

If I comment out the line, then the code does not work. After a few tries, I noticed that it actually needs I2C_initMaster(EUSCI_B1_BASE, &i2cConfig) and I2C_enableModule(EUSCI_B1_BASE) to be called, instead of I2C_init(). Again, why is this necessary?

Thank you!

**Attention** This is a public forum