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: Unable to Program via Application Customization Tool over I2C

Part Number: TPS65988

Good afternoon, 

I am trying to program the TPS65988 (specific part number TPS65988HDRSHR) over I2C using the Application Customization tool. I have purchased an FTDI C232HM-DDHSL-0 cable and installed the FTDI drivers bundled with TI's tool. The drivers are installed properly and I see the device enumerated properly in Device Manager. 

When I try to communicate with the device, I get an exception: 

Exception Encountered during I2C Address Sweel *** ERROR in FTDI call (I2C_OpenChannel), status: 1
<type 'exceptions.Exception'>

When I click 'Show Details', I see the following:

Traceback (most recent call last):
   File "dialogWindow.pyc", line 8906, in sweep_handler
   File "hw_interface.pyc", line 187 in hw_open
Exception

From the FTDI cable, I have the orange line connected to SCK, and the yellow and green lines connected to SDA. The black line is grounded to the same ground as the TPS65988. When I scope the lines, I do not see any clock being generated. 

Please advise,

Steve

  • Hi Steve,

    I've assigned this issue to an expert on the team who will help answer your question

  • Hi Steve,

    This issue is caused because the TI config tool can work only with FT4232H (quad port, clock up to 30 MHz), the part used on our EVM. Unfortunately, C232HM-DDHSL-0 adapter uses FT232H (single port, clock up to 30 MHz). You will need to use an adapter with a FT4232H chip in it. 

  • Is this documented anywhere???

    Also, I have been unable to find any adapters with an FT4332H chip in it. Would the Total Phase Aardvark be a good solution for me? 

  • Hi Steve,

    Yes, we recommend you use the Total Phase Aardvark. Alternatively, you could simply save the full flash binary image using the App Config GUI and then using another program of your preference to load that image onto the SPI Flash. You do not have to use the App Config GUI to load the Flash image onto the device.

  • This is an interesting method. Do you have any applications you would recommend (for loading to SPI flash over I2C)? I've ordered a Total Phase Aardvark, but it will take some time to arrive. I would love it if I could get up and running before then! 

  • You might try using something like FTDI FT_PROG utility. I personally haven't tried loading a binary with this tool so I cant say with 100% certainty that it will work but it looks like a good starting point. 

    Hope this helps

  • Good afternoon, 

    I received my TotalPhase Aardvark in the mail today and while I do get further, the process still fails. 

    If I sweep for I2C addresses, I see my device responds on 0x38 and 0x3F. When I try to program the flash, however, it fails verifying the file with the following error message: 

    SPI Flash to Device failed verification. 

  • Hi,

    To successfully flash the binary you need to make sure that the Aardvark's SPI lines are directly connected to the Flash device and the Aardvark's I2C lines are connected to the PD Controller's I2C lines. Then after you upload the binary to the flash, power cycle the PD controller. When the PD controller boots up it will load the new binary from the flash.  

  • The Aardvark's SPI lines are not directly connected to the flash device.

    We have the PD controller's I2C2 interface broken out on the board and connected to the Aardvark and then the SPI flash is connected to the TPS65988 on the SPI_MISO-GPIO8, SPI_MOSI-GPIO9, SPI_CLK-GPIO10, and SPI_SS-GPIO11 pins. 

    I was under the impression that the tool would write to the SPI flash through the PD controller over I2C. Is this not the case? 

  • So if you are using a standalone programmer such as the Ardvark, you can not program the flash through I2C. You need to connect the Aardvark's SPI lines directly to the Flash. The Ardvark will program the flash and when you power cycle the PD controller it will load the new configuration. That being said, there is a way to upload a new patch over I2C which is described in the app note: 

    This method is for applications where the protect has an embedded controller and there is a need to update the flash with a new patch bundle.

  • Do you have a header file and library containing the undefined/unimplemented functions/types/defines in the sample code? Many of the types, such as: s_AppContext, s_TPS_bootflag, s_TPS_portconfig, and some defines such as: REGION_0, REGION_1, REG_ADDR_PORTCONFIG, REG_LEN_PORTCONFIG, and more are not defined here. Also, functions such as ReadReg, WriteReg, and ExecCmd are not implemented in the sample code. 

    I guess I will have to write my own desktop to flash the binary using the Aardvark I2C only? 

  • Hi Steve,

    Unfortunately, we do not have any sort of code repository that we can share with customers. The example code in the app note is there more as a guide to how the code could look. It shows how the program follows the flow chart. It was not intended to be a copy and past example. The idea of the app note is to provide the relevant information to the customer so that they will be able to write their own program. The reason for this is that supplying a complete code solution creates a very high support burden and our team does not have the bandwidth needed to provide that support. This is why we leave it up to the customer to develop their own software solution. 

  • Hi All,

    A question on the same topic. If I'm understanding correctly, in order to upload a bin file to the external SPI flash through the TPS65988 I2C port, you need to have an initial bin file already saved in the external flash. Am I right?

    If so, is there really no way to upload the very first bin file to the external SPI flash through the TPS65988 I2C port?