Post Go back to editing

LTC6811 I2C Communication with Multiple Messages

Hello,

We are trying to interface a LTC6811-1 with two LTC1380 8:1 multiplexors. Currently, we are able to send only one correct message per IC power cycle (2 seconds without isoSPI comm). When sending multiple messages only the first message will go through. For debugging purposes we are currently using the Linduino/DC2792B with the LTSketchbook. We have modified the I2C communication code to fill the registers with:

for (uint8_t current_ic = 0; current_ic<TOTAL_IC;current_ic++) 
      {
        //Communication control bits and communication data bytes. Refer to the data sheet.
        BMS_IC[current_ic].com.tx_data[0]= 0x69; // Icom Start(6) + I2C_address D0 (0x90) << 4
        BMS_IC[current_ic].com.tx_data[1]= 0x08; // Fcom master NACK(8)  
        BMS_IC[current_ic].com.tx_data[2]= 0x0F; // Icom Blank (0) + eeprom address D1 (0xF8) (channel 0 1380)
        BMS_IC[current_ic].com.tx_data[3]= 0x89; // Fcom master NACK + STOP(9)
        BMS_IC[current_ic].com.tx_data[4]= 0xff; // Icom No Transmit
        BMS_IC[current_ic].com.tx_data[5]= 0xff; 
      }
      wakeup_sleep(TOTAL_IC);       
      LTC6811_wrcomm(TOTAL_IC,BMS_IC); // write to comm register    
      print_wrcomm(); // print transmitted data from the comm register

      wakeup_idle(TOTAL_IC);
      LTC6811_stcomm(2); // data length=2 // initiates communication between master and the I2C slave

      wakeup_idle(TOTAL_IC);
      error = LTC6811_rdcomm(TOTAL_IC,BMS_IC); // read from comm register                       
      check_error(error);
      print_rxcomm(); // print received data into the comm register  

Following filling the BMS_IC struct, wrcomm(), stcomm(), and rdcomm() are called. We have also experimented with resetting the GPIO pins each cycle as well without any luck.
Any thoughts on how to correctly send multiple I2C messages? Linked is a scope trace as well: https://imgur.com/a/Er6B5F5
  • Following up - attached is the printout of the rdcomm() command when sending two messages before IC reset. The first message sends without error; however, the second message fails to send at all.

    29
    Written Data in COMM Register:
    IC- 1, 0x69, 0x08, 0x0F, 0x89, 0xFF, 0xFF, Calculated PEC: 0x9D, 0xEE

    Received Data in COMM register:
    IC- 1, 0x69, 0x07, 0x7F, 0x81, 0xFF, 0xFF, Received PEC: 0x78, 0x10

    29
    Written Data in COMM Register:
    IC- 1, 0x69, 0x08, 0x0F, 0x89, 0xFF, 0xFF, Calculated PEC: 0x9D, 0xEE

    Received Data in COMM register:
    IC- 1, 0x69, 0x07, 0x7F, 0x81, 0xFF, 0xFF, Received PEC: 0x78, 0x10

  • Hi, 

    Can you make sure your byte send protocol is correct? 

    For communicating with the second Mux you need to change the address i cannot see that change in the code where COMM register bits are set for WRCOMM.

    Also you have to make sure that you send the stop bit once the byte data is completely sent. Please refer to below table to see which bits which have to be selected for I2C communication -