I think it is better to write the data in chunks to the SD-card and in a separate thread to avoid that the system is unresponsive while writing to the SD-Card.
@ scardinale - at runtime your code is working without any error.
I added a text at the beginning of the file. those text has not been overwritten or extended by the additional text.
we use the basic concept of the ghi-sd-breakout (rev 1.5). there are capacitors used.
I downloaded your breakout - there are no capacitors used.
I’ve read anywhere that some sd-cards have already integrated capacitors. Double use of capacitors - any problem?
Currently I am using AData 16GB MicroSdHC card.
The provided code will append a new line of text to the file each time it is run. If it is not appending anything then your problem is hardware related and not software related.
Please show us your schematic and perhaps one of the hardware gurus here can point out any obvious problems.
My design on the custom board includes the appropriate capacitors.
During development, we used a Sparkfun SD breakout that did not include any capacitors as you have discovered and only a Pull-Up resistor on the Card Detect line. There were no problems with this configuration.
The above code was run successfully using a cheap Memorex 8Gb SD card.
I do not know anything about the SD Cards having built-in capacitors.
Loader (TinyBooter) version information:
4.3.8.1 on this computer.
4.3.8.1 on this device.
>>> The Loader (TinyBooter) is up to date. <<<
Firmware (TinyCLR) version information:
4.3.8.1 on this computer.
4.3.8.1 on this device.
>>> The Firmware (TinyCLR) is up to date. <<<
Please wait for the device to reboot... Done.
@ scardinale - no difference in behave. since the one case for about 50tries, nothing has been written successfully
each line of the hardware sd-link has been check, direct connection - no use of capacitors.
the only big difference in our applications is the card-type, i use micro-sdhc.
sorry: I only updated the netmf application layer, not HAL (loader)
It should make any difference if you are using a MicroSD or SD MMC Card. Our custom board is using a MicroSD while development was done on a SD Card. during development, both GHI MicroSD Module, GHI SD Card Module and a Sparkfun SD Breakout Board. All performed the same.
On a side note, you should always update TinyBooter to match the Firmware version to avoid problems.
@ scardinale - yes, up to 5.
for updating bootloader. i have to user PA13. It is intern sp1 clk and not used at g400TH.
…
is there existing any hardware-design guide to fulfil any requirements?
i took a ghi gadget as reference.
@ scardinale - I check other… ghi sd gadget (standard size) results in unformated storage device, the same car which has been detected as formated. switching back to my own g400 controller -system --> card will be detected as formated.
for me it seems, that there is a specific line, which ich responsible for basis detection.
unfortunately i am firm with the very basics of sd-card bus communication.