- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to use alt_flash_open_dev() and alt_write_flash() and alt_read_flash().
alt_flash_open_dev() is successful but alt_write_flash returns an ERROR CODE = ffffff8c. Anyone knows what this refers to? Is there a list of error codes for these functions - I don't see in any documentation. Or alternatively, what could be going wrong. alt_read_flash() returns without error - have not analyzed the data thoroughly but looks like some CFI table data like the NIOS programmer spat out. I have used the NIOS flash programmer and it successfully programs and checks an arbitrary binary file I have - no warnings or errors in the console(all looks good). Call looks like this... alt_write_flash(fd_ptr, 0, ptr_to_src_data, 4); Vista, Quartus 9.1, Arria II GX. Thoughts? Thanks, CosLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lotsa views but no replies. Hmmm.
I have run the memtest project and it also fails at the alt_flash_write with the same error code but again it _seems_ that the NIOS programmer works but I do not know how it works so I cannot debug this way. I presume the programmer would write/read/verify so I expect unless this outright fails that somehow the writes were successful. Cos- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
alt_flash_write() is quite different from the Nios II Flash Programmer. The fact that the programmer works means that your flash _can_ function with a Nios II processor, but it doesn't necessarily mean that the HAL driver/API will work perfectly...or at all.
It could be that your flash requires more "work" to work. Not sure about the error code either, but it might not be something that's defined in the driver itself. It might be more about what the flash device, itself, is returning. Welcome to the wonderful world of the CFI standard :-) Cheers and Good Luck! -- slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Slack.
Will take it up with Altera support. I would expect the NIOS programmer code to not reinvent the HAL driver/API so I would expect it to use _some_ form of the driver/API that is either a version ahead(maybe I need to upgrade my tools from 9.1) or some cheeky little bug fix or workaround that did not make it into the main code stream. So, just got to find out what is different but I don't have the code so... We'll see. Cos- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Altera support no help.
Faster to just write my own driver - no bloatware either. Done and tested. Ciao. Cos.
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