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.

TPS65987D: Flashing blank dedicated SPI Memory for PD Controller for the first time using Host I2C in product

Part Number: TPS65987D
Other Parts Discussed in Thread: TPS65987, TPS65988

Hello Team,

We are working on validating TPS65987 PD Controller with SoC based Host.

We are aware that we can update Regions(0 and 1) on SPI Flash using

(TPS65987 and TPS65988 SPI Flash Firmware Update Over I2C)SLVAE21A.pdf .

But here we found that, SPI Flash memory should be preflashed with Fullflash.bin to have proper region pointers and Headers.

But our case is where we are going to place blank SPI on production board attached with TPS65987. And we want to flash SPI with fullflash.bin via a program once the system start booting. We will implement functionality to check if SPI is flashed or not during subsequent boot.

Now if there is no configuration in SPI Flash then what will be the status of TPS controller. Does it allows to read/write 4CC registers as I am facing issue. As I tried with my board to write 0xFF in whole SPI range.

Now below is the status, when I am trying to write Fullflash.bin to SPI then I am facing issue in Writing and Reading 4CC commands in register 0x08, when there is no configuration in SPI Flash.

===========================================================

######Previous status######

IIC Read Regadrs = 0x0f

OLD Version # (0xDD.MM.mm.BB) = 0xf7.07.10.08.

IIC Read Regadrs = 0x2d

PatchHeaderErr (Bit 0): 0
SpiFlashPresent (Bit 3): 1
Region0 Attempted (Bit 4): 1
Region1 Attempted (Bit 5): 0

######Status after erasing SPI FLash by writing 0xFF ###############

IIC Read Regadrs = 0x0f

OLD Version # (0xDD.MM.mm.BB) = 0xf7.07.10.00.

IIC Read Regadrs = 0x2d

PatchHeaderErr (Bit 0): 0
SpiFlashPresent (Bit 3): 1
Region0 Attempted (Bit 4): 1
Region1 Attempted (Bit 5): 1

===========================================================

Now unable to flash SPI again as "FLrr" "FLem" "FLad" "FLwd" are not responding.

So Questions in short

  • Is it posibble to flash blank SPI FLash with full-flash.bin from TPS65987 via Host I2C in production phase? (We have no plan to use seperate flashing method)
  • If yes then please suggest right document, Code Snippet to follow and suggestion if any? 

Thanks

Girish Sharma

  • Hi Girish,

    Did you set the right address when you execute FLad?

    I think the command should be workable, but you may need to input right data. The address is a 32-bit little-endian value.

    And you can check the read back the byte of 0x08 register and 0x09 register. If the byte is 0x00, it means that the command executes successfully.

    Thanks.

    Bing

  • Thanks Bing,

    Yes you are correct, after posting this ticket I found that since Slave address get changed after erasing SPI flash.

    Since Slaveadddress is hardcode in some of the function call so I am facing this issue.

    Ok now please let me know if I am doing right to Flash SPI with fullflash.bin by reviewing my below steps(Subject of this Thread)

    - Passing Address 0x00000000 to FLad and then writing fullflash_array.c bytes in 64Bytes chunk till the sizeof fullflash_array.c to SPI by passing bytes to FLwd.

    - Will this mehod work for me to Flash SPI with fullflash.bin?

    Since the SPI flash is blank and there is no region Pointers available.

    Thanks

  • Hi Chirag,

    I understand your requirement. You want to flash the Flash in one time and don't want to change the low address/ high address again and again right?

    I think it's okay to act as what you want. But we set high/ low region flashing rule is to reduce the fail rate during flashing. We can ensure that after one region is flashed successfully then we can start to flash the other region.

    Thanks.

    Bing