Stsw-Stusb004 Quickstart
Stsw-Stusb004 Quickstart
QUICK START
Programming STUSB
default parameters (NVM)
with an STM32
STEVAL-ISC004V1 STEVAL-ISC005V1
STUSB4710 STUSB4500
Eval BOARD Eval BOARD
QUICK START
2
Introduction
This document describes how to seamlessly configure STUSB default parameters. A Graphical User
Interface (GUI) is used to manually customize STUSB parameters. Once frozen, the Non-Volatile-
Memory settings can be then dumped by the GUI into an output file. The STSW-STUSB004 provide
all the necessary Software structures and functions to load automatically the file into the NVM.
Main components
NUCLEO-F072RB STM32 Nucleo-64 development board with AMR Cortex M0
Mini-B USB cable with USB data support
STSW-STUSB004 STUSB4500 Graphical User Interface
STEVAL-ISC004V1
Compatible evaluation boards
STEVAL-ISC005V1
IAR 8.x C code compiler
SOFTWARE CONFIGURATION 3
Main files
Main components
USB_PD_defines.h Contains Registers definition from STUSB ICs
STUSB_NVM.h File automatically generated by the GUI. Contains the NVM configuration
Main.c Illustrates how to use the functions and build applications
C-compiler
In our example, an STM32F072RB MCU is used to run the code. Compiler is IAR.
Please note that the STUSB NVM library can runs equally with other MCU and/or using other Code
compilers.
GENERATING the custom NVM setting file
4
(1/2)
STEVAL_ISC004V1
The GUI can be downloaded by searching STSW-STUSB001 tool from www.st.com or from the STUSB4710
product pages in the TOOLS AND SOFTWARE tab.
Running the GUI on a Windows Laptop requires an USB to I²C interface in order to connect the USB port from
the PC to STUSB I²C port. A simple NUCLEO-F072RB can act as an USB-to-I²C bridge. Please download quick
installation guide from STSW-STUSB001 product page.
For full installation process, please check UM2254 – “STSW-STUSB001 Quick Installation Guide”.
GENERATING the custom NVM setting file
5
(2/2)
STEVAL_ISC005V1
The GUI can be downloaded by searching STSW-STUSB002 tool from www.st.com or from the STUSB4500
product pages in the TOOLS AND SOFTWARE tab.
Running the GUI on a Windows Laptop requires an USB to I²C interface in order to connect the USB port from
the PC to STUSB I²C port. A simple NUCLEO-F072RB can act as an USB-to-I²C bridge.
For full installation process, please check “STSW-STUSB002 Quick start Guide from the “Presentation &
Training Material tab”
EXPORTING the NVM_config.h file
6
From the above configuration window, press the “Save NVM to file” (or “Save NVM config”)
button. The configuration is saved into a .txt file for further re-use or debug. In parallel, a
“STUSB_NVM.h” file is generated in the GUI directory.
COMPILING the NVM_config.h file
7
(1/3)
1) Unzip the STSW-STUSB004 library
6) From the “Exe” directory, drag & drop the “NVM_Flasher_STM32F072RB.bin” file to the
NUCLEO-F072RB nucleo board.
SOURCE DESTINATION
PROGRAMING the NVM using the .bin
10
IMPORTANT NOTICE