- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page