Forum Discussion

Balerion's avatar
Balerion
Icon for Occasional Contributor rankOccasional Contributor
2 months ago
Solved

Nios-V alt_epcq_controller_write() Problem

Hi, I have a flash on my custom board which is MT25QU01G. The flash is connected to Nios-V/g with Epcq Controller. I am trying to erase, write, read sectors from flash. Before write and erase I unlo...
  • ShoH_Altera's avatar
    ShoH_Altera
    1 month ago

    Hi Balerion,

    Regading to avl_mem slave:

    If you also place avl_mem slave in Peripheral Region, you can use the current altera_epcq_controller.c file as is.

    However, you may want to place avl_mem slave in cacheable (non-Peripheral) region to take advantage of the cache for read accesses.  In that case, cache maintenance needed for flash memory write operation in Nios V/g system.  Here is a code example (= not fully validated) to achieve this attached (please replace the file extension from ".txt" to ".c").   At the end of the alt_epcq_controller_write_block() function, cache flush function call and error checking are added.

    Thanks,
    ShoH