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.

Reading Manufacturing Status via SMBus from a BQ40Z50

Other Parts Discussed in Thread: BQ40Z50EVM-561

Hello,

I am using an STM32L476G Discovery board to communicate with a BQ40Z50EVM-561 via SMBus. I’m having trouble understanding how to handle reading and writing from the Manufacturing Access System (MAC) as described in the technical reference manual for the BQ40Z50EVM. My specific goal is to be able to read the status of CHG/DSG FETs and then change their state. I can successfully read several parameters already, (Voltage, Current, SoC) etc. but it is unclear how I should change my existing functions to implement the SMBus block read/write protocol as described in section 13.1 of the gauge TRM.

Some of the code I am using to read voltage from the gauge is as follows:

// Address for voltage given in gauge TRM

writeData = 0x09;

// Voltage word size

size = 2;

HAL_SMBUS_Master_Transmit_IT(&hsmbus1, 0x0B << 1, writeData, size, SMBUS_AUTOEND_MODE);

Should I just be able to change “writeData” to 0x0057 (the Manufacturing Status address, which contains FET states) and “size” to 4?

Any suggestions of resources or example code you could point me to would be greatly appreciated.

Thank you.