LBradJob
(Brad Job)
November 5, 2018, 11:54pm
1
Is this the correct example to use if I’m trying to read/write to an SD card with a Multitech Dragonfly (STM32 microprocessor) with the latest mbed-os?
# SDBlockDevice
<span class="images"><span>SDBlockDevice class hierarchy</span></span>
You can use the Mbed OS SD card block device, so applications can read and write data to flash storage cards using the standard POSIX File API programming interface. Applications use the FAT filesystem and SD block device components to persistently store data on SDCards. The SD block device uses the SD card SPI-mode of operation, which is a subset of possible SD card functionality.
To configure this class, please see our [BlockDevice configuration documentation](../apis/data-options-and-config.html).
## How to wire an external SD-card module to a developer board
<span class="images"><span>How to wire an external SD-card module to a developer board</span></span>
1. In `mbed_app.json`, override the SD pin mapping based on the wiring. For example:
```
"sd.SPI_MOSI" : "PC_3",
"sd.SPI_MISO" : "PC_2",
"sd.SPI_CLK" : "PC_7",
"sd.SPI_CS" : "PB_9",
```
This file has been truncated. show original
It uses the “SDBlockDevice.h” header, but no library/header is linked to in the example page, and all the links that are included lead to a 404 error. Also, no library called SDBlockDevice shows up in the Import Wizard.