cancel
Showing results for 
Search instead for 
Did you mean: 

[STUSB4500] writing NVM memory on STUSB4500 procedure?

vlee
Associate II

Dear

I want to update the NVM memory on the STUSB4500.

May I know the procedure of this, I download the STUSB003 SW lib. it not showing how to write NVM.

My guess

  1. update the register
  2. call function void nvm_flash(uint8_t Port)
  3. reset

Am I right??

also what is the meaning inside STUSB_NVM.h

Vic

1 REPLY 1
Gregory Go.
Senior II

Hello

"STUSB_NVM.h" file is generated by STUSB4500 GUI.

It contains the binary configuration of STUSB4500 NVM memory.

  • NVM programming

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):

  1. 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).
  2. With the GUI, generate the NVM config file (.h) (or .txt) which contains the binary configuration of STUSB45
  3. 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()
  4. Reset the chip so that it reloads its latest NVM configuration
  5. 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):

  1. Connect the STUSB4500 eval board on top of STM32F072 Nucleo board. And connect the Nucleo board to your computer via USB.
  2. Use the STSW-STUSB002 GUI to configure the STUSB4500 parameters according to your application needs (PDO, Voltage, Current, Overvoltage protection, …). 
  3. With the GUI, click the "Write NVM" button to flash the memory
  4. Reset the chip so that it reloads its latest NVM configuration

Regards