I am using a LPC11U24 that is interfaced to an SD card. In order to write files to the SD card I am using the SDFileSystem code as well as the fat code from the two links below. I have a ticker that runs every two seconds, and it reads in a value from an A-to-D pin and then transmits it over a serial connection to a Bluetooth module. It also then writes the value to a file on the SD card.
http://mbed.org/users/simon/programs/SDFileSystem/5yj8f
http://mbed.org/users/simon/programs/fat/m3oya6
It works fine for the first few times the ticker is called (about 4 times), it is able to write the values to the SD card file as well as transmit them over Bluetooth. However, when it gets to about the fifth time the ticker function is called, the mbed will freeze up whenever it tries to call fopen at this line:
FILE *fp = fopen(buf, "a");
Whenever I remove all of my Bluetooth code the ticker function will not stop at the fifth iteration and it will keep writing to the SD card. If I remove all of the SD card code then the values will be transmitted over Bluetooth and will not stop either. Does anybody know what is causing this behavior?
Thanks!
I am using a LPC11U24 that is interfaced to an SD card. In order to write files to the SD card I am using the SDFileSystem code as well as the fat code from the two links below. I have a ticker that runs every two seconds, and it reads in a value from an A-to-D pin and then transmits it over a serial connection to a Bluetooth module. It also then writes the value to a file on the SD card.
http://mbed.org/users/simon/programs/SDFileSystem/5yj8f http://mbed.org/users/simon/programs/fat/m3oya6
It works fine for the first few times the ticker is called (about 4 times), it is able to write the values to the SD card file as well as transmit them over Bluetooth. However, when it gets to about the fifth time the ticker function is called, the mbed will freeze up whenever it tries to call fopen at this line: FILE *fp = fopen(buf, "a");
Whenever I remove all of my Bluetooth code the ticker function will not stop at the fifth iteration and it will keep writing to the SD card. If I remove all of the SD card code then the values will be transmitted over Bluetooth and will not stop either. Does anybody know what is causing this behavior?
Thanks!