Page 1 of 1

Format SD-card connected through SPI

Posted: Sun Jul 08, 2018 12:27 pm
by x_arrange
Hi all,

I guess one feature is missed in SD API - ability to format it ;)

I tried to use peace of code from IDF (esp_vfs_fat_sdmmc_mount function):

Code: Select all

void *workbuf = malloc(4096);
DWORD plist[] = {100, 0, 0, 0};
int ret = f_fdisk(0, plist, workbuf);
ret = f_mkfs("/sdcard", FM_ANY | FM_FAT32, 16*1024, workbuf, 4096);
free(workbuf);
But no effect for SD card

Are there any good ideas how to format SD with latest IDF?