Search found 2 matches

by ThomasVortex
Mon Jul 03, 2023 6:34 am
Forum: ESP-IDF
Topic: How to format sd card?
Replies: 6
Views: 7532

Re: How to format sd card?

I tried to combine this snippet with sdspi example in esp_idf and I got a panic abort during execution. Do you have any idea why it is? /* Sys Library */ #include <sys/unistd.h> #include <sys/stat.h> /* Standard Library */ #include <stdio.h> #include <inttypes.h> #include <string.h> /* Defined Libra...
by ThomasVortex
Wed Jun 21, 2023 6:46 am
Forum: ESP-IDF
Topic: How to format sd card?
Replies: 6
Views: 7532

Re: How to format sd card?

esp_err_t formatSD() { FRESULT res = FR_OK; esp_err_t err = ESP_OK; const size_t workbuf_size = 4096; void *workbuf = NULL; ESP_LOGW(TAG, "partitioning card"); workbuf = ff_memalloc(workbuf_size); if (workbuf == NULL) { return ESP_ERR_NO_MEM; } DWORD plist[] = {100, 0, 0, 0}; res = f_fdisk(pdrv, pl...