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.

TPS65988: I2C communications problem

Part Number: TPS65988

In our application TPS65988 is connected to the micro over I2C and also to an external flash over SPI.

Communication with TPS65988 over I2C seems very straight forward and yet we are having some strange issues with it.

For starters, only about a half of the registers responds to the read commands as it is supposed to, according to the documentation,

and another half returns 0 for the message length and all the bytes 0 even though it is a valid R/W register and supposed to return

some number of bytes in response.

I can write to the DATA registers and read my data back but these seem to be are the only registers I can write to. Nevertheless,

I can write to them and that suggests that our algorithm works right, doesn't it?

I wonder if anybody else had similar issues and, perhaps, can shed some light on this problem.

Thank you in advance.

  • Hi Sam,

    Are you using the 4CC Commands for these I2C writes using your host, which would involve using the CMD and Data registers?

    I would recommend reading the Host Interface Technical Reference Manual as it goes over the Host (EC/uC) to PD controller process in much more detail and it also shows the full list of 4CC commands you can use.

    Thank you,

    Hari

  • Hi Hari,

    I am working on an application that writes the firmware (flash.bin) to TPS65988 SPI flash over I2C.

    As a part of the process (following steps outlined in Host Interface Technical Reference Manual)

    I read Port Configuration Register (0x28) and write TypeCStateMachine bits back.  That's when

    I noticed that my read function returns 0 bytes. To troubleshoot the issue I started to read all the

    registers and noticed that I can only read RO registers and RW registers always return 0. Along

    the way I attempted to write to DATA registers (arbitrary bytes just to see if it takes it) and I could

    read those bytes back. I wonder if there could be a condition (like DeadBatteryBoot, VDD, etc.)

    upon which TPS65988 can get into such a state?

    Thank you,

    Sam.

  • Hi Hari,

    At least two boards I've tested exhibit the same issue. I am grasping a straw here.

    Here are my I2C read and write functions:

    int read_reg(uint8_t addr, uint8_t reg, uint8_t bytes, uint8_t header, uint8_t *data)
    {
        uint8_t i, length= 0;

        if(!i2c_start(addr))
        {
            i2c_write(reg);
            i2c_start(addr+1);
            if(header)
                length= i2c_read_ack();
            for(i=0; i < bytes-1; i++)
                data[i] = i2c_read_ack();
            data[bytes-1] = i2c_read_nack();
            i2c_stop();
        }

        return length;
    }

    int write_reg(uint8_t addr, uint8_t reg, uint8_t bytes, uint8_t header, uint8_t *data)
    {
        uint8_t i, err = 0;

        if(!i2c_start(addr))
        {
            i2c_write(reg);
            if(header)
                err = i2c_write(bytes);
            for(i=0; i < bytes; i++)
                err = i2c_write(*data++);
            i2c_stop();
        }

        return err;
    }

    There are logs from the two boards in the attachment with the sequential register read

    done with the mentioned above read function  - first character is the register, message

    length returned in the square brackets followed by 12 bytes of data read.

    <20:33:30> 0x00 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:30> 0x01 [0x04] = 0x41 0x43 0x45 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:30> 0x02 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:31> 0x03 [0x04] = 0x50 0x54 0x43 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:31> 0x04 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:31> 0x05 [0x10] = 0x09 0x51 0x8D 0x3B 0x21 0x2B 0x31 0x98 0x49 0x45 0xC3 0xD8
    <20:33:31> 0x06 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:31> 0x07 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x08 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x09 [0x40] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x0A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x0B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x0C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:32> 0x0D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:33> 0x0E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:33> 0x0F [0x04] = 0x00 0x10 0x07 0xF7 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:33> 0x10 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:33> 0x11 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:33> 0x12 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:34> 0x13 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:34> 0x14 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:34> 0x15 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:34> 0x16 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:34> 0x17 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x18 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x19 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x1A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x1B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x1C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:35> 0x1D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:36> 0x1E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:36> 0x1F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:36> 0x20 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:36> 0x21 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:36> 0x22 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:37> 0x23 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:37> 0x24 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:37> 0x25 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:37> 0x26 [0x08] = 0xC0 0x00 0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:37> 0x27 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x28 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x29 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x2A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x2B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x2C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:38> 0x2D [0x0C] = 0x04 0x00 0x02 0x00 0xA2 0x06 0x00 0x00 0x30 0x00 0x00 0x00
    <20:33:39> 0x2E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:39> 0x2F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:39> 0x30 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:39> 0x31 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:39> 0x32 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:40> 0x33 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:40> 0x34 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:40> 0x35 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:40> 0x36 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:40> 0x37 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x38 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x39 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x3A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x3B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x3C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:41> 0x3D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:42> 0x3E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:42> 0x3F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:42> 0x40 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:42> 0x41 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:42> 0x42 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:43> 0x43 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:43> 0x44 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:43> 0x45 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:43> 0x46 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:43> 0x47 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x48 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x49 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x4A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x4B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x4C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:44> 0x4D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:45> 0x4E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:45> 0x4F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:45> 0x50 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:45> 0x51 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:45> 0x52 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:46> 0x53 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:46> 0x54 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:46> 0x55 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:46> 0x56 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:46> 0x57 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:47> 0x58 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:47> 0x59 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:47> 0x5A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:47> 0x5B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:47> 0x5C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x5D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x5E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x5F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x60 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x61 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:48> 0x62 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:49> 0x63 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:49> 0x64 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:49> 0x65 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:49> 0x66 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:49> 0x67 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:50> 0x68 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:50> 0x69 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:50> 0x6A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:50> 0x6B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:50> 0x6C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x6D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x6E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x6F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x70 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x71 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:51> 0x72 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:52> 0x73 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:52> 0x74 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:52> 0x75 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:52> 0x76 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:52> 0x77 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:53> 0x78 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:53> 0x79 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:53> 0x7A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:53> 0x7B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:53> 0x7C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:54> 0x7D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:54> 0x7E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:33:54> 0x7F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    <20:37:20> 0x00 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:20> 0x01 [0x04] = 0x41 0x43 0x45 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:20> 0x02 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:21> 0x03 [0x04] = 0x50 0x54 0x43 0x48 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:21> 0x04 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:21> 0x05 [0x10] = 0x35 0xAE 0xF6 0x8C 0x3B 0x66 0x54 0x9A 0x51 0x4A 0x7E 0xE6
    <20:37:21> 0x06 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:21> 0x07 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:22> 0x08 [0x04] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:22> 0x09 [0x40] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:22> 0x0A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:22> 0x0B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:22> 0x0C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x0D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x0E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x0F [0x04] = 0x00 0x10 0x07 0xF7 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x10 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x11 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:23> 0x12 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:24> 0x13 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:24> 0x14 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:24> 0x15 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:24> 0x16 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:24> 0x17 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:25> 0x18 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:25> 0x19 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:25> 0x1A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:25> 0x1B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:25> 0x1C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x1D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x1E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x1F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x20 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x21 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:26> 0x22 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:27> 0x23 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:27> 0x24 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:27> 0x25 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:27> 0x26 [0x08] = 0xC0 0x00 0x00 0x00 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:27> 0x27 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:28> 0x28 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:28> 0x29 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:28> 0x2A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:28> 0x2B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:28> 0x2C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:29> 0x2D [0x0C] = 0x04 0x00 0x02 0x00 0xA2 0x06 0x00 0x00 0x30 0x00 0x00 0x00
    <20:37:29> 0x2E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:29> 0x2F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:29> 0x30 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:29> 0x31 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:29> 0x32 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:30> 0x33 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:30> 0x34 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:30> 0x35 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:30> 0x36 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:30> 0x37 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:31> 0x38 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:31> 0x39 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:31> 0x3A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:31> 0x3B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:31> 0x3C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x3D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x3E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x3F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x40 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x41 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:32> 0x42 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:33> 0x43 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:33> 0x44 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:33> 0x45 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:33> 0x46 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:33> 0x47 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:34> 0x48 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:34> 0x49 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:34> 0x4A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:34> 0x4B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:34> 0x4C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x4D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x4E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x4F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x50 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x51 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:35> 0x52 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:36> 0x53 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:36> 0x54 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:36> 0x55 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:36> 0x56 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:36> 0x57 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:37> 0x58 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:37> 0x59 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:37> 0x5A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:37> 0x5B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:37> 0x5C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x5D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x5E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x5F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x60 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x61 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:38> 0x62 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:39> 0x63 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:39> 0x64 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:39> 0x65 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:39> 0x66 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:39> 0x67 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:40> 0x68 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:40> 0x69 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:40> 0x6A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:40> 0x6B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:40> 0x6C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:41> 0x6D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:41> 0x6E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:41> 0x6F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:41> 0x70 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:41> 0x71 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x72 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x73 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x74 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x75 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x76 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:42> 0x77 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:43> 0x78 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:43> 0x79 [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:43> 0x7A [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:43> 0x7B [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:43> 0x7C [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:44> 0x7D [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:44> 0x7E [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    <20:37:44> 0x7F [0x00] = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

    Thank you,

    Sam

  • Hi Sam,

    One thing you can check is the SPI Flash first. It seems like you may not have an existing configuration loaded there first. Your EEPROM may be blank or it could be trying to push a patch to the blank memory, which could be causing this issue. First you have to program a valid full configuration on the EEPROM and then update it using I2C writes as you are trying to do.

    I would also recommend looking over the Firmware Update Over I2C application note, Section 4 is where it goes over the Flash Updates in more detail. Here is the section where it mentions what I was describing earlier:

    "The external SPI-Flash shall be programmed with a full 'flash.bin' the very first time the platform is powered up so that the region headers are set up correctly. The subsequent flash-updates can be executed by the external hosts by following the sequence detailed in subsequent sections. A full 'flash.bin' can be generated by the device's 'Application Customization Tool'. When generating a full 'flash.bin' using the GUI, 'Region offsets' for Region-0 and Region-1 shall be appropriately set, such that there is ample space between the regions to accommodate for the increased sizes of the future patch-bundles"

    Are you able to confirm if a full flash has already been programmed on your SPI Flash?

    Thank you,

    Hari

  • Hi Hari,

    No, the SPI flash has not been programmed with anything when I tried to read the registers as a preparation step for the firmware upload.

    I will attempt to program flash without checking the registers first and will try to read them afterwards.

    Thank you,

    Sam

  • Hi Hari,

    The application note talks about firmware update but I have difficulties understanding how to program blank SPI for the first time.

    I wonder if you could provide step by step instructions, please.

    Also, how does TPS65988 actually store data in SPI - is it by sector, by page or what? Say,1 if I programmed a few records in Flash

    when and how can I actually read them back to make sure that my process is working correctly?

    What does "FLvy" command actually do? Because, when I program my image into the Flash the "FLvy" command returns 0 but when

    I read the content of the Flash with "FLrd" command I get empty Flash (all 0xFF).

    Thank you,

    Sam

  • Hi Sam,

    The application note is about the firmware update but it also details programming the blank SPI for the first time. The section that I quoted in my last responses explains the reasoning, I've included it below as well.

    The steps that you will need to do are also described in Section 4.3, which I have shown below and if you scroll below this table you will also see how you should be sending these commands.

    The FLvy command will verify that the configuration that you wrote to the Flash is valid and this will let you know if the process is correct if you write the correct binary data. If you get that the Flash is empty, you may not have wrote the data or something else must've gone wrong. 

    The TPS65988 will store the data in Flash in 2 regions, they will be the same but will be set up so that the headers are correct for the configurations. You can see how it's broken up in Section 4.2 and Figure 1.

    Below is how you can extract the full flash.bin from the Application Customization Tool so that you can flash the right contents:

    You do not need to alter the regions as they will be set correctly by default.

    Thank you,

    Hari

  • Hari,

    We are not using aardvark cable. We have no direct access to the SPI Flash. It is wired to TPS65988 chip on the board.

    The only way to access it is by means of our embedded controller application. We wrote an application following the steps

    outlined in multiple firmware update documents provided by TI, however, all those documents talk about firmware "update".

    The procedure is - read the header from the SPI Flash, set up your pointers, update the firmware. We cannot do that -

    our Flash is empty. The image file contains all this information but we need to program it first onto a blank Flash.

    So my question was - do we set up the write pointer to the beginning of the Flash?

    Regards,

    Sam.

  • Hi Sam,

    Yes, you would write the pointer to the beginning of the Flash at address 0x0000. The Region 0 and 1 pointers and headers would be included in the Full flash.bin. The document is about firmware update but this is referring to the configurations and patches since the ROM contains the Firmware hence the term update but you would either be writing to the low region or the full flash depending on if the Flash already contains the region headers or not.

    Thank you,

    Hari