- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so i tested my flash memory using the HAL function (using word mode...)
ret_code = alt_get_flash_info(fd, ®ions, &number_of_regions); the result was printed as: printf("\nFlash Region Structure:\r\n"); printf("Number of Regions: %d\r\n", number_of_regions); printf("Offset: %d\r\n", regions->offset); printf("Region Size: %d\r\n", regions->region_size); printf("Number of Blocks: %d\r\n", regions->number_of_blocks); printf("Block Size: %d\r\n\r\n", regions->block_size); THE OUTPUT IS: Flash Region Structure: Number of Regions: 2 Offset: 0 Region Size: 65536 Number of Blocks: 8 Block Size: 8192 care some one tell me how this information translates to my flash memory having a 8MB memory??? also what is region size and why my regions is only 2?Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8192 * 8 * 65536 * 2 = 8MB (+ spare bytes for ECC).
Why don't you just tell us which flash device you are using? Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello i am using the de2-70 flash memory...s29gl064n90tf104
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello but 8192 * 8 * 65536 * 2 = 8589934592 <-- byte right?
or am i seriously misunderstood something here....- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the datasheet:
http://www.spansion.com/support/datasheets/s29gl-n_01_12_e.pdf Sorry. I wasn't paying close enough attention. Yeah I'm confused. The HAL driver should be reporting 128 regions of 65536 bytes each. Jake- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code output only reports the size of the first region, which seems to be 64kbytes, split in 8 blocks of 8kbytes each.
Could you display the size of the second region? From the datasheet, it seems that this flash memory has a "boot sector" option, and I'm guessing that the first region reported is your boot sector.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello how could i show the size of the second region??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
regions is in fact a table, so this code:printf("Offset: %d\r\n", regions.offset);
printf("Region Size: %d\r\n", regions.region_size);
printf("Number of Blocks: %d\r\n", regions.number_of_blocks);
printf("Block Size: %d\r\n\r\n", regions.block_size);
with i between 0 and number_of_regions-1, will give you the information about region i.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oh thanks will try it...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found this:
Flash Region Structure: Number of Regions: 2 Offset: 65536 Region Size: 8323072 Number of Blocks: 127 Block Size: 65536 ok is there any way i could combine these 2 regions??? also when writing, should i offset my first data entry point by that (65536) much ?? (skipping the first region....) or i could write from offset 0...? my data length is 65035...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The second region starts right after the first one, so I would say that you can use all the flash as one big region and start at offset 0.
I don't know the specifics about the first "boot sector" region, it could just be a special erasing procedure. There could be more info in the flash datasheet.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've seen one smaller erase region (boot region) of 32K sectors, followed by a second erase region of 128K sectors on several CFI-compliant flashes.
Cheers, - slacker
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page