- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to create a .txt file and save it on my sd card.
I using the emfile component and use his example project.
I using a PSOC 5LP097 KitProg: CY8C5868LTI,a screen, a Micro-SD card adapter from Catalex and a 4Go SD card.
I made a schema for your understanding.
So when I want to launch my project all the step look like they works but at the end, there is nothing on my SD card.
And sometimes when I create a file on the sd card from a computer, PSoC or somethings else erase him.
finally I've got another probleme, at the first step, PSoC want to know the sd card name BUT he wrote on the LCD "mmc:0:" what is it ?
Thank for your help
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The default volume name is mmc:0:. So even if there is no card connected it will show value 0.Can you use the code snippet given below.
if(0 == (status_t = FS_GetVolumeInfo("mmc:0:0", pInfo)))//default volume name is mmc:0:0
{
/* Getting volume name succeeded so prompt it on the LCD */
LCD_PrintString("SD card name:");
LCD_Position(1, 0);
LCD_PrintString("mmc:0:0");
}
Can you check if this code snippet is working. Just to confirm if the connection is proper. Also can you please use a 2GB SD card and test the project. Also can you try formatting in FAT32 and use the FAT 32 library and test again.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The default volume name is mmc:0:. So even if there is no card connected it will show value 0.Can you use the code snippet given below.
if(0 == (status_t = FS_GetVolumeInfo("mmc:0:0", pInfo)))//default volume name is mmc:0:0
{
/* Getting volume name succeeded so prompt it on the LCD */
LCD_PrintString("SD card name:");
LCD_Position(1, 0);
LCD_PrintString("mmc:0:0");
}
Can you check if this code snippet is working. Just to confirm if the connection is proper. Also can you please use a 2GB SD card and test the project. Also can you try formatting in FAT32 and use the FAT 32 library and test again.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for your help but it not working, PSoC tell me it's an undeclared identifier, but I don't know what is his identifier.
I must include the identifier for status_t and for pInfo
I don't have a 2GB card I must buy one for try, and at least I tried to format in FAT32 and change my library and it's seems like it works.
Thanks
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It's work I can create en write in a .txt file. But I want to return to the line at all step.
I found I must use \n but it doesn't work, Do you have an idea for how I can do that
Thanks
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you please elaborate the requirement. Do you want to write new line into the text file?
Thanks,
Hima