Table 1. Applicable products
1 Related documents
Table 2. Reference manual name related to each STM32 device
Table 3. User manual name related to each evaluation board
2 STM32 microcontroller family overview
3 STM32 USB-FS-Device firmware library
3.1 USB application hierarchy
Figure 1. USB application hierarchy
Figure 2. USB-FS-Device library package organization
3.2 USB-FS_Device peripheral interface
Table 4. USB-FS_Device peripheral interface modules
3.2.1 usb_reg(.h, .c)
Table 5. Common register functions
3.2.2 usb_int (.h , .c)
3.2.3 usb_mem (.h , .c)
3.3 USB-FS-Device_Driver medium layer
Table 6. USB-FS-Device_Driver medium layer modules
3.3.1 usb_init(.h,.c)
3.3.2 usb_core (.h , .c)
3.3.3 usb_sil(.h, .c)
3.3.4 usb_type.h / usb_def.h
3.3.5 platform_config.h
3.4 Application interface
3.4.1 usb_conf(.h)
3.4.2 usb_desc (.h, .c)
3.4.3 usb_prop (.h , .c)
3.4.4 usb_endp (.c)
3.4.5 usb_istr(.c)
3.4.6 usb_pwr (.h , .c)
Table 8. Power management functions
3.5 Implementing a USB-FS_Device application using the STM32 USB-FS-Device library
3.5.1 Implementing a no-data class-specific request
3.5.2 How to implement a data class-specific request
3.5.3 How to manage data transfers in non-control endpoint
4 Joystick mouse demo
4.1 General description
Figure 3. Format of the four data bytes
4.2 STM32 low-power management in suspend mode
Table 9. Eval board power consumption related jumpers
4.3 Remote wakeup implementation
Table 10. Key push button assignment
5 Custom HID demo
5.1 General description
5.2 Descriptor topology
Figure 4. Custom HID topology
5.3 Custom HID implementation
5.3.1 LED control
Figure 5. Data OUT format
5.3.2 Push-button state report
Figure 6. Data IN Format
5.3.3 ADC-converted data transfer
6 Mass storage demo
6.1 General description
6.2 Mass storage demo overview
Figure 7. New removable disk in Windows
Table 11. Eval board memory support
6.3 Mass storage protocol
6.3.1 Bulk-only transfer (BOT)
Table 12. CBW packet fields
Table 13. CSW packet fields
Table 14. Command block status values
Figure 8. BOT state machine
6.3.2 Small computer system interface (SCSI)
Table 15. SCSI command set
6.4 Mass storage demo implementations
6.4.1 Hardware configuration interface
Figure 9. Hardware and firmware interaction diagram
6.4.2 Endpoint configurations and data management
6.4.3 Class-specific requests
6.4.4 Standard request requirements
6.4.5 BOT state machine
6.4.6 SCSI protocol implementation
6.4.7 Memory management
6.4.8 Medium access management
Figure 10. Medium access layer
Figure 11. NAND write operation
6.5 How to customize the mass storage demo
Table 16. Device descriptor
Table 17. Configuration descriptor
Table 18. Interface descriptors
Table 19. Endpoint descriptors
7 Virtual COM port demo
7.1 General description
7.2 Virtual COM port demo proposal
Figure 12. Virtual COM port demo as USB-to-USART bridge
Figure 13. Communication example
7.3 Software driver installation
Figure 14. Device manager window
7.4 Implementation
7.4.1 Hardware implementation
Table 20. USART connector number for each evaluation board
7.4.2 Firmware implementation
8 VirtualComport_Loopback
8.1 General description
8.2 Demo overview
Figure 15. VirtualComport_Loopback application overview
8.3 Transferring data
8.3.1 Sending data from device to host
8.3.2 Receiving data from host to device
8.4 Running the demo
Figure 16. Window HyperTerminal message display
9 USB voice speaker demo
9.1 General description
9.2 Isochronous transfer overview
Figure 17. Isochronous OUT transfer
9.3 Audio device class overview
9.4 STM32 USB audio speaker demo
Figure 18. STM32 USB-FS_Device audio speaker demo data flow
9.4.1 General characteristics
Figure 19. Audio playback flow
9.4.2 Implementation
Figure 20. Hardware and firmware interaction diagram
Table 21. Device descriptors
Table 22. Configuration descriptors
Table 23. Interface descriptors
Table 24. Endpoint descriptors
10 Device firmware upgrade
10.1 General description
Table 25. Flash memory used by DFU
10.2 DFU extension protocol
10.2.1 Introduction
10.2.2 Phases
10.2.3 Requests
Table 26. Summary of DFU class-specific requests
10.3 DFU mode selection
10.3.1 Run-time descriptor set
10.3.2 DFU mode descriptor set
Table 27. DFU mode device descriptor
Table 28. DFU mode interface descriptor
Table 29. DFU functional descriptor
10.4 Reconfiguration phase
10.5 Transfer phase
10.5.1 Requests
Table 30. Summary of DFU upgrade/upload requests
10.5.2 Special command/protocol descriptions
Table 31. Special command descriptions
10.5.3 DFU state diagram
Figure 21. Interface state transition diagram
10.5.4 Downloading and uploading
10.5.5 Manifestation phase
10.6 STM32 DFU implementation
10.6.1 Supported memories
10.6.2 DFU mode entry mechanism
10.6.3 DFU firmware architecture
Figure 22. DFU firmware architecture
10.6.4 Available DFU image for the STM32
10.6.5 Creating a DFU image
11 Composite example
11.1 General description
Figure 23. USB composite device with two interface functions
11.2 Architecture
Figure 24. HID MSC composite architecture
11.3 USB device descriptor
Figure 25. USB device descriptor
11.4 Running the demo
Figure 26. STM32 device enumerated as composite
12 Revision history
Table 32. Document revision history