Posted on May 18, 2018 at 15:59 Hi
Singh.Gurpreet
,
1) How do I configure and access Multi-Drive Support with FatFS (Differentvolume name or numbers)with STM32CubeMX?
Within CubeMX, toaccess to your two microSD Card simultaneously,you should first enable SDMMC1, SDMMC2 and FatFS. Then, on the generated code, you can handle both SD cards by indicatingthe drive numberin the path name. Here is an example hoping it helps you:
FIL f_src, f_dst;
f_open(&f_src, '0:srcfile.txt', FA_CREATE_ALWAYS |FA_READ);
f_open(&f_dst, '1:dstfile.txt', FA_CREATE_ALWAYS | FA_WRITE);
2) Can I configure and access FATFS with SPI Interface onany STM32 MCU with STM32Cube?
You can access to your SD card using SPI interface and enabling FatFs (user-defined within CubeMX). Unfortunately, most examples, that serve communication with SD card, use SDIO rather than SPI because of communication speed problem.
For more details about SPI & FATFS configuration to connect your SD card, Please refer to the following discussion
:
https://community.st.com/thread/44247-cubemx-support-for-sdfatfsspi#comment-184565
It would be more efficient and functional to connect your SD card using SDIO, when it is allowed. You can refer to many examples in the firmware thathelp you:
\STM32Cube\Repository\STM32Cube_FW_F7_V1.0\Projects\STM32F722ZE-Nucleo\Applications\FatFS\FatFs_uSD
3) How function like(
/external-link.jspa?url=http%3A%2F%2Felm-chan.org%2Ffsw%2Fff%2Fdoc%2Fchdir.html
) is used to access Volume Name/No. ?
The f_chdir function is used tochange the current working directoryof the current drive.
f_chdir('1:/dir1/dir2');
You can refer to this link to get more explication and details about this function
http://elm-chan.org/fsw/ff/doc/chdir.html
Best Regards,
Mohamed.