Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
792 Views

altera up sd card core - fat16 not detected

I tried to use altera_up_sd_card_avalon_interface in Nios II on my DE1 Board, I have tried hal functions of this example: 

 

#include <stdio.h> # include <altera_up_sd_card_avalon_interface.h> int main() { alt_up_sd_card_dev *device_reference = NULL; int connected = 0; printf("Starting...\n"); device_reference = alt_up_sd_card_open_dev("/dev/Altera_UP_SD_Card_Avalon_Interface_0"); if (device_reference != NULL) { while(1) { if ((connected == 0) && (alt_up_sd_card_is_Present())) { printf("Card connected.\n"); if (alt_up_sd_card_is_FAT16()) { printf("FAT16 file system detected.\n"); } else { printf("Unknown file system.\n"); } connected = 1; } else if ((connected == 1) && (alt_up_sd_card_is_Present() == false)) { printf("Card disconnected.\n"); connected = 0; } } } return 0; }  

 

the card has been detected but not the fat16 file system. I have formatted the card (fat16) and tried with 4 different brands. 

Which problem could be? 

 

Please help me :( and thanks
0 Kudos
0 Replies