- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there is no AM29lv160 in the drop-down menu that maps the current flash component in SOPC.So i specify the size of the flash device:Address Width:20
Data Width:16 But when I run flash_tests.c, i always get "0"after the line"fd = alt_flash_open_dev(EXT_FLASH_NAME);" I can't use the flash. I don't know what's the problem with me.Is there anyone that can help me?Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by cameral@Mar 13 2006, 09:37 PM there is no am29lv160 in the drop-down menu that maps the current flash component in sopc.so i specify the size of the flash device:address width:20
data width:16
but when i run flash_tests.c, i always get "0"after the line"fd = alt_flash_open_dev(ext_flash_name);" i can't use the flash.
i don't know what's the problem with me.is there anyone that can help me?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13400)
--- quote end ---
--- Quote End --- We use this chip in our design with a Cyclone EP1C6. I put in 20 for address and 16 for data and it works ok. There are a couple of things to keep in mind: - After hooking up addr, data and the three control lines make sure the other lines (reset, byte, etc.) of the chip are set to reasonable values. - If you are running your program out of flash you won't be able to open the flash device driver with alt_flash_open_dev. You can store your program in flash and then run out of RAM. If you want to run out of flash AND use the flash for data you'll have to move the programming routines into RAM, otherwise the program will crash when the flash chip gets switched to programming mode. You'll also have to bypass the check whether the program is in flash, which is in altera_avalon_cfi_flash.h (ALT_CFI_DEV_IN_USE macro). The setting where your program is running from is the "Program memory (.text)" setting in the system library properties. - If you have a chip ending in T (top booting) you'll have to rearrange the flash regions manually. The function alt_read_cfi_table doesn't figure out that the 160T is top booting so the regions are wrong. For the 160B everything is fine. I added a global variable called "forceTopBoot" which I set to 1 but at some point I'll rewrite the alt_read_cfi_table to correctly probe the chip for the boot sectors. The easiest way to figure out what's going on is stepping through the initialization with the debugger. Put a breakpoint on the call to ALTERA_AVALON_CFI_FLASH_INIT in alt_sys_init.c and see what happens. Hope that helps, Andrew
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page