Hello
"STUSB_NVM.h" file is generated by STUSB4500 GUI.
It contains the binary configuration of STUSB4500 NVM memory.
The NVM programming is done through I2C.
You can program the chip during manufacturing with any standard programming tool, as long as the tool has access to the I2C interface.
Here are the steps to program the NVM memory (with your own tools):
- Use the STSW-STUSB002 GUI to configure the STUSB4500 parameters according to your application needs (PDO, Voltage, Current, Overvoltage protection, …). Note that the GUI can be used offline for the parameters selection (i.e. without being connected physically to STUSB4500).
- With the GUI, generate the NVM config file (.h) (or .txt) which contains the binary configuration of STUSB45
- Use the NVM_Library source code (which contains the specific I2C sequence) to create an application which writes the binary configuration (.h) into the chip NVM memory : nvm_flash()
- Reset the chip so that it reloads its latest NVM configuration
- Now the chip is programmed. Each time it starts up, it will load the configuration from the NVM memory.
- Note 1 : In a typical application, the chip's NVM only needs to be programmed once (during manufacturing).
- Note 2 : The NVM technology has a limited number of write cycles possible (few thousands). So do not use an application which re-write the NVM all the time.
Here is a Faster alternative to program the NVM memory (with the GUI and Nucleo board):
- Connect the STUSB4500 eval board on top of STM32F072 Nucleo board. And connect the Nucleo board to your computer via USB.
- Use the STSW-STUSB002 GUI to configure the STUSB4500 parameters according to your application needs (PDO, Voltage, Current, Overvoltage protection, …).
- With the GUI, click the "Write NVM" button to flash the memory
- Reset the chip so that it reloads its latest NVM configuration
Regards