cancel
Showing results for 
Search instead for 
Did you mean: 

does a 32GByte ultra SD work in FatFS ?

Trevor Jones
Senior

I have a shiny new Samsung EVO 32GB formated as 29.8GB Fat32

will it work ?

I have a H743

tried the FatFS application

it doesn't find the card.

FATFS_LinkDriver fails

22 REPLIES 22

Should do, ClockDiv should be constrained by driver code. FATFS_LinkDriver is before the file system touches it.

Any other cards working? Card Present signal?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

Don't reformat or use mkfs on the card

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Trevor Jones
Senior

Its a new card, I only save 2 text files .

no other cards here.

what value should we have for ClockDiv?

I have the SDMMC1.2 clock source set to 48MHz,

Probably going to constrain it to 4 down stream. The SDMMC unit should typically clock at 200 MHz, likely limiting wire clock to 25 MHz

Make sure the TRANSCEIVER option is disabled in stm32h7xx_hal_conf.h if you don't actually have one.

CubeMX generated?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Trevor Jones
Senior

not cube generated,, hacked an application in the repository...

I have a cube file but not sure the correct way to initialize it to read a file into ram.

Trevor Jones
Senior

gets stuck here in the cube file:

   if(f_mount(&fs, "", 1))

   {

      f_open(&file, "sample1.txt", FA_WRITE | FA_CREATE_ALWAYS); // < --- stuck here

f_mount, f_open, f_read

Link Layer failing precedes all that though

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

Likely stuck elsewhere...

Figure out what it is spinning on, and that you have IRQ handlers, etc.

EVAL example will be using the transceiver.

You have a debug uart? which/pins?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Trevor Jones
Senior

set SDMMC1.2 clock to 200MHz

added this, but now it wont compile.

"

Error      undefined reference to `FS_FileOperations'   H743_LCD_2   C:\Users\DAVE\STM32Cube\Repository\STM32Cube_FW_H7_V1.5.0\Projects\H743-144-LCD1\Src\bios.c   250   

		if(FATFS_LinkDriver(&SD_Driver, SDPath) == 0)
	{
		FRESULT res;
 
		res = f_mkfs(SDPath, FM_ANY, 0, workBuffer, sizeof(workBuffer));
 
		if (res != FR_OK)
		{
			Error_Handler();
		}
      
		FS_FileOperations();
	}
 
	/* Unlink SD diskio driver */
	FATFS_UnLinkDriver(SDPath);