Two mcu's accessing sdcard
Hey everyone,
I have an stm32f722ze, The sdcard driver seems to be working well although I have a weird issue.
I have a secondary mcu that also needs to access the sdcard.The secondary mcu can succesfully mount and unmount the sdcard multiple times, although as soon as the stm mounts the sdcard, the secondary mcu can not mount the sdcard at all. I do close the file, unmount and unlink the driver, but it doesn't seem to work. As soon as I erase the flash of the stm, the secondary mcu access the sdcard without issue. How could I resolve this?
Here's an example of a test snippet, after this executes, I'm assuming that the stm has left the sdcard, although it seems the stm seems to hold onto it.
void SDcard(void) {
FATFS_UnLinkDriver(SDPath);
FATFS_LinkDriver(&SD_Driver, SDPath);
mount_ret = f_mount(&SDFatFS, SDPath, 1);
if (mount_ret == FR_OK) {
open_ret = f_open(&SDFile, "test.txt", FA_CREATE_ALWAYS | FA_WRITE);
f_close(&SDFile);
umount_ret = f_mount(&SDFatFS, SDPath, 1);
FATFS_UnLinkDriver(SDPath);
}
}The second mount call should unmount the sdcard as far as I know and then I unlink it.
Thanks in advance for any help!
