- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using psoc 5lp 059 kit, in that i am using spi connection with sd card (micro sd card 16 gb, class 4, san disk)
In that I have error -1,
ex:
int abx = FS_Mount(sdVolName);
sprintf(cmdnum,"a : %d ",abx);
UART_2_PutString("\n\r");
UART_2_PutString(cmdnum);
UART_2_PutString("\n\r");
abx = -1, and its error of FS_ERRCODE_EOF (End of file reached)
ref: https://www.segger.com/downloads/emfile/UM02001
how to resolve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RaSh,
You list:
int abx = FS_Mount(sdVolName);
You don't mention what sdVolName is set to.
The FS_Mount(char *VolName) expects to see the VolumeName previously assigned to it. If it doesn't find it, it will return: -1 which equals "Error, Volume can not be mounted"
If you change the line to:
int abx = FS_Mount(NULL);
It will return the first volume it sees in the SD slot.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps this is due to a known limitation:
The volume of the SD card should not exceed 2Gb.
Test the project with a card no more than 2Gb
Evgeniy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RaSh,
You list:
int abx = FS_Mount(sdVolName);
You don't mention what sdVolName is set to.
The FS_Mount(char *VolName) expects to see the VolumeName previously assigned to it. If it doesn't find it, it will return: -1 which equals "Error, Volume can not be mounted"
If you change the line to:
int abx = FS_Mount(NULL);
It will return the first volume it sees in the SD slot.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
go to the post: PSOC5 and SDCARD, warning for some of the issues I worked through on SD Card. I eventually gave up on emfile due to how it handles errors.
The Segger Emfile sdcard library has some crashes in it unless you figure out how to patch the exception vectors manually. Your best bet is to purchase the library source code if you need a fully functioning SDCard system handling all errors.
On the other hand, the elm-chan library at http://elm-chan.org is a library that I was able to put into the PSoC5LP very easily, and it handles errors gracefully, within the code space, rather than using CPU exceptions to unknown vectors.