下载  >  存储  >  其它  > Freescale MSD FATFS

Freescale MSD FATFS 评分

如何使用FATFS文件系统。对具体使用做了较为详细的介绍,希望对开发者有用。
Revision History o provide the most up-to-date information the revision of our documents on the world wide Web will be the most current. Your printed copy may be an earlier revision. To verify you have the latest information available, refer to http:/www.freescale.com The following revision history table summarizes changes contained in this document Revision Revision Number Date Description of Changes Rev. o 02/2011 Initial Release Freescale Tm and the Freescale logo are trademarks of Freescale Semiconductor, Inc C Freescale Semiconductor, InC, 2011. All rights reserved MSDFATFS User Guide. Rev. o Freescale Semiconductor ⅲi Chapter 1 Before You begin 1.1 About this book ,日 垂重1重重 1.2 Reference materia 1.3 Acronyms and abbreviations 1. 4 Key Terms 2 Chapter 2 Getting Familiar 2.1 Introduction 翻 2.2 File allocation Table overview 2.3 Software Module 2.3.1 MSD FATFS Feature 2.3.2 Module license 335556 2. 4 Directory structure 翻 重日日 Chapter 3 MSD FATFS Architecture 3.1 Architecture Overview 重1重 3.2 FATFS Module overview 3.2.1 FATFS AP|s,,,,,,,,, 999 3.2.2 Disk lo Interface 10 Chapter 4 Developing Applications 4. 1 Background 1日 重1重 4.2 Configuration Options 4.3 Create a project m口口 ...16 Appendix a Working with the Software A1 Introduction 17 A.1.1 Preparing the setup ..17 A.1.2 Building the application 22 A 1.3 Running the application ..,,,,,,22 A2 Setup Hyper Terminal to get log ..22 Appendix B FATFS Demo B. 1 Setting up the demo 27 B2 Running the demo ..27 B 2.1 Mouse demo .,,,,,,,,,,,,,27 MSDFATFS USer Guide Rev o Freescale semiconductor Appendix C FATFS Test Application C 1 Setting up the demo 重1面 重1 35 C 2 Running the demo 35 C.2.1 Test Group 1 36 C.2.2 Test Group 2 39 C.2.3 Test Group 3 .40 MSDFATFS USer Guide. Rev. 0 Freescale semiconductor Chapter 1 Before You Begin 1.1 About this book This book describes how to use File Allocation Table File System module with Freescale USB Host Stack Table 1-1 shows the summary of chapters included in this book Table 1-1. MSDFATFSUG summary Chapter Title Description Before You begin This chapter provides the prerequisites for reading this book Getting Familiar This chapter provides the information about the File allocation Table File System software module MSD FATFS Architecture This chapter discusses the architecture design of the File Allocation Table File System module for Freescale USB Host Stack Developing Applications This chapter provides the steps that a developer must take to develop applications on top of the FATFs module Working with the Software This chapter provides the steps to building, running the applications FATES Demo This chapter provides the setup and running MSD FATFS demo example for CFV1 processors FATFS Test Application This chapter provides the setup and running MSD FATFS test example for CFV1 processors 1.2 Reference material Use this book in conjunction with Freescale Usb Stack with PHDc Host Users guide( document medusbhostug, rev. 4 FileallocationTableinformationathttplenswikipediaorg/wikiileallocationtaBle FatfSmOduleApplicationNoteathttp:/elm-chan.orgswfen/appnote.html Freescale msd Fatfs aPI reference Manual(document MSDFATFSAPIRM, Rev. 0) USB Host source code MSD FATES SOurce code We assume that you are familiar with the following reference material USB Specification Revision 1.1 USB Specification Revision 2.0 MSDFATFS USer Guide. Rev. 0 Freescale semiconductor Before You Begin 1.3 Acronyms and Abbreviations Table 1-2. Acronyms and abbreviations API Application Programming Interface COM Communication DBCS Double-Byte Character Set EVB Evaluation FAT File allocation table FATFS File Allocation Table File System IDE Integrated Development Environment HCI Host controller interface MBR Master boot record MSD Mass Storage Device OEM Original Equipment Manufacturer Personal Computer SCSI Small Computer Systems Interface USB Universal serial bus 1. 4 Key Terms Table 1-3 shows the terms used throughout the book Table 1-3 Importance terms Term Description Code Page Code page is another name for character encoding. It consists of a table of values that describes the character set for a particular language Cluster To reduce the overhead_of managing on-disk data structures, the file system does not allocate individual sectors but contiguous groups of sectors called clusters FAT12 A type of FAT file system that uses 12 bits value to address clusters FAT16 A type of FaT file system that uses 16 bits value to address clusters A type of FAT file system that uses 32 bits value(in which 4 bits are reserved )to address clusters Long File Name In a file system that supports long file names, a file or directory name can be as long as 255 characters including one or more dots and extensions. a complete path of the file has a maximum of 260 characters so volumes with many levels of directories must use shorter names Sector Sector is the smallest storage unit in a mass storage medium. Typically, a sector holds 512 bytes of information. However, some medium can have sector size more than 512 bytes Partition A partition is a logical division on mass storage device. The term is also known as Volume or Logⅰca|Disk MSDFATFS USer Guide, rey, o Freescale semiconductor Chapter 2 Getting Familiar 2.1 Introduction The FatFS module is developed based on msd class of Freescale USB Stack with PHDC Software Suite Its architecture contains USB driver code, disk i/o interface functions, FAT APIS, and some applications This document intends to help you gain an insight into the File allocation table and capabilities to develop your own applications. The document is targeted for firmware application developers who would like to develop the applications using FatFS file system module 2.2 File allocation Table overview he mass storage media is organized logically as a Master Boot record and several partitions. Figure 2-1 describes the logical structures of a mass storage medium Master boot record First Prim ary partition Second Prim ary Partition(optional) Third Primary P n(option al Extended partition 1 Extended partition 2 Extended Partition N Figure 2-1. Logical structure of mass storage media he master boot record is located at sector zero It contains three items an area for executable code. a partition table, and a boot signature. The partition table enables defining one or more partitions, or logical volumes, in the storage media. Many devices have just one volume. The partition table in the MBR sector has room for four 16-byte entries that specify the sectors that belong to a partition a FaT partition composed of four different sections as shown in the following figure MSDFATFS USer Guide. Rev. 0 Freescale semiconductor Getting Familiar Reserved Region Boot sector I FS Information Sector(FAT32 only) More reserved sectors(optional) FAT Region File Allocation Table #1 File Allocation Table #2 Root Directory Region(FAT12/16 only) Data Region (for files and directories) Figure 2-2. FAT partition structure Reserved Region These sectors are located at the very beginning. The first reserved sector(sector O) is the Boot Sector(Partition Boot Record). It includes an area called the blos Parameter Block (with some basic file system information, in particular its type, and pointers to the location of the other sections) and usually contains the operating system's boot loader code. The total count of reserved sectors is indicated by a field inside the boot Sector For Fat32 file systems, the reserved sectors include a File System Information Sector at Sector l and a Backup boot sector at Sector 6 FAT Region. This typically contains two copies of the File Allocation Table for the sake of redundancy checking, although the extra copy is rarely used even by disk repair utilities. These are maps of the Data Region, indicating which clusters are used by files and directories In Fat16 and FAT12, they immediately follow the reserved sectors Root Directory Region. This is a Directory Table that stores information about the files and directories located in the root directory It is only used with Fat12 and FaT 16, and imposes on the root directory a fixed maximum size which is pre-allocated at creation of this volume. FAT32 stores the root directory in thc data rcgion, along with files and other directories, allowing it to grow without such a constraint Therefore for Fat32, the data region starts here Data Region. This is where the actual file and directory data is stored and takes up most of the partition. The size of files and subdirectories can be increased arbitrarily (as long as there are free clusters) by simply adding more links to the file s chain in the FAT. Note that the files are allocated in units of clusters, so if a I KB file resides in a 32 KB cluster, 31 KB are wasted. FAT32 typically commences the root Directory Table in cluster number 2, the first cluster of the Data region FAT uses little endian format for entries in the header and the FAT(s) MSDFATFS USer Guide Rev o Freescale semiconductor Getting Familiar 2.3 Software Module 2.3.1 MSD FATFS Feature The MSd fatfs software module uses class msd's apis of freescale usb stack with phdc host to access mass storage device. The module supports FAT sub-types: FAT12, FAT16, and FAT32 Number of open files: Unlimited depends on available memory Multi-partition: Number of volumes(up to 10) File size: Depends on FAT specs(up to 4 GB Volumc sizc: Depends on FaT spccs(up to 2 TB on 512 bytes/sector) Cluster size: Depends on FAT specs(up to 64 KB on 512 bytes/sector) Sector size: Depends on FAT specs(up to 4 KB) Long file name support in ANSI/OEM or Unicode Multiple ansi/oem code pages including DbCs Code size reduction depending on user configuration The class drivers are programmed with generic code, so they can be used with other processors if standard SCSI commands arc provided like msd class of thc Frccscalc USB Host Stack. In this version, it supports following Freescale hardware platforms Coldfire v2 family M5222 1 Demo M52259Demo M52259EVB CodeFire vI family CFVIJMIZ8EVB CFVIMM256Demo CFV1JE123 Demo K40 23.2 Module license FATFS is an open source module. It follows the Bsd-style license. Redistributions of source code must retain the following copyright notice MSDFATFS USer Guide. Rev. 0 Freescale semiconductor

...展开详情
所需积分/C币:10 上传时间:2013-10-08 资源大小:1.05MB
举报 举报 收藏 收藏
分享 分享
ModbusTCP/RTU网关设计

基于UIP协议栈,实现MODBUS联网,可参考本文档资料,有MODBUS协议介绍

立即下载
html+css+js制作的一个动态的新年贺卡

该代码是http://blog.csdn.net/qq_29656961/article/details/78155792博客里面的代码,代码里面有要用到的图片资源和音乐资源。

立即下载
iCopy解码软件v1.0.1.7.exe

解ic,id,hid卡密码破解ic,id,hid卡密码破解ic,id,hid破解ic,id,hid卡破解ic,id,hid卡密码密码卡密码破解ic,id,hid卡...

立即下载
分布式服务框架原理与实践(高清完整版)

第1章应用架构演进1 1.1传统垂直应用架构2 1.1.1垂直应用架构介绍2 1.1.2垂直应用架构面临的挑战4 1.2RPC架构6 1.2.1RPC框架原理6 1.2.2最简单的RPC框架实现8 1.2.3业界主流RPC框架14 1.2.4RPC框架面临的挑战17 1.3SOA服务化架构18 1.3.1面向服务设计的原则18 1.3.2服务治理19 1.4微服务架构21 1.4.1什么是微服务21 1.4.2微服务架构对比SOA22 1.5总结23 第2章分布式服务框架入门25 2.1分布式服务框架诞生背景26 2.1.1应用从集中式走向分布式.26?

立即下载
Camtasia 9安装及破解方法绝对有效

附件中注册方法亲测有效,加以整理与大家共享。 由于附件大于60m传不上去,另附Camtasia 9百度云下载地址。免费自取 链接:http://pan.baidu.com/s/1kVABnhH 密码:xees

立即下载
电磁场与电磁波第四版谢处方 PDF

电磁场与电磁波第四版谢处方 (清晰版),做天线设计的可以作为参考。

立即下载
压缩包爆破解密工具(7z、rar、zip)

压缩包内包含三个工具,分别可以用来爆破解密7z压缩包、rar压缩包和zip压缩包。

立即下载
source insight 4.0.0087 注册机序列号Patched(2017/10/17)

最新的sourceinsight4.0.0087和谐license及和谐文件。真正的4087版本,使用附件中的license文件,替换sourceinsight4.exe

立即下载
Java项目经验汇总(简历项目素材)

Java项目经验汇总(简历项目素材)

立即下载
支付宝转账demo

支付宝单笔转账,实现提现功能(内有demo实例,望大家多多提意见)

立即下载
算法第四版 高清完整中文版PDF

《算法 第4版 》是Sedgewick之巨著 与高德纳TAOCP一脉相承 是算法领域经典的参考书 涵盖所有程序员必须掌握的50种算法 全面介绍了关于算法和数据结构的必备知识 并特别针对排序 搜索 图处理和字符串处理进行了论述 第4版具体给出了每位程序员应知应会的50个算法 提供了实际代码 而且这些Java代码实现采用了模块化的编程风格 读者可以方便地加以改造

立即下载
计算机中丢失api-ms-win-crt-runtime-l1-1-0.dll的修复方案

计算机中丢失api-ms-win-crt-runtime-l1-1-0.dll的修复方案

立即下载
最新的微信小程序源码

最新的微信小程序源码70多个很多行业都有加后台

立即下载
数据库系统概念第六版答案(最全)

史上最全的数据库系统概念第六版(机械工业出版社)课本答案

立即下载
cadence入门教程.pdf

本文介绍cadence 软件的入门学习,原理图的创建、仿真,画版图和后仿真等一全套过程,本教程适合与初学着,讲到尽量的详细和简单,按照给出的步骤可以完全的从头到尾走一遍,本教程一最简单的反相器为例。

立即下载
rainmeter雨滴皮肤合集(30个)

Rainmeter允许您在桌面上显示可自定义的皮肤,从硬件使用仪表到功能齐全的音频可视化器。 你只受你的想象力和创造力的限制。rainmeter皮肤合集30个

立即下载
方方格子注册机

方方格子注册机,适用于方方格子所有的系列,全部系列均可以完美注册

立即下载
DroidCamX 专业版破解版6.7最新版

DroidCamX 专业版破解版6.7最新版,已经包含PC端和Android端

立即下载
黑客代码大全(远程控制,计算机病毒)

打开远程telnet服务代码,w2k_ipmon代码,sqlworm蠕虫,一个远程控制程序等20个黑客程序

立即下载