0% found this document useful (0 votes)
57 views11 pages

Stsw-Stusb004 Quickstart

Uploaded by

Asokane Natrajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views11 pages

Stsw-Stusb004 Quickstart

Uploaded by

Asokane Natrajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

STSW-STUSB004

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

2) The following folder tree is installed locally


COMPILING the NVM_config.h file
8
(2/3)
3) Copy and replace the “STUSB_NVM.h” generated by the GUI into the “Inc” directory.

4) Open the “Project.eww” file from EWARM directory into IAR


COMPILING the NVM_config.h file
9
(3/3)
5) Compile the project

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

Connect the STEVAL-ISC004V1 or STEVAL-CCC005V1


to the NUCLEO-F072RB NUCLEO board according to
the picture. Programing of the NVM is done
automatically by the MCU at power-up or when
pressing the black reset button.

IMPORTANT NOTICE

In order to have new NVM settings loaded into the


STUSB registers, it is mandatory to power-off or reset
the STEVAL-ISC004V1 or STEVAL-CCC005V1 eval
boards.
more information at:
www.st.com/stusb4500-pr

You might also like