femto basic can´t read or write sd cards
propelleruser999
Posts: 39
hi,
i have installed femto basic in order to test my SD card interface(VGA_Demo_wPrtScrn.spin also has a SD Card Interface, but my screen responded with unsupported·screen resolution ). basic itself works fine. however SD-card support is telling me always "Can´t mount SD card".
inside the fsrw.mount there are a lot of more detailed error codes available, however femtobasic does only display this message.
i have scoped my pins during access to the SD-card . DO and DI stay always high, CLK, shortly shows some high frequency pulses( 8 or 9 negative pulse bust sequences; without a datalogger it is nearly impossible to count the bursts and the number of them ), CS shows one longer pulse.
How can i get to the more detailed codes inside fsrw.mount or can get them displayed·within femtobasic ? i have tried several SD cards. one of them (128mb) doesnt work in my camera but is accessible under XP, 4 others (work both in my digicam and under XP).
Maybe its only the format of the SD-Card . I choosed FAT from FAT,FAT32,NTFS under Windows XPSP2. FAT16 was not separately selectable.
best regards, René
i have installed femto basic in order to test my SD card interface(VGA_Demo_wPrtScrn.spin also has a SD Card Interface, but my screen responded with unsupported·screen resolution ). basic itself works fine. however SD-card support is telling me always "Can´t mount SD card".
inside the fsrw.mount there are a lot of more detailed error codes available, however femtobasic does only display this message.
i have scoped my pins during access to the SD-card . DO and DI stay always high, CLK, shortly shows some high frequency pulses( 8 or 9 negative pulse bust sequences; without a datalogger it is nearly impossible to count the bursts and the number of them ), CS shows one longer pulse.
How can i get to the more detailed codes inside fsrw.mount or can get them displayed·within femtobasic ? i have tried several SD cards. one of them (128mb) doesnt work in my camera but is accessible under XP, 4 others (work both in my digicam and under XP).
Maybe its only the format of the SD-Card . I choosed FAT from FAT,FAT32,NTFS under Windows XPSP2. FAT16 was not separately selectable.
best regards, René
Comments
By the way 9 means "not" in German... which gives you a triple negative in your username[noparse]:)[/noparse]
Rich
As Rich suggested, you either have a hardware (connection) problem or a card format problem. The SD card routines check several values on the SD card's boot block and, if they're not what is expected, report that they can't mount the card. Choosing FAT for formatting should work, but you may need to select a proper cluster size. Rokicki's documentation discusses this.
http://www.rayslogic.com/propeller/Programming/SD_Card/SD_Card.htm
however, this weekend is Fastnacht in Germany, which will last until tuesday night. If , i´m however able to do some work on my propeller, i will post my results.
many thanks for your help so far
best regards, René
I have also formatted a new SD Card (256MB) with a clustersize of 32K. How can i proove,that it is now really FAT16 ?
XP tells me its FAT. During formating it also only offers me FAT, FAT32 or NTFS. Is the cluster size really that,what determines FAT16 ?
Then i installed Tomas Rokickis FAT16 routines. Now i get more error info
With the adapter and SD card installed i get error -13; however,there is no hardcoded abort returncode -13,the only abort with flexible returncode is in pflushbuf. If i remove the whole SD-Card-adapter i get error code -20; which means „not a fat 16 volume“, which could make sense, since it is the first check in the „mount“ procedure.
By the way: i have to admit some faults, i made during building the adapter. I had not recognized that pin 8 is above pin 1 on the SD card;so all wires were soldered one pin up. This caused a short on my propeller board, since VDD was now brigded to VSS. The card also got hot. This card is no more in use. I have checked my prototypeboard by installing a LED-bar to pins 0 to 7 and running a (modified for pins 0 to 7) blinker2.spin (page 124 in Propeller manual). The board responds ok.
On http:\\www.rayslogic.com i got some good ideas, how to do better next time. If i cannot find the fault , i will have to scrap the adapter (too much soldered on it)and built or buy a new one.
However, any further ideas are welcome.
Regards, Ren