Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12748 Discussions

How to use Compact Flash Card for NiosII

Altera_Forum
Honored Contributor II
1,323 Views

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!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
572 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
572 Views

Hi,hippo. 

 

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

 

I will use eCos and Micrium uC/FS 

file systems. 

 

Thanks,hippo.
0 Kudos
Altera_Forum
Honored Contributor II
572 Views

You should also check for update in CF IP in, 

Nios Discussion Board > Downloads > Tested IP 

 

Good luck.
0 Kudos
Altera_Forum
Honored Contributor II
572 Views

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.
0 Kudos
Reply