Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 4 months ago.
Mbed filesystem mount fails
Hello,
I am using the platform Nucleo-f207zg, and currently trying to use an SD card.
I am running the https://github.com/ARMmbed/mbed-os-example-sd-driver example and it works with one of my SD cards which I have been using for a long time with my codes and even this example.
The first time I tried using this SD card I had a bad time, and now that I am trying with new SD cards, again a lot of problems. I already formatted the new cards with Mac OS disk utility and with Windows using the guide on https://github.com/ARMmbed/mbed-os-example-sd-driver.
The programs always deliver the same error
--- Mbed OS filesystem example --- Mounting the filesystem... Fail :( No filesystem found, formatting... Fail :( error: Unknown error (-5005)
Does anyone have any suggestion?
1 Answer
5 years, 4 months ago.
Hello Jose,
- To format SD cards I use the SD Memory Card Formatter with the
Overwrite format
option selected. - It was reported an issue regarding a wrong default SPI frequency (100000Hz) for the SD cad initialization. You can try to change it to a more suitable value (for example 350000Hz) by modifying the
mbed_app.json
file in the https://github.com/ARMmbed/mbed-os-example-sd-driver demo project as follows:
{ "config": { "UART_RX": "D0", "UART_TX": "D1", "DIO_0": "D0", "DIO_1": "D1", "DIO_2": "D2", "DIO_3": "D3", "DIO_4": "D4", "DIO_5": "D5", "DIO_6": "D6", "DIO_7": "D7", "DIO_8": "D8", "DIO_9": "D9", "SPI_CS": "D10", "SPI_MOSI": "D11", "SPI_MISO": "D12", "SPI_CLK": "D13", "I2C_SDA": "D14", "I2C_SCL": "D15", "I2C_TEMP_ADDR":"0x90", "I2C_EEPROM_ADDR":"0xA0", "AIN_0": "A0", "AIN_1": "A1", "AIN_2": "A2", "AIN_3": "A3", "AIN_4": "A4", "AIN_5": "A5", "AOUT" : "A5", "PWM_0": "D3", "PWM_1": "D5", "PWM_2": "D6", "PWM_3": "D9", "DEBUG_MSG": 0, "DEVICE_SPI": 1, "FSFAT_SDCARD_INSTALLED": 1 }, "target_overrides": { "*": { "target.components_add": ["SD"], "sd.INIT_FREQUENCY": 350000 } } }
Hello Zoltan,
I already did as suggested and now it just stays forever mounting the fileSystem. I do have two 16GB Class 10 SD cards working, and the one that is not working is a default 8GB Kingston SD Card. I don't know if this has something to do...
Thank you for your time answering! I wonder what is wrong?
posted by 28 Jun 2019