Post Go back to editing

READDEVICE command - MAX17854

Category: Hardware
Product Number: MAX17854

Hi,

I'm experiencing issues when attempting to communicate with the MAX17854 in a daisy chain configuration with four devices.

The bottom device in the chain is a MAX17852, and I have no problems communicating with it. Additionally, the WRITEALL and WRITEDEVICE commands work fine. However, I encounter errors when using the READDEVICE or READALL commands with any of the MAX17854 devices in the daisy chain. Specifically, my data-check byte gets overwritten by the MSB of the device, and the last fill byte remains in the message, resulting in multiple errors when I read the data back on my host device.

For example, when I try to read the data from the VERSION register on the MAX17854, I write the following message to the MAX17851 transmit queue:

Message Length Command | (Device ID<< 3) Register Address Data Check Byte PEC
0x06 0x0D 0x00 0x00 0xEE

The following message is received through the MAX17854 UART:

Preamble Command | (Device ID<< 3) Register Address Data Check Byte PEC FILL BYTE 1 FILL BYTE 2 Stop
Preamble Character 0x0D 0x00 0x00 0xEE 0xD3 0xC2 Stop Character

The MAX17854 then transmits the following reply:

Preamble Character 0x0D 0x00 0x44 0x85 0x02 0xC2 Stop Character

However, when the host reads the data received by the MAX17851, I get the following message:

0x0D 0x00 0x44 0x85 0x02 0xA4 0xD4

This indicates numerous LSSM and Data Check Byte errors.

I do not encounter these issues when using the same command with the MAX17852.

Can someone help me resolve this problem?

Thanks in advance.

  • Hi everyone, I’m bumping this thread because I’m still experiencing the same issue.

  • Hi  

    There are many things which could be the root cause...most likely it's the PEC calculation

    How big is your Daisy Chain? 

    Could you try doing it with a READALL command instead to see the message of all devices? Make sure the Alive Counter is disabled (should be by default)

    1) WAKEUP

    2) HELLOALL

    3) READALL

    0xC0 (4 + 2 x NrOfDevices) 0x03 0x00 0x00 0x58

  • Hello BLorenz, thank you for your reply.

    I’m pretty sure that the error is related to the PEC calculation, on my first message you can see that the 5th byte in the MAX17854 reply is the PEC of the 4 bytes before it.

    It seems that the MAX17854 is not removing the last fill byte and overwriting the data check byte with the PEC of the command byte, address byte and the two data bytes.

    We are planning to use a daisy chain with up to 32 devices, but for testing proposes I’m using a daisy-chain with only 4 devices. Our bottom device is a MAX17852 and all the other devices on the daisy chain are 54’s.

    I did the READALL test as you suggested and this is the result that I got:

    The following data was sent to the max17851:

    0xC0, 0x0C, 0x03, 0x00, 0x00, 0x58

    The data received by the main MCU was:

    0x03, 0x00, 0x44, 0x85, 0x44, 0x85, 0x44, 0x85, 0x27, 0x85, 0x19, 0xA4, 0xD4

  • Hi,

    I realized I made a mistake while configuring the DEVCFG1 Register (0x14). On the MAX17852 devices, the 3rd bit of this register has no effect, but on the MAX17854 devices, it is used to enable or disable the PEC. Setting the 3rd bit of DEVCFG1 to 1 solved my problem.