DE3 User Manual
70
can open a specified file and read the contents of the file.
The main block implements main control of this demonstration. When the program is executed, it
detects whether a SD card is inserted. If a SD card is found, it will check whether the SD card is
formatted as FAT file system. If a FAT file system is found, it searches all files in the root directory
of the FAT file system and displays their names in the nios2-terminal. If a text file named “test.txt”
is found, it will dump the file contents. If it successfully recognizes the FAT file system, it will turn
on the green LED. On the other hand, it will turn on the red LED if it fails to parse the FAT file
system or if there is no SD card found in the SD Card socket of the DE3 board. If users press
BUTTON3 of the DE3 board, the program will perform above process again.
Main
FAT File System
SD-CARD
NIOS II PIO
Figure 5.12. Software Stack of the SD Card Demonstration
Demonstration Source Code
Project directory: DE3_SDCARD
Bit stream used: DE3_SDCARD.sof
NIOS II Workspace: DE3_SDCARD\Software
Demonstration Batch File
Demo Batch File Folder: DE3_SDCARD \Demo_Batch
The demo batch file includes following files:
Batch File: de3_sdcard.bat, de3_sdcard_bashrc
FPAG Configure File: DE3_SDCARD.sof
NIOS II Program: DEMO_SDCARD.elf
Summary of Contents for Altera DE3
Page 1: ...Altera DE3 Board ...
Page 67: ...DE3 User Manual 64 Figure 5 5 Plug USB Devices into DE3 Figure 5 6 Display Device Information ...
Page 75: ...DE3 User Manual 72 Figure 5 14 Display SD Card Information for the SD Card Demonstration ...
Page 79: ...DE3 User Manual 76 Figure 5 19 Parameter Settings in DDR2 Controller ...
Page 114: ...DE3 User Manual 111 Figure D 5 The reported message of the invalid I O pins ...