Search code examples
system-verilogquartusintel-fpga

How do I format an SD Card for use with the Altera DE2-115 demonstration music player project?


So I am trying to run the Altera provided Quartus project for playing .wav files from an SD card. The directions say to run a bash file to load all the code onto the board and run the nios software (rather than using Quartus and Eclipse). I formatted the SD Card how the directions have said (FAT16 or FAT32, neither work) and it's a 2GB plain SD card (not SDHC or XC) so there shouldn't be any problems there since I have elsewhere online that you have to use a plain SD card and have also tried and failed with an SDHC card myself.

As I mentioned, I've tried FAT16 and FAT32 with no luck. When I format the SD as FAT32 I keep getting an error in the windows command line "[FAT]the partition type(12) is not supported." When I format as FAT16 I get the error "[FAT]the partition type(14) is not supported."

How should I format this SD card to make it work with this Quartus code?

Link to the directions (on page 95 and 96 of the .pdf): https://www.intel.com/content/dam/altera-www/global/en_US/portal/dsn/42/doc-us-dsnbk-42-1404062209-de2-115-user-manual.pdf

Also, here's what the windows command line is telling me when I run the bash.

Info: *******************************************************************
Info: Running Quartus Prime Programmer
    Info: Version 18.0.0 Build 614 04/24/2018 SJ Lite Edition
    Info: Copyright (C) 2018  Intel Corporation. All rights reserved.
    Info: Your use of Intel Corporation's design tools, logic functions
    Info: and other software and tools, and its AMPP partner logic
    Info: functions, and any output files from any of the foregoing
    Info: (including device programming or simulation files), and any
    Info: associated documentation or information are expressly subject
    Info: to the terms and conditions of the Intel Program License
    Info: Subscription Agreement, the Intel Quartus Prime License Agreement,
    Info: the Intel FPGA IP License Agreement, or other applicable license
    Info: agreement, including, without limitation, that your use is for
    Info: the sole purpose of programming logic devices manufactured by
    Info: Intel and sold by Intel or its authorized distributors.  Please
    Info: refer to the applicable agreement for further details.
    Info: Processing started: Wed Dec 04 21:30:57 2019
Info: Command: quartus_pgm -m jtag -c 1 -o p;DE2_115_SD_Card_Audio_Player.sof
Info (213045): Using programming cable "USB-Blaster [USB-0]"
Info (213011): Using programming file DE2_115_SD_Card_Audio_Player.sof with checksum 0x00B3A0D0 for device EP4CE115F29@1
Info (209060): Started Programmer operation at Wed Dec 04 21:30:58 2019
Info (209016): Configuring device index 1
Info (209017): Device 1 contains JTAG ID code 0x020F70DD
Info (209007): Configuration succeeded -- 1 device(s) configured
Info (209011): Successfully performed operation(s)
Info (209061): Ended Programmer operation at Wed Dec 04 21:31:05 2019
Info: Quartus Prime Programmer was successful. 0 errors, 0 warnings
    Info: Peak virtual memory: 4435 megabytes
    Info: Processing ended: Wed Dec 04 21:31:05 2019
    Info: Elapsed time: 00:00:08
    Info: Total CPU time (on all processors): 00:00:01
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 119KB in 1.8s (66.1KB/s)
Verified OK
Starting processor at address 0x030401B4
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)

===== Welcome to SD-CARD Demo Program =====
Supported File System: FAT16,FAT32, English Short File Name,English Long File Name
Played Wave Files: Wave files on root directory.
Supported Media File: Uncompressed WAV File, Sample-Rate 96K/48K/44.1K/32K/8K, Stereo, 16-bits Sample.
KEY4: Next Song
SW0 ON: Enable Repeat Mode
KEY3: Volume Up
KEY2: Volume Down
Current Voluem:120(47-127)

[AUDIO] AUDIO_Init...
[AUDIO] set audio reg[15] = 0000h
[AUDIO] set audio reg[09] = 0000h
[AUDIO] set audio reg[00] = 0017h
[AUDIO] set audio reg[01] = 0017h
[AUDIO] set audio reg[02] = 005Bh
[AUDIO] set audio reg[03] = 005Bh
[AUDIO] set audio reg[04] = 003Dh
[AUDIO] set audio reg[05] = 0000h
[AUDIO] set audio reg[06] = 0000h
[AUDIO] set audio reg[07] = 0042h
[AUDIO] set audio reg[08] = 0002h
[AUDIO] set audio reg[09] = 0001h
[AUDIO] AUDIO_Init success
[AUDIO] set audio reg[02] = 0078h
[AUDIO] set audio reg[03] = 0078h
[AUDIO] set Line-Out vol(120,120) success
Please insert SD card.
Find SD card
[FAT]the partition type(14) is not supported.
[FAT]Fat_Mount fail
SD card mount fail.

Link to the provided Altera code I'm trying to run: http://download.terasic.com/downloads/cd-rom/de2-115/CD-ROM_NXP_USB/

(once you download the .zip from the above link the path is: DE2-115_V.1.0.6_SystemCD.zip\DE2-115_V.1.0.6_SystemCD\DE2_115_demonstrations\DE2_115_SD_Card_Audio_Player\demo_batch\DE2_115_SD_Card_Audio_Player.bat)


Solution

  • Ok, so for anyone out there that finds this post in the future, I found a solution. My problem was fixed by formatting the SDSC card with the SD card formatting tool provided by SD, FORMATTING WITH WINDOWS DOES NOT WORK. For some reason, this tool was successfully able to format the card in FAT16 in a way that the DE2-115 can recognize.

    Link to the tool (Windows): https://www.sdcard.org/downloads/formatter/eula_windows/index.html

    Link to the tool (Mac): https://www.sdcard.org/downloads/formatter/eula_mac/index.html

    If these links ever quit working for some reason just google "SD Card format tool" and you want to make sure you're downloading the one from the SD Association.