1 / 21

Rapid Prototyping Solutions

This session explores the USB capabilities available when using MQX and demonstrates how the MQX File System stack can interact with a USB stack. Participants will engage in a hands-on lab that involves writing data to a USB Flash Stick.

redmondson
Download Presentation

Rapid Prototyping Solutions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rapid Prototyping Solutions USB and MFS Stacks

  2. Module Objectives • This session describes the USB capabilities that are available when using MQX • Describes how the MQX File System stack can interact with a USB stack • Presents a hands-on lab with writing data to a USB Flash Stick

  3. Module Agenda • USB Host • USB Device • MFS • USB and File System Lab

  4. Module Agenda • USB Host • USB Device • MFS • USB and File System Lab

  5. MQX Host USB • Implements USB 2.0 version • Layered architecture • scalability (choose only components needed in application) • portability (class drivers independent on underlying hardware) • Class drivers supported: • HID devices (mouse, keyboard) • MSD devices (flash disk) • HUB support (transparent communication through HUB) • CDC devices (serial communication)

  6. Demo Applications Available • Mouse • Keyboard • Mass Storage Device • CDC Serial • Found in <mqx_install_dir>\usb\host\examples

  7. MQX USB Host Structure User Application Intermediate I/O Drivers Other to be developed MFS Host Class Drivers MSD HID CDC Hardware IndependentLayer HUB HOST API (class level) USB 2.0 Chapter 9 API OS and HW-level HOST API USB Module (low-level drivers) KHCI (Kirin2U/Kirin3-specific controller) EHCI (Enhanced Host Controller Interface) Other (OHCI, ...)

  8. Module Agenda USB Host USB Device MFS USB and File System Lab 8

  9. Stack Features • All USB-IF chapter 9 compliance • USB Class Support • Human Interface Device (HID) • Communication Data Class – Abstract Control Model (CDC – ACM) • PHDC (Personal Health Care Device Class) • MSD (Mass Storage Support)

  10. Demo Applications available • Mouse • USB to Serial • USB Network Adapter • Weigh Scale (IEEE 11073 – 20601, IEEE 11073 - 10415) • RAM Disk • Found in <mqx_install_dir>\usb\device\examples

  11. Architecture Overview Applications Mouse Medical Commun- ication Storage Class API HID PHDC CDC MSD Device API USB Device Stack Library Device Layer Controller API mcf5229x mcf54455 Low level driver - - - - - HW Register IF - - - - - V2 USB IP V4 USB IP USB IP

  12. Device Layers • USB Descriptors, endpoint information • USB Application implementing class specific callbacks • USB Class API user Application • USB Framework Module implementation (USB Ch9, Control Endpoint …) • USB generic class implementation (Suspend/Resume/Reset ….) • USB function specific implementation (Non Control Endpoint Request, Class specific Request) • USB Device API user Class Device Layer • Abstracts Hardware specific details and provides generic USB interfaces to the upper layer • Allows easy port of Applications/Class functionality over different USB IPs • USB Controller IP interfacing module. • candidate to change for every new USB IP Low level driver USB Hardware

  13. Module Agenda USB Host USB Device MFS USB and File System Lab 13

  14. MFS structure Hardware USB mass storage devices ATA PCMCIA Removable hard drives Flash cards Files and directories MFS Partition manager (optional) Device 14

  15. MFS Features Standard FAT12, FAT16 and FAT32 support Standard handling of directory paths Both \ and / can be used as directory separators Support for * and ? wildcard characters File Attributes Supported Standard: Directory, Read-only, Hidden File, System file, Archived file Special: Volume Label file (only one such file allowed in root directory) File Time and Date Each file entry contains 16-bit time and date fields. FAT Copies MFS updates as many FATs as configured for. Only reads the first FAT. High-Level Formatting An application can perform high-level formatting on a disk by calling ioctl(). Partition Manager Support for multiple partitions on one physical drive 15

  16. Device Devices usable by MFS MFS can be installed on any memory-oriented device which is standard MQX IO device in terms of open/close/read/write/ioctl calls is able to “seek” on any given position supports few block-oriented IOCTL Devices supported today ATA PC Card flash cards USB mass storage devices RAM or MRAM FlashX driver working with internal or external Flash memory SPI-based SD Cards Code under development (or legacy not-tested code) ATA hard drives floppy-disk drives 16

  17. MFS – API Basic MFS API _io_mfs_install - initializes MFS and allocates memory for all of the internal MFS data structures. _io_mfs_uninstall - uninstalls the MFS device driver and frees the memory context. fopen -Opens the device by specifying device name or opens a file if both device name and file path is specified. fd_ptr = fopen(“mfsram:\data\march\March2000results.data”, “w”); fclose –Closes the file and frees the memory allocated by given FILE_PTR ioctl – File- or device-specific control interface. 17

  18. Module Agenda USB Host USB Device MFS USB and File System Lab 18

  19. Hands-On • Follow the USB Lab document to read and write to a USB flash drive

  20. Summary Learned about the USB capabilities that are available when using MQX Described how the MQX File System stack can interact with a USB stack Performed a hands-on lab with writing data to an USB Flash Stick 20

More Related