Format SD-card connected through SPI

x_arrange
Posts: 13
Joined: Sat May 20, 2017 10:32 am

Format SD-card connected through SPI

Postby x_arrange » Sun Jul 08, 2018 12:27 pm

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?

Who is online

Users browsing this forum: Baidu [Spider] and 148 guests