• The vehicle carries in MP3 the Flash filing system’s design and the application

       Abstract: Based on the Flash memory’s characteristic, the detailed introduction suits the animal-drawn cart carries MP3 the Flash filing system (including Flash store management system and FAT filing system) the concrete design. Realizes using the Flash filing system to the Flash memory’s good operation management function.

        Key word: The vehicle carries MP3 Flash the store management system FAT filing system

    Introduction

    At present what the vehicle carries the player basically to use is the CD player, the MD player as well as the magnetic tape player and so on. Because this kind of player interior has some mechanical transmission part, adds the upper garment again in automobile this specific environment, because frequently the mechanical drive or bald, the magnetic head is vibrated occurs jumps the sound or twists the belt phenomenon, thus influence acoustic fidelity.

    Because the Flash memory has the storage capacity to be big, the power failure data does not lose, He Zhongxiao as well as may scratch many times writes and so on many merits, is substituting for other semiconductors to save the component gradually, but widely applies in mobile electron products and so on mobile phone, PDA as well as digital camera. It as the stored datum and the application procedure’s storage medium, may the mass data convenient, quickly the migration and the exchange.

    Designed a vehicle based on above two to carry the MP3 system. This system uses Flash to take the external memory, and is composed of the entire solid state device, when broadcast will not appear jumps the sound or twists the belt phenomenon, the acoustic fidelity is also very good. Because the Flash memory will possibly appear in the application process badly damages the unit, will affect the vehicle to carry the MP3 player the performance, therefore this article in view of the Flash memory own physical property, has designed a filing system, will carry on to the Flash memory’s data content based on the filename or the document number store management as well as applies transparently badly damages the management. This system optimization storing velocity and the storage space, enhanced the vehicle to carry the MP3 broadcast system’s reliability.

    1 Flash memory characteristic

    The Flash interior divides into many memory cell block (block), each memory cell block (page) is composed of many pages. The memory cell block is the smallest unit which may clean, the page is the write data smallest unit.

    The Flash memory read data and the common memory are similar, may realize the stochastic read, the read-out speed is also very quick. But the Flash memory writes the operation and the common memory differs from, Flash writes the operation to (read in 0xff first according to the memory block cleaning to memory cell block which must clean), then presses the page order to read. Because the Flash memory cleaning time-consuming is long, therefore the Flash memory reads in the time mainly lies in the Flash memory internal cleaning operation and so on.

    Flash memory first certainly is the effective block, but other will possibly be the bad block or turns the bad block before the use in the use process (invalid block). The Flash memory to the internal bad block’s determination is, according to its each unit memory block’s in 3rd area 6th Cloumn content whether is 0xff decides. Although the Flash memory content will have the bad block, but because each internal structure will be mutually independent, so long as will therefore distinguish to its condition, the bad block will not affect the system to the effective block operation.

    2 Flash filing system design

    This article saves in Flash in the foundation designed a Flash store management system to come to Flash to carry on the physical management. But established a FAT filing system in the Flash store management system foundation to come to the file operation to carry on the management, has been composed the Flash filing system together by the Flash store management system and the FAT filing system. This filing system supports the filename management, automatically badly to damage the function which completely the management and so on general file system has; At the same time, carried the MP3 player system special application environment in view of the vehicle, the design improved this filing system’s reliability, even if will not affect the acoustic fidelity under the bad condition. Flash filing system’s concrete structure as shown in Figure 1.

    2.1 Flash store management system

    The Flash memory’s operation is take the block as the unit, but the FAT filing system is the establishment in take the sector (sector) as in unit’s disk operation foundation (usually is 512 bytes/sectors). Therefore, this article has designed a special Flash store management system, solves take the block as unit’s Flash physical property and take the sector as between unit’s filing system connection contradiction, causes Flash the physical address and between the FAT operation logical address can correspond. At the same time, as a result of Flash other characteristics, the Flash store management system also realized each between to scratch writes the number of times balanced and work and so on bad block management.

    (1) physical address to logical address mapping

    For establishes good mapping relations in the Flash physical address and between the FAT operation’s logical address, carried on to the Flash storage space in logic has redefined. Unifies the Flash characteristic, divides into certain physical sector each memory cell block interior, each physical sector is composed of 512 byte 16 byte =528 bytes. And Main Area 512 bytes for valid data space, but the Spare Area 16 bytes use in storing other information.

    Then may determine between the Flash physics sector and the specific address corresponding relationships by the above definition:

    Specific address =Flash base address physics sector number ×528

    After having established between the physical address and the logical address mapping relations, but may carry the vehicle the system to transform well to the audio frequency document operation system direct Flash the programming or the cleaning operation. For example, must carry on the ReadFile() operation in this system, then may act according to its corresponding relationships, through carries out Flash in the store management system’s sectorread() operation to realize.

    (2) reliability design

    Because this vehicle carries the system to use the automobile power supply, when therefore the automobile is in not too balanced environment, because possibly will jolt broadcasts system’s unusual power failure surely, will therefore enhance the vehicle to carry the MP3 broadcast system’s reliability to be important. This article through defines the Spare Area 16 bytes as the logic sector number, the sector current condition, the bad block information and so on enhances the broadcast system’s reliability. And the Spare Area concrete definition is as follows:

    Logic sector number Sector current condition Bad block information Retention byte
    The 1~3rd byte The 4~5th byte The 6th byte The 7~16th byte

    By the above definition may see that the Spare Area 4~5th byte uses in saving the sector current condition. Like this in Flash writes in the operating process, if the sudden power failure, then may act according to this condition to carry on the power failure data recovery. In this system establishes the sector current condition to have 3 kinds: The sector is spatial (0xfff), the sector data useless (0×0000), the sector data effective (0×00ff). After such definition, the system then may when Flash wrote the abnormal operation terminated can condition then carry on the prompt preservation, so that after under subsystem opening, could judge the question which on the subsystem existed and make corresponding processing.

    (3) bad block management

    Because the Flash interior will have the bad block, therefore the Flash store management system needs to carry on the bad block management to Flash. This article to a bad block management minute following two kind of situation:

    ①Initial bad block processing. The Flash memory will possibly have the bad block before the use, moreover these bad blocks will be the random distribution. Therefore, Flash document management system before system execution read-write operation establishes a bad block table first, then carries on the initialization scanning to the Flash memory to discover the bad block, and bad block mark for not available, joins to the bad block table.

    ②In operating process bad block processing. Has the mistake when the cleaning or the programming process, the Flash document management system this other page’s data copy to a new spatial block, then this mark is the bad block again, joins to the bad block table. In this treating processes, because can cause the Flash memory cell block to the Flash cleaning or the programming operation the content change, therefore Flash document management system, once discovered after the Flash memory’s memory cell block becomes the bad block, then no longer carries on the cleaning or the programming operation to this block, in order to avoid eliminates the bad block mark bit data, but this mark is the bad block, and joins it in the bad block table.

    The Flash document management system after carrying on the above bad block management, the bad block unit to the user application is completely transparent. This has facilitated user’s use greatly, also achieved the vehicle to carry the MP3 broadcast system’s goal.

    (4) scratches balanced writes the number of times

    Because Flash has certain service life, generally may clean the number of times is 10 ~ 1,000,000 times, therefore along with use number of times’s increase, will have some units will become gradually unstable or the defeat. Therefore, must avoid as far as possible frequently to with together the address operation, in order to avoid causes the partial unit to damage ahead of time; At the same time, because cleaning operation time-consuming many, should also reduce the cleaning operation, should achieve as far as possible scratches writes the number of times to be balanced. Therefore, this article has designed the Flash renewal algorithm and the attrition rate examination algorithm.

    The Flash renewal algorithm is the data which must renew Flash in reads in directly in a spatial block, reduces, because after Flash cleans first, reads in the characteristic brings to the block frequent cleaning; At the same time, also raised the Flash use efficiency, sped up the operating speed. The attrition rate examination algorithm is in carries on before Flash reads in must carry on the bad block scanning first to Flash, guaranteed that will not read in the data the bad block, thus this data loss. Such design is also to enhance the vehicle to carry the MP3 broadcast system’s reliability.

    2.2 FAT designs

    In Flash document management system’s foundation, but also established the FAT filing system to come to the file operation to carry on the management. Divides into the following four parts specifically the FAT filing system:

    (1) FAT guidance area

    This guidance area depositing code needs information and most important filing system information. These information have included the Flash memory’s type, the capacity as well as divide how many bunches; Each bunches contain how many sectors, the FAT table number, the retention sector number, the root directory first bunch of number and root directory entrance number, edition information and so on. The boot-sector is when formatted Flash produces.

    (2) FAT file allocation table

    The file allocation table file documents take the storage space race chain as well as Flash memory’s occupancy with the idle space’s situation, is important. In order to prevent the file allocation table damage to cause the document loss, in this system has preserved two same file allocation table FAT1 and FAT2, improves its security. In filing system’s operation, the procedure carries on to the FAT table structure’s two backups revises in order, guarantees on the Flash memory by this always to have the one whole set complete file allocation table.

    The system is as follows visit to the FAT table’s principle: Visits when the document from wanted in the table of contents to find this document the first table of contents item, read out the first bunch of number. Then, in the table of contents found this document the table of contents item, read out the first bunch of number. Then found a bunch of chain which in FAT started from this first bunch of number, on a bunch of chain’s bunch of number namely for the document the sector number chain which took in the logic sector, like this then might carry on the data read-write.

    (3) FAT root directory area

    The FAT root directory area is fixed measure following close on after the FAT table region. This article after the FAT area follows close on 32 sectors take the root directory area, may preserve 512 table of contents items. Each table of contents item of record this document’s filename, the file attribute, the document size, the document founded the date and the time as well as the document the first bunch of number which occupies in the data area, namely this document in FAT table data and so on entrance.

    (4) FAT data area

    Data area existence document data content. The filing system is carries on the division and the management to the data area’s storage space according to the bunch. In this system, defines 1Cluster=32sector, a document always takes certain entire bunches, the last bunch of surplus space which the document uses no longer uses.

    May see by Figure 1, this FAT filing system provides the document the formatting, the document opens, the deletion, the closure, the document read-write, the search and so on basic function. Through the Flash filing system carries on the management after the document operation, this Che Zai broadcasts the system then to be possible to realize the selected song, the increase deletion song, the downloading song, the volume control and so on a series of functions.

    3 applications

    Through such design, the Flash memory property had the big improvement, moreover system’s reliability is also very good. Even if in Flash writes under the worst working condition which the abnormal operation termination frequency sends, also the obliterated data, will not damage the very important file allocation table structure to create system’s collapse; Therefore, this article designs the Flash filing system can suit well in the vehicle carries the MP3 broadcast system’s application.

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3