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.

TPS65982: Over-writing TPS65982 internal 'appcode' in OTP memory, rather than using SPI flash memory or UART

Part Number: TPS65982
Other Parts Discussed in Thread: TPS65987D

Greetings, forum members! 

Q1. Is it possible to over-write the default TPS65982 internal 'appcode' in OTP memory, rather than using SPI flash memory or UART?

Q2. How is the "customer programmable OTP" customer-programmed?

TI TPS65982 data sheet SLVSD02D – MARCH 2015–REVISED JUNE 2019, reads as follows, in excerpt.

DS1.  DS page 69 “9.4 Device Functional Modes 9.4.1 Boot Code ...The TPS65982 boot code is loaded from OTP on POR, and begins initializing TPS65982 settings. ... The unique I2C address is based on the customer programmable OTP, DEBUG_CTLX pins, and resistor configuration on the I2C_ADDR pin.”

Q3. How can the customer program the "customer programmable one-time programmable"?

Q4. Is customer programming of a one-time programmable and oxymoron?

DS1.  DS page 70, figure 63 title: "Flow Diagram for Boot Code Sequence" indicates that appcode may be loaded from SPI flash memory or UART.

My employer has strict rules regarding how firmware is updated.

  • Hello,

    Q1: No you must load the appcode by either a SPI flash or UART

    Q2: You use the application configuration tool found below. There are videos on this page as well to help you get started. https://www.ti.com/tool/TPS6598X-CONFIG 

    Q3: Using the configuration tool you generate a binary image that will be loaded either through SPI flash or UART

    Q4: Not sure I understand this question. If you use the SPI flash implementation, you will program the SPI flash using the binary image you created from the configuration tool. once this image is loaded, each time the PD controller is powered up it will pull this image from the SPI flash and load the appropriate settings you have configured

    Hope this helps answer your questions 

  • Hello forum!

    Q1. Okay. Thank you, Adam!

    Q2. Okay. Thank you, Adam!

    Q3. Okay. Thank you, Adam!

    Q4. The data sheet reads "...The unique I2C address is based on the customer programmable OTP..." I do not understand this. Isn't customer reprogramming allowed to happen more than once? Why call customer programmable one-time programmable (OTP)? If the customer can re-program boot code and appcode repeatedly, then why is the data sheet referring to "one-time programmable" here? How many times can the customer program the OTP" to define the unique I2C address? Are not "customer programmable" and OTP" self-contradictory? I must be missing something here.

    Best regards,

    Michael

  • Hello,

    I would not get hung up on the term OTP. This is in reference to the image put on the external flash that the PD controller will load each time. However, you can still read/write to the PD controller as many times as you want. However, any settings that you re-programmed will be erased after each power cycle, where it will then load the configuration from the external flash again.

  • Hi Adam,

    I've been working with Michael to help understand and clarify his questions. The ultimate goal here is to understand the potential need for uploading something over SPI Flash once the product is released to the field, or if the updates and future proofing can be done in another manner.

    Based on our discussions, we agree it is possible to operate standalone with the internal ROM without the use of the SPI Flash, correct? Once flashed properly, it will use the internal boot code from the SPI Flash binary image instead of the internal ROM. The major question stems from is there any need from the SPI Flash or can all these changes be made by controlling each individual I2C Register? Is there anything else done in the Configurator besides register manipulation that cannot be done otherwise?

    Thanks,

    Matt

  • Hello Matt,

    If you are concerned about future proof of you device I would suggest using the external SPI flash and not rely on the default configurations. There are two parts two creating a binary image using the configuration tool. The first is the register configuration of the device, but the second is the firmware base image which is the core framework for the device. So if an issue is found in our firmware, the fix is made in the firmware base image which the customer would then update. If you use the default configurations in the ROM, you will never be able to change the firmware base image.

    You can update the contents of the SPI flash through the use if I2C commands to the PD controller. You can refer to the following app note to help get you started. This would help future proof your system since you would be able to update the EC firmware that would then update the SPI flash connected to the PD Controller. http://www.ti.com/lit/an/slvae21a/slvae21a.pdf

  • Good afternoon Adam, 

    Matt had kindly re-phrased my questions for the post that you replied to. I find your answers valuable, as it is important for me to understand and be able to explain to my management that it is possible that the base appcode is updated by TI over time and that may be reflected in the output of the configuration tool. 

    Apart from the base code image appcode, are there differences in what can be configured by the configuration tool and the I2C interface? 

    Does all configuration, via the configuration tool and the I2C port, amount to setting the state of the same set of configuration registers?

    Is there any configuration that the configuration tool can do which can not be done via the I2C port?

    I had read the data sheet, EVM manual, design guide, and the slvae21a.pdf app note, and will continue to refer to them. 

    Best regards,

    Michael

  • Hi Michael,

    Here is another way to phrase the importance of the firmware base image. Our PD controllers such as the TPS65987D operate from a ROM and RAM architecture. The ROM is of course physically etched onto the silicon with the RAM being loaded externally from the SPI flash. As mentioned, over time issues are found that need to be resolved. There is no way to change the code of the ROM, so we copy the relevant portion of the code that needs to be fixed into the RAM, and whenever that specific function is called on, instead of pointing to the ROM it instead gets pointed to the new function in the RAM. The firmware base image includes all of these fixes and updated functions into the RAM.

    There are also registers such as the sink/source capabilities that cannot be changed via I2C master control, but can only be set within the configuration.

    Hope this helps. Let me know if you have any other questions.

  • Hi Adam,

    Are the sink/source capabilities the sink/source capabilities of certain I/O, pins, or what sink/source capabilities are those?

    Best regards,

    Michael

  • The Type-C PD source capabilities and the Type-C PD sink capabilities that the PD controller advertises to any connected device. (i.e Sink up to 20V but source only 5V)

  • Adam, thank you for your support. Michael

  • Will the TPS65892 or TSP65987D ROM programming (state, data, bits) ever change over their mass-production lifetime? 

    Regards, Michael

  • Hello Michael,

    No, the internal ROM will not change over the production life of either device

  • Hello Adam,

    Are there any other flash memories that are suitable? The TPS65987EVM BOM document SLVUBO9A specifies the Micronix MX25L8006 8Mb SPI serial flash. I have been seeking an alternative that is certain to function adequately identically, as Micronix is not an approved supplier at my employer. I see that the MX25L8006 includes additional unique features, such as an "additional 512 bit secured OTP for unique identifier", that I believe are not used in the TPS65987D application. I studied the memory maps in section 4.2 Flash Memory Organization in document SLVAE21A. Has TI considered hosting a FAQ page?

    Regards,

    Michael

  • You can reference section 9.2.2.2.2.7 of the datasheet which lists flashes that are compatible with the TPS65987D

  • Hello Adam,

    Thank you!  I will use section 9.2.2.2.2.7 Thunderbolt Flash Options Table 21 "Flash Supported for Thunderbolt Systems" for my non-Thunderbolt Mode design.

    Is it okay to use the Macronix MX25V8035FM2I rather than the TI-recommended Macronix MX25V8006FM2I? These are identical in function supposedly, but it turns out that even though Macronix has the '8006' on a year 2015 longevity list, Macronix is now recommending to replace the '8006' with the '8035' for new designs.

    Cheers,

    Michael

  • Hi Michael,

    I'm sure it is fine, but I cannot comment on their recommendation or say with 100% certainty that it will be the same.

  • Hi Adam

    Can you please direct me to the TPS65987D data sheet definition of the function of each of the GPIO pins? Where do users (customers) find this information? TPS65987D data sheet SLVSES1B –MAY 2018–REVISED JANUARY 2019

    In the entire data sheet, there are no definitions of the GPIO pin functions, as far as I can find. There are no definitions of GPIO pin functions when using the TPS65987D stand-alone - no external flash memory.
    I find just one GPIO function definition, on page 50: “GPIO_0 is reserved to act as the reset signal for the Thunderbolt controller.” This appears to contradict the use of GPIO_0 as "SSMX_DP" on the TPS65987EVM.
    The TPS65987D data sheet table that describes the function of each pin only says that the GPIO are general purpose IO.

    Best regards,

    Michael

  • Michael,

    Please refer to the host interface technical reference manual for register definitions and full functionality of the device

    http://www.ti.com/lit/ug/slvubh2b/slvubh2b.pdf?ts=1588863014304

    Also, for any future questions not related to the original topic of this post, please post a new question in the forums so that others may benefit from your post.