Need help getting SD+FATFS working with an STM32H747I-Disco
I'm trying to use the SD card reader on the STM32H747I-Disco with FatFs. It's working as expected with the M7 core -- I'm able to initialize the SD interface and the filesystem, and access files on the SD card.
However, when I perform the same initialization using the M4 core (which is the core I would like to access the SD card), I get FR_DISK_ERROR when I try to open files or directories.
I'm using the BSP initialization functions. The SD interface initializes correctly (without error, anyway), and BSP_SD_GetCardInfo returns the correct information. After I link the driver, I'm able to mount the SD card, but attempting to open a file fails.
The failing part of my setup code looks something like this:
if( FATFS_LinkDriver( &SD_Driver, sdPath ) != 0 )
{
sendString( "FATFS error: unable to link driver!\r\n" );
}
else if( (res = f_mount( &sdFatFs, (TCHAR const*)sdPath, 0 )) != FR_OK )
{
sendString( "FATFS error: unable to mount SD card!\r\n" );
}
else if( (res = f_open( &file, "test.txt", FA_READ )) != FR_OK )
{
// This call fails with FR_DISK_ERROR
sendString( "FATFS error: unable to open file!\r\n" );
}Does anybody know why FatFs would work on one core and not the other? Is anyone successfully using the SD interface with the M4 core?
