Some days before all is ok, but now after fopen mbed is freezing at all.
fp = fopen("/sd/test.txt", "w");
you need to make sure you close the file too.. eg
FILE* DataFile = fopen ("/sd/data.txt","w"); // create/overwrite file
hope that helps
I'm getting the same problem. I want to use fopen just to test if the SD card is present at all, but when I call:
FILE *fp = fopen("/sd/log.txt", "a");
usb.printf("it freezes before here");
without a disk it freezes before getting to the printf. Shouldn't it give me a negative value for fp? If not, is there a way I can ask if there is an sd card without freezing anything?
I have seen this problem from within the NetServices FSHandler doGet function.
I cant find the source code for the mbed implementation of fopen, anyone know where it is or is the source not available?
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top