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.

MSPM0G3507-Q1: Arm-based microcontrollers forum

Part Number: MSPM0G3507-Q1
Other Parts Discussed in Thread: MSPM0G3507, BQ79600-Q1, BQ78706

Tool/software:

I encountered daisy-chain communicationissues in the BMS project!

BMS System Configuration

The entire BMS system consistsof an MCU (MSPM0G3507), BQ79600, and BQ79758 chips.The MCU communicates with theBQ79600 via SPI.The BQ79600 connects to the BQ79758 through COMHP/COMHN pinsvia a transformer, while the BQ79758's COMLP and COMLN pins remain disconnected.---

Procedures

After system power-up, wake-upand automatic address allocationare performed per the BQ79600-Q1 Software Design Reference manual:
1.Wake BQ79600 : Verify DVDDand AVDD voltages rise to thespecified range, confirming successful wake-up.
2.Send Tone Signal : Use thewaveform in Figure 1 to wake the BQ79758.Monitor its DVDD/AVDD voltagesto confirm wake-up.
3. Execute Auto-Addressing Function :

//**********************
//AUTO ADDRESS SEQUENCE
//**********************
void SpiAutoAddress(void)
{
//DUMMY WRITE TO SNCHRONIZEALL DAISY CHAIN DEVICES DLL (IF A DEVICE RESET OCCURED PRIORTO THIS)
SpiWriteReg(0, OTP_ECC_DATAIN1, 0X00, 1, FRMWRT_STK_W);
...[similar writes for DATAIN2-DATAIN8]

//ENABLE AUTO ADDRESSING MODE
SpiWriteReg(0, CONTROL1, 0X01, 1, FRMWRT_ALL_W);

//SET ADDRESSES FOR EVERY BOARD
for(currentBoard=0; currentBoard<TOTALBOARDS; currentBoard++)
{
SpiWriteReg(0, DIR0_ADDR, currentBoard, 1, FRMWRT_ALL_W);
}

//BROADCAST WRITE TO SET ALLDEVICES AS STACK DEVICE
SpiWriteReg(0, COMM_CTRL, 0x02, 1, FRMWRT_ALL_W);

//SET THE HIGHEST DEVICE INTHE STACK AS BOTH STACK AND TOP OF STACK
SpiWriteReg(TOTALBOARDS-1,COMM_CTRL, 0x03, 1, FRMWRT_SGL_W);

//SYNCRHONIZE THE DLL WITHA THROW-AWAY READ
SpiReadReg(0, OTP_ECC_DATAIN1, autoaddr_response_frame, 1, 0, FRMWRT_STK_R);
...[similar reads for DATAIN2-DATAIN8]

//OPTIONAL: Read back all device addresses
for(currentBoard=0; currentBoard<TOTALBOARDS; currentBoard++)
{
SpiReadReg(currentBoard, DIR0_ADDR, autoaddr_response_frame_Base, 1, 0, FRMWRT_SGL_R);
}

//OPTIONAL: Verify register0x2001 = 0x14
SpiReadReg(0, 0x2001, autoaddr_response_frame, 1, 0, FRMWRT_SGL_R);
return;
}
After executing this function, the following commands are sent:
WriteReg(0, 0x2005, 0x0, 1, FRMWRT_SGL_W);
WriteReg(0, 0x700, 0XA5, 1, FRMWRT_ALL_W);
delayms(20);
WriteReg(0, 0x701, 0X20, 1, FRMWRT_ALL_W);
WriteReg(0, FAULT_MSK2, 0x40, 1, WriteType);

Issue Observed

After executing the above functions, the BQ79758 unexpectedly enters Shutdown mode after 2 seconds (DVDD/AVDD voltages drop to 0).

Troubleshooting Steps

  1. SPI Communication Test : Verified BQ79600-MCU SPI communication by writing/reading registers. Confirmed BQ79758 wake-up via Tone signal.
  2. Disable Timeout Command : Attempted to send shutdown timeout disable commands immediately after BQ79758 wake-up:
    WriteReg(0, 0x2005, 0x0, 1, FRMWRT_SGL_W);
    WriteReg(0, 0x700, 0XA5, 1, FRMWRT_ALL_W);
    delayms(20);
    WriteReg(0, 0x701, 0X20, 1, FRMWRT_ALL_W);
    WriteReg(0, FAULT_MSK2, 0x40, 1, WriteType);
    Result : BQ79758 still shuts down after 2 seconds.
  3. Register Readback :
    • BQ79600’s DIR0_ADDR and 0x2001 registers readable.
    • BQ79758’s DIR0_ADDR registers unreadable .

      Key Questions

      1. Wake-Up Confirmation : Are DVDD/AVDD voltages sufficient to confirm BQ79758 wake-up? Could the chip remain unresponsive despite valid voltages?
      2. Timeout Disable Timing : Is sending timeout-disable commands immediately after wake-up valid per the datasheet? If yes, why does shutdown still occur?
      3. Valid Command Definition : What constitutes a "valid command" for resetting the 2-second timeout? Are dummy writes (e.g., clock synchronization) considered valid?
      4. Daisy-Chain Behavior :
        • If the last BQ79758 in the chain receives commands, does this imply upstream devices are functional?
        • Can a BQ79758 forward commands without processing them (e.g., due to CRC errors)?
      5. SPI RDY Pin Issue : During auto-addressing, SPI RDY pin stays low until COMM-CLEAR. Is this caused by dummy register reads propagating downstream?
      6. MCU SPI FIFO Clear : How to clear the MSPM0G3507’s SPI FIFO before sending dummy data? Function name/file location?
      7. Daisy-Chain Waveforms : Request detailed differential signal waveforms (thresholds, byte/bit timing).


                                                                                                                                                              

      Additional Assistance

      Please provide guidance on the above points.

      Thank you!

  • Input from MSPM0 side:

    You can download the BQ78706 example code from this page: https://www.ti.com/product/BQ78706

    https://www.ti.com/tool/download/TIDA-HVBMS-ESS-PLTFRM-FW

    MSPM0 use UART to communicate with BQ78706 bottom device.

    You can refer to the wakeup steps.

    MCU SPI FIFO Clear : How to clear the MSPM0G3507’s SPI FIFO before sending dummy data? Function name/file location?

    Use this API in spi.h: DL_SPI_drainRXFIFO8

    C:\ti\mspm0_sdk_2_04_00_06\source\ti\driverlib

    -----------------------

    For the other question, I will loop this ticket to BMS.

  • Hi Hu,

    The problem is one of the following:

    1. The isolation schematic between BQ79600 COMH and BQ79758 COML is incorrect.

    2. One of the isolation components between BQ79600 and BQ79758 is not fully soldered

    3. There is a current limit on the BQ79758's power supply. Therefore, the BQ79758 can wake up, but the BQ79758 cannot respond.

    4. The BAT is below 9V or the NPN's collector pin is below 8V when communication is being sent.

    Can you use an oscilloscope to provide me a screenshot of BQ79758's COMLP voltage during communication? If you can see the BQ79600 sending data to the BQ79758, can you zoom in and show me what one of the daisy chain bytes look like? 

    Regards,

    David Ray

  • Hi David,


                   Thank you very much! According to your guidance, there is already communication on the daisy chain. As you mentioned, the COMH of the BQ79758 chip is connected to the COMH of the BQ79600 chip.

    Regards,
    Hu Liao