Forum Discussion

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

memcpy ( )

Hello

The memcpy can been used to transfer the data in flash to sdram?

I know that the function can transfer the data in flash to sram.

Thank you

4 Replies

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

    Yes, memcpy can copy data from flash to sdram but not the other way round.

    But perhaps this wasn't what you meant to ask, if so then please rephrase your question.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you!

    Why the memcpy functin can been used to transfer data through synchronize or asynchronism memory.

    The synchronize memory can make the nios reacgh better performance?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    To wombat:

    What do you mean by saying "memcpy can copy data from flash to SDRAM but not the other way round.

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

    As you know, flash chips need special programming sequences to change the value of data within them.

    memcpy doesn't use these sequences so it can't alter the value of data in flash.

    If you want to alter the value of data in flash then you should use the functions in altera_avalon_cfi_flash.h to do it.