STMicroelectronics AN1577 DFU Implementation in ST7 USB Devices Application Note

This application note presents the implementation of a Device Firmware Upgrade (DFU) capability in ST7 USB microcontrollers. It follows the DFU class specification defined by the USB Implementers Forum, for reprogramming an application through USB. The DFU principle is particularly well suited to USB applications that require need to be reprogrammed in the field: The same USB connector can be used both for the standard operating mode, and for the reprogramming process. This operation is made possible by the IAP capability featured by most of the ST7 microcontrollers, which allows a FLASH MCU to be reprogrammed by any communication channel. The DFU process, like any other IAP process, is based on the execution of firmware located in Sector 0 of the ST7 Flash memory which manage the Flash operations (erasing and programming) of Sectors 1 and 2. This application note covers then two main aspects: The firmware located in Sector 0, The Interface between the firmware in Sector 0 and the firmware in Sectors 1 & 2. The proposed implementation is demonstrated with 2 different projects: the USB Low-Speed devices Evaluation Kit and the ST7265 Full-Speed 5-in-1 demoboard. In this document these projects are referred to as “LS project” and “FS project”. A basic DFU protocol is also introduced.


STMicroelectronics AN1577 DFU Implementation in ST7 USB Devices Application Note - cover page
Brand
STMicroelectronics
Document type
Application Note
Language
English
Pages
30
File format
PDF
File size
144 KB
Published
07 August, 2012
Updated
29 September, 2023
MD5 checksum
64CEC882439F2788AA535D628E72B75D

About this manual

This document presents the implementation of a Device Firmware Upgrade (DFU) capability for ST7 USB microcontrollers. It follows the DFU class specification defined by the USB Implementers Forum to allow reprogramming applications through USB using the same connector as standard operation.

The note covers two main aspects: the firmware located in Sector 0 of the Flash memory, which manages operations on Sectors 1 and 2, and the interface between these sectors. The proposed implementation is demonstrated with a Low-Speed project (Evaluation Kit) and a Full-Speed project (ST7265 demoboard).

What's inside

  • Introduction
  • DFU Class Phases
  • Enumeration Phase
  • Reconfiguration Phase
  • Transfer Phase
  • Manifestation Phase
  • Firmware Organization
  • Flash Sector Management
  • RAM Management
  • Hardware Considerations

Frequently asked questions

Which USB endpoint is used for all DFU command and data exchanges?

All commands, status, and data exchanges are performed through Control Endpoint 0.

What allows a FLASH MCU to be reprogrammed by any communication channel?

The IAP (In-Application Programming) capability featured by most ST7 microcontrollers.

Download PDF (144 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →