4 years, 10 months ago.

The sdcard library not working with the ble nano?

the ble stops broacasting. the code gets stuck in the function below. Is there any other library for BLEnano. What modification do we need in the sd card library. I used niel Thiessen as well as the older one but didnt work. please help.

include the mbed library with this snippet

void endprocess()
    //afterreset = true;
    printf("\nWriting to SD card...");
    FILE *fp = fopen("/sd/mydir/sdtest3.txt", "w");
    if (fp != NULL) {
        fprintf(fp, "hello");
    } else {


Question relating to:

1 Answer

4 years, 7 months ago.

I have the same problem. The program freezes at:

"FILE *fp = fopen("/sd/mydir/sdtest3.txt", "w");"

I have been working off of this code example. http://mbed.org/users/eencae/code/2545_SD_Card/

So then I went with the super simple approach and used the code example from SDFileSystem.h:

SDFileSystem.h Example Code

  #include "mbed.h"
  #include "SDFileSystem.h"
 SDFileSystem sd(p9, p11, p8, p10, "sd"); // MOSI, MISO, SCK, CS, NOTE: Modified from example
  int main() {
      FILE *fp = fopen("/sd/mbed.txt", "w");
      fprintf(fp, "Hello World!\n");

That example did not work either. I'm still investigating this problem. Any help would be appreciated.

some said when the dex file crosses 400kb it does that. I am trying to use eeprom ds2431 instead. https://developer.mbed.org/teams/Maxim-Integrated/code/OneWire/docs/a1f0069f1832/classOneWire_1_1DS2431.html#_details

Please guide me if you understand this program.

posted by jayendra mishra 22 Feb 2017

I'm not familar with that one wire library and never used it before.

My next approach was going to be using a 24LC246 (256k EEPROM, uses I2C) because I have one currently available to me. I can keep you posted on my progress if you are interested.


There is also a 2Mbit version available which was going to be my upgrade. http://www.microchip.com/wwwproducts/en/at24cm02

posted by Scott N 22 Feb 2017

sure i am very much interested. Do they have a library for that? i am not familiar with that device. please share an example with me if it works. thank you

posted by jayendra mishra 22 Feb 2017