Datenblatt-Suchmaschine für elektronische Bauteile |
|
EE-196 Datenblatt(PDF) 6 Page - Analog Devices |
|
EE-196 Datenblatt(HTML) 6 Page - Analog Devices |
6 / 15 page a (Cylinder Low and Cylinder High) using Blackfin assembly language: /* Set up Data */ R0.L = 0xABCD; //Cylinder Low = 0xCD //Cylinder High = 0xAB /* Set up Address */ P0.H = 0x2400; //P0 points to the CF’s P0.L = 0x0804; //Mem. Mapped Cylinder //Registers /* Set up CF Cylinder Registers */ W[P0] = R0.L; //Write to Cylinder High //and Cylinder Low //registers of the CF. Code Listing 1. CF Register Access The code above will access the two Cylinder Registers (at offset = A[3:0] = 0x4) within the Common Memory (/REG = A[11] = 1) of the CF which is connected to ASYNC Bank 1 (AMS[1] = /CE2 = /CE1 = 0) of the ADSP-BF535. Data regions on the CompactFlash card are accessed via Clusters and each Cluster maps to a Sector Number. Each sector number is considered a 28-bit Logical Block Address, LBA[27:0]. To access sector N on the CompactFlash, the following six registers need to be set: • Sector Count - number of sectors to access. If set to 0, a count of 256 sectors is specified. • Sector No – LBA[7:0] • Cylinder Low – LBA[15:8] • Cylinder High – LBA[23:16] • Select Card / Head – 0xE0 | LBA[27:24] • Command – 0x20 (read sector(s) command) Once all of above registers are set, the on-card CF controller retrieves the specified sector(s) from the data region and places it into an internal buffer. We can access this internal buffer via repeated reads from the Dup. Even RD Data and the Dup. Odd RD Data registers. The following code shows how to read the first sector within the data region of the CF using Blackfin assembly language: /* Set up Pointer to Mem. Mapped Address */ P0.H = 0x2400; //P0 points to the CF P0.L = 0x0800; //Mem. Mapped Registers /* Set up Sector Count & Sector Number */ R0.L = 0x6701; //Sector Count = 0x01 //Sector Number = //LBA[7:0] = 0x67 W[P0+2] = R0.L; /* Set up CF Cylinder Registers */ R0.L = 0x2345; //Cylinder Low = //LBA[15:8] = 0x45 //Cylinder High = //LBA[23:16] = 0x23 W[P0+4] = R0.L; /* Set up Select Card/Head and Command */ R0.L = 0x20E1; //Select Card/Head = //0xE1 //Command = 0x20 W[P0+6] = R0.L; /* We have written to the six CF registers. Now we’ll read the specified sector */ I0.H = Sector_Buffer; I0.L = Sector_Buffer; P1.H = 0x0000; P1.L = 0x0100; //Loop Count = 256 //Each loop iteration, //we read in 2 bytes //for a total of //512 bytes/sector LSETUP(Read_BEGIN, Read_END) LC1 = P1; //Read Even Byte and Odd Byte Read_BEGIN: R0.L = W[P0+8]; //Store 16-bit word into internal memory Read_END: W[I0++] = R0.L; Code Listing 2. CF Sector Read File Detection & Retrieval Now that we have an understanding of the CompactFlash file system and how to access different sectors on the disk, we are ready to read full files off the CompactFlash card. For this demo, we need to determine if there are any MP3 files on the CompactFlash. Using the configuration information provided by the Boot Sector and drive information, we search through ADSP-BF535 Blackfin® EZ-KIT Lite™ CompactFlash® Interface (EE-196) Page 6 of 15 |
Ähnliche Teilenummer - EE-196 |
|
Ähnliche Beschreibung - EE-196 |
|
|
Link URL |
Privatsphäre und Datenschutz |
ALLDATASHEETDE.COM |
War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Linktausch | Hersteller All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |