Forum Discussion

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

How to use Compact Flash Card for NiosII

Hi,All.

I can add the compact flash card into sopc, but I do not know how to read from/write to compact flash card by softwere program.

Used:NiosII cyclone borad.

Could anybody tell me?

Thanks!

4 Replies

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

    The CF class said,

    Software support includes: register definitions, I/O access

    macros, and initialization routines with the Nios II HAL.

    For complete access to the IDE interface additional software

    is required; the Nios II eCOS distribution and Micrium uC/FS

    file systems each include such support.

    You can also use uclinux.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,hippo.

    I'm working with μC/OS-II,now.

    I will use eCos and Micrium uC/FS

    file systems.

    Thanks,hippo.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You should also check for update in CF IP in,

    Nios Discussion Board > Downloads > Tested IP

    Good luck.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You should try the hardware using the example code that comes with it. Once that is working you can implement the FAT file system in the HAL using a free FAT file system layer for microcontrollers such as FATFS (ELM Chan) or DOSFS. Both are free and available by looking around google. FATFS is faster...

    You should also search around the niosforum a bit too... this question has been asked many many times.