Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by slacker@Jan 8 2006, 01:28 AM jimbo,
you've got a couple of debug options, though what you're trying to do should certainly work:
1. step through the initialization code for the cfi flash (ext_flash) in your system. it's called from within alt_sys_init.c, which, in turn, is a part of your system library project.
2. try to program your flash, using the command line tool (not through the gui). you should be able to get a lot more information here.
best regards, and best of luck.
- slacker
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12038)
--- quote end ---
--- Quote End --- Hi slacker, thanks for your reply. 1. I have not tried stepping thru the initialization code for the CFI Flash . I will. What types of things should I be looking for? 2. I did try programing the Flash using the command line tool. In SOPC I have ext_flash at Base: 0x02000000 Using the Flash Programmer in command line mode I tried: > nios2-flash-programmer --debug --base 0x2000000 Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Resetting and pausing target processor: OK No CFI table found at address 0x02000000 Original contents (after writing 0xF0 and 0xFF to address 0x02000000): 0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ Contents after writing 0x98 to address 0x020000AA: Same after writing 0x0098 to address 0x02000154: Same after writing 0x00000098 to address 0x020002A8: Same after writing 0x98 to address 0x02000055: Same after writing 0x0098 to address 0x020000AA: Same after writing 0x00000098 to address 0x02000154: Same after writing 0x98 to address 0x02000154: Same after writing 0x0098 to address 0x020002A8: Same after writing 0x00000098 to address 0x02000550: 0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ Leaving target processor paused So looks like a Hardware connection problem? I have double checked the FPGA pinout and Flash connections and I think all is OK... but this is a new card/design. In SOPC Builder, for the CFI Flash Memory Device I selected: AMD29LV128M (WORD Mode) Add Width: 23 bits, Data Width: 16 bits Back to my first post about the call to alt_find_dev() and alt_flash_dev_list. For alt_find_dev to work (return the device name and not 0x0) do you know if the Flash device is accessed? From what I have looked at it looks like the alt_find_dev() just searches thru the alt_flash_dev_list and doesn't access (wrt/rd) the Flash. From what I stepped thru in the memtest.c I think the problem is that alt_find_dev() returns 0x0. Do you know how I can look at whats in alt_flash_dev_list ? (to see if /dev/ext_flash is in it) Thanks for the help. Jim