Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThere's something strange when I try to read from my sd_card.
I just wanna to see the contents in hexadecimal. Here's the code:
short handler = alt_up_sd_card_fopen(temp, false);
printf("\n\n");
if(handler >= 0)
{
short read;
while ((read = alt_up_sd_card_read(handler)) != -1)
{
printf("%02x ", read);
}
}
And here are the first results printed on screen: http://i44.tinypic.com/1551mo8.png And the file contents seen on a hexadecimal editor: http://i41.tinypic.com/ezvib.png Note that the first 4 bytes of the file is repeated 8 times on the code, and the "f9 00 f7 00" part of the file is never read using the code. Strange :cry: