syxiao2002/sdmmc_perf_test

1.0.0

uploaded 1 month ago
SD card I/O test using 1-line sdmmc

readme

# ESP32: SD card I/O test using 1-line sdmmc

This repository does not initialize the SD card or the SDMMC peripheral. To use it, simply include the header file and call sd_card_io_test() after your own initialization.

# Example usage
```
#include "io_test.h"

void app_main(){
    // Your own code to initialize the SD card and the SDMMC peripheral, etc.
    // If you encounter issues using the SD card, refer to https://github.com/espressif/esp-idf/tree/master/examples/storage/sd_card/sdmmc
    ...
    ESP_LOGI(TAG, "Mounting filesystem");
    ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
    ...

    // run io test
    sd_card_io_test();

    // Your own code to unmount partition and disable SDMMC peripheral
    esp_vfs_fat_sdcard_unmount(mount_point, card);
    ESP_LOGI(TAG, "Card unmounted");
}
```

## Setting in io_test.h
```
#define TEST_SIZE (1 * 1024 * 4)     // Size of each packet in bytes
#define NUM_PACKETS 5                // Total number of packets to be written
#define FILE_NAME "/sdcard/test.bin" // Name of the test file on the SD card
// #define WRITE_TEST_USE_PSRAM // Uncomment to use PSRAM for writing test
```

Links

  • Repository Repository

Supports all targets

License: MIT

To add this component to your project, run:

idf.py add-dependency "syxiao2002/sdmmc_perf_test^1.0.0"

or download archive

Stats

  • Archive size
    Archive size ~ 3.03 KB
  • Downloaded in total
    Downloaded in total 7 times
  • Downloaded this version
    This version: 7 times

Badge

syxiao2002/sdmmc_perf_test version: 1.0.0
|