2017-02-20 01:57 PM
Everyone,
How can I use cubeMX for SDcard ? I have generated for MDK but :
this function doesn't work , from UM1721
User manualDeveloping Applications on STM32Cube with FatFs page 21.:
uint32_t wbytes; /* File write counts */
uint8_t wtext[] = 'text to write logical disk'; /* File write buffer */if(FATFS_LinkDriver(&mynewdisk_Driver, mynewdiskPath) == 0){if(f_mount(&mynewdiskFatFs, (TCHAR const*)mynewdiskPath, 0) == FR_OK){if(f_open(&MyFile, 'STM32.TXT', FA_CREATE_ALWAYS | FA_WRITE) == FR_OK){if(f_write(&MyFile, wtext, sizeof(wtext), (void *)&wbytes) == FR_OK);{f_close(&MyFile);}}}}FATFS_UnLinkDriver(mynewdiskPath);This variable :
&mynewdisk_Driver doesn't exist, which file is related ?
Thank you
2017-04-27 01:38 PM
2017-05-26 12:33 PM
Hey guys, I think the issue is that Cube is generating sdio.c init code that has the hardware flow control option set to off. This is different than the examples provided in the cube driver and example distro, which has flow control enabled:
hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_ENABLE;
Lowering the clock speed does appear to work also, because flow control is not needed when you get low enough.
2017-08-15 08:47 AM
I have SDIO 4bit FatFS working, but only with delays between block writes.
https://community.st.com/0D50X00009XkYXYSA3
I foundyour topic. MyCUBE code also had;
hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;�?�?�?�?�?
I thought it was worth enabling the flow control, to see if it would allow getting rid of my delays.
With it enabled, my app fails with and without thewithout the delays that i am trying to eliminate.
In my case, it appearsto make things worse.
2017-09-01 05:14 AM
Hello sir\mam,
I am trying to interface SD card with STM32 using FATFS but i am having some difficulty in doing so.
I have written user defined functions for initialization, read and write as mentioned in your code but I am having trouble regarding Status and ioctl functions.
Hoping for some help from you.
Thank you.
2018-07-12 04:35 AM
Going to note that the F2 part I'm working on today doesn't function properly with flow control enabled, just locks up on writes. Looks to be an errata issue. Reads were working. Just wrote ~15GB with it disabled.