Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Flash Device Access

Hej

I am using my custom board where I have an external flash device attached..I want to read and write the flash device..I read the manual Nios II Software Developer's Handbook...and acording to the instructions given there..i tried to use HAL functions to open the flash drive..but i could not open the flash drive..I found tht when i tried to debug my code..and the pointer gets the value NULL even i am giving the name of flash device...correctly as I check that out in system.h file as well..i wrote like this..

alt_flash_fd* fd;

fd= alt_flash_open_dev("/dev/cfi_flash");

but after the execution of statement..fd gets 0.i.e; NULL...so the flash device doesnt opens...Can any1 please help me in this regard...

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Are you sure your pin connections or signals to CFI flash are correct? I have encountered such problem and later I found that the pin connection was not going right! You may also want to check the setup, hold and wait time, if they are all correct!

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i have checked tht one out as well...the pin connections are correct...can any1 give me some other idea to check...

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I have a problem with the CFI Flash IP when I add MMU to my Nios II processor.

    Without MMU, I'm able to the CFI table of my NOR Flash (Nios EP2C35 kit) with nios2-programmer --debug.

    However when I add MMU, "No CFI table found".

    What kind of problem do I have? It can't be an hardware problem, I can access to my flash with a NiosII configuration processor without MMU.

    Someone can help me?