stm32f1之usb

所需积分/C币:10 2015-07-08 13:14:04 1.74MB PDF
5
收藏 收藏
举报

关于stm32的usb-fs-device平台的固件库介绍,和所有usb例程的介绍
UM0424 Contents 5 Custom hid demo 30 5.1 General description 30 5.2 Descriptor topology 30 5.3 Custom HID implementation 31 5.3.1 LED control 31 5.3.2 Push-button state report 32 5.3.3 ADC-converted data transfer 32 Mass storage demo.,,....,....,.,..... 33 6. 1 General description 33 6.2 Mass storage demo overview 33 6.3 Mass storage protocol 34 6.3.1 Bulk-only transfer(BOT) ..34 6.3.2 Small computer system interface(SCSI) ....38 6. 4 Mass storage demo implementations 6. 4. 1 Hardware configuration interface ,, 39 6. 4.2 Endpoint configurations and data management 6.4.3 Class-specific requests ..,..41 6.4.4 Standard request requirements 6.4.5 bot state machine 42 6.4.6 SCSI protocol implementation ....43 6.4.7 Memory management 44 6.4.8 Medium access management 44 6.5 How to customize the mass storage demo 46 Virtual COM port demo 49 7.1 General description 49 7.2 Virtual COM port demo proposal 49 7.3 Software driver installation 50 7. 4 Implementati 5 74.1 Hardware implementation 7.4.2 Firmware implementation 51 8 VirtualComport_ Loopback 53 8.1 General description 53 8.2 Demo overview 53 Doc D13465 Rev 12 3/85 Contents UM0424 8.3 Transferring data 54 8.3.1 Sending data from device to host 8.3.2 Receiving data from host to device 54 8.4 Running the demo 54 USB voice speaker demo .................. 55 9.1 General description 55 9.2 sychronous transfer overview ,,,55 9.3 Audio device class overview 56 9. 4 STM32 USB audio speaker demo 57 9. 4.1 General characteristics 58 9.4.2 Implementation 59 Device firmware upgrade 67 10.1 General description 67 10.2 DFU extension protocol 68 10.21 Introduction 68 10.2.2 Phases ..68 10.2.3 Requests .69 10.3 DFU mode selection 69 10.3.1 Run-time descriptor set 69 10.3.2 DFU mode descriptor set 70 10.4 Reconfiguration phase 74 10.5 Transfer phase 74 105 Requests 74 10.5.2 Special command/protocol descriptions ..,,75 10.5.3 DFU state diagram 10.5.4 Downloading and uploading ·: ,,,,77 10.5.5 Manifestation phase 10.6 STM32 DFU implementation 78 10.6.1 Supported memories 78 10.6.2 DFU mode entry mechanism .,,,,,78 10.6.3 DFU firmware architecture 10.6.4 Available dFU image for the stM32 10.6.5 Creating a DFU im 4/85 Doc D 13465 Rev 12 UM0424 Contents Composite example 80 11.1 General description 80 11.2 Architecture 81 11.3 USB device descriptor 81 11.4 Running the demo 82 12 Revision history 83 Doc D13465 Rev 12 5/85 List of tables UM0424 List of tables Table 1. Applicable products Table 2 Reference manual name related to each stm32 device Table 3 User manual name related to each evaluation board 8 Table 4 USB-FS Device peripheral interface modules 12 Table 5 Common register functions 12 Table 6. USB-FS-Device Driver medium layer modules 17 Table 8 Power management functions 25 Table 9. Eval board power consumption related jumpers. ..,,.28 Table 10. Key push button assignment 28 Table 11. Eval board memory support 34 Table 12. CBW packet fields 35 Table 13. Csw packet fields 36 Table 14, Command block status values 36 Table 15. scsI command set ..38 Table 16 Device descriptor ,,,,,,,,,46 Table 17. Configuration descriptor Table 18. Interface descriptors .....47 Table 19. Endpoint descriptors ...48 Table 20. Usart connector number for each evaluation board Table 21. Device descriptors 62 Table 22. Configuration descriptors 62 Table 23. Interface descriptors 62 Table 24. Endpoint descriptors ..65 Table 25. Flash memory used by DFU Table 26. Summary of DFU class-specific requests 69 Table 27. dFU mode device descriptor 70 Table 28. DFU mode interface descriptor Table 29. DFU functional descriptor .73 Table 30. Summary of dFU upgrade/upload requests .74 Table 31. Special command descriptions 75 Table 32. Document revision history 83 6/85 Doc D 13465 Rev 12 UM0424 List of fiqures List of figures Figure 1. USB application hierarchy 1国 10 Figure 2. USB-FS-Device library package organization Figure 3. Format of the four data bytes ..27 Figure 4. Custom HID topology 31 Figure 5. Data OUT format 32 Figure 6. Data IN Format 32 Figure 7. New removable disk in Windows 33 Figure 8. BOT state machine 37 Figure 9. Hardware and firmware interaction diagram .39 Figure 10. Medium access layer 45 Figure 11. NAND write operation Figure 12. Virtual COM port demo as USB-to-USART bridge 49 Figure 13. Communication example .50 Figure 14. Device manager window .,,.50 Figure 15. VirtualComport Loopback application overview :. .53 Figure 16. Window HyperTerminal message display 54 Figure 17. Isochronous oUT transfer .....56 Figure 18. STM32 USB-FS Device audio speaker demo data flow 57 Figure 19. Audio playback flow 58 Figure 20. Hardware and firmware interaction diagram .60 Figure 21. Interface state transition diagram 76 Figure 22. DFU firmware architecture 79 Figure 23. USB composite device with two interface functions 80 Figure 24. HID MSC composite architecture 81 Figure 25. USB device descriptor 81 Figure 26. STM32 device enumerated as composite 82 Doc D13465 Rev 12 7/85 Related documents UM0424 Related documents For more information on using the microcontroller devices listed in Table 1: Applicable roducts, please refer to the reference manuals below Table 2. Reference manual name related to each stm32 device Device name Reference manual STM32L151 xx and STm32L 152XX RM0038 STM32F102xx and STM32F103xX RM0008 STM32F302xx and STM32F303XX RM0316 STM32F372xX and STM32F373xX RM0313 The STM32 USB-FS-Device library is designed for use with the following evaluation boards Table 3. User manual name related to each evaluation board Eval board name User manual Device name STM3210E-EVAL UM0488 STM32F103ZGT6 STM3210B-EVAL UM0426 STM32F103VBT6 STM32L152-EVAL UM1018 STM32L152VBT6 STM32L152D-EVAL UM1521 STM32L152ZDT6 STM32373C-EVAL UM1564 STM32F373VCT6 STM32303C-EVAL UM1567 STM32F303VCT6 8/85 Doc ID 13465 Rev 12 UM0424 STM32 microcontroller family overview STM32 microcontroller family overview In this document, STM32 refers to the following devices LOW-density devices: STM32F101XX, STM32F102XX and STM32F103XX microcontrollers where the Flash memory density ranges between 16 and 32 kbytes Medium-density devices: STM32F101XX, STM32F102XX and STM32F103X microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes High-density devices: STM32F101 xx and STM32F103XX microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes XL-density devices: STM32F101xx and STM32F103xX microcontrollers where the Flash memory density ranges between 512 and 1024 Kbytes e Medium-density Low-Power devices: STM32L15xX microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes Low Power Medium-density plus devices STM32L15Xx and STM32L162XX microcontrollers where the Flash memory density is 256 Kbytes Low Power High-density devices: STM32L15XX and STM32L162Xx microcontrollers where the Flash memory density is 384 Kbytes STM32F3 Series: STM32F30xx microcontrollers where the Flash memory density ranges between 128 and 256 Kbytes STM32F37Xx microcontrollers where the Flash memory density ranges between 64 and 256 Kbytes Doc ID 13465 Rev 12 9/85 STM32 USB-FS-Device firmware library UM0424 3 STM32 USB-FS-Device firmware library This section describes the firmware interface(called USB-FS-Device Library)used to manage the STM32 USB 2.0 full-speed device peripheral. In the rest of the document, it will be referred to as USB-FS_ Device peripheral The main purpose of this firmware library is to provide resources to ease the development of applications for each USB transfer type using the USB-Fs Device peripheral in the STM32 microcontroller families USB application hierarchy Figure 1 shows the interaction between the different components of a typical USB application and the USB-FS Device library Figure 1. USB application hierarchy User Application STM32 USB-FS-Device Lib usb pwr usb conf b desc STM32xxX Std Periph Driver sb istr usb prop usb endp CMSIS usb core/usb init usb sil 方 Do3s22 USB-FS peripheral interface usb int uso regs usb mem USB-Fs Device peripheral Hardware(STM32+ Board 10/85 Doc ID 13465 Rev 12

...展开详情
试读 85P stm32f1之usb
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 签到新秀

关注 私信
上传资源赚钱or赚积分
最新推荐
stm32f1之usb 10积分/C币 立即下载
1/85
stm32f1之usb第1页
stm32f1之usb第2页
stm32f1之usb第3页
stm32f1之usb第4页
stm32f1之usb第5页
stm32f1之usb第6页
stm32f1之usb第7页
stm32f1之usb第8页
stm32f1之usb第9页
stm32f1之usb第10页
stm32f1之usb第11页
stm32f1之usb第12页
stm32f1之usb第13页
stm32f1之usb第14页
stm32f1之usb第15页
stm32f1之usb第16页
stm32f1之usb第17页

试读结束, 可继续读3页

10积分/C币 立即下载