Forum Discussion

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

SD Card read fails on NIOS2 DE2 Board

Hi guys,

I am a university student trying to get the demonstration project working. The project that I am trying to get it to work is, DE2_SD_Card_Audio. I am able to synthesize and transfer the SOF file to the FPGA. However, when I run the NIOS 2 project on the FPGA, I get the following error,

[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]read section 0 error.

[fat]fat_mount fail

sd card mount fail.

How do I fix this ?

16 Replies

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

    There could be a speed problem. I had two SD cards, one is rated class 4, the other one is unrated. The unrated one could not work. They both are FAT16. I have tested both of them on DE2 + DE2-70 platforms. Some problem.

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

    I have a SanDisk Ultra 2GB but as I said it works with the Audio project. Is there a way to flash a LED on the DE1 board when the SD is detected?

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

    Guys, I tried it with a brand new 2GB SD Card, Formatted as FAT16 system, unfortunately I still get the same error,

    Find SD card

    [FAT]Read section 0 error.

    [FAT]Fat_Mount fail

    SD card mount fail.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have a similar problem as wangrin. My board is also DE2 and SD card is 1GB which is formatted to FAT 16. Has anyone already solved this? Thanks in advance.

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

    Same problem with 1G sd card no matter in FAT16 or FAT32, anyone could help??or where can i found reference about this problem?

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

    I have same problem. I am unable to read the SDHC micro-SD card which has been formatted to create a 512MB FAT16 partition.

    I get the SD card mount fail error like a slap on my face.

    All these reference designs I have tried on this FPGA DE2-115 board have issues with them.