2015-11-10 07:36 PM
Hello! Everyone,
I am rookie for STM32F103 series! Now, I programmed my STM32F103VE becomes a USB disk with SD card. But, I also want to access this SD card by STM32F103 to get the bitmap files stored in SD card, and display the bitmap files on my TFT.However, when I turned function of USB disk with SD card on, I cannot access the same SD card by FatFs function to read bitmap files!Is there anyone can help me?2015-11-10 08:08 PM
You'd probably want to rebuild the SD Card access layer, so it can arbitrate and serialize access to the media. If you can use FatFs in a READ ONLY mode it will significantly reduce the coherency issues that would occur with two writers.
2015-11-10 10:25 PM
I tried modify FS_READONLY becomes 1 in ffconf.h, but it dose not work.
2015-11-11 01:48 AM
I found a trade off!
Set_System();<br>Set_USBClock();<br>USB_Interrupts_Config();<br><br>
//Get BMP files saved in SD card here<br>Sd_fs_init();<br>Lcd_show_bmp( 100, 20,''/Dbmp'');<br><br>//Release FatFs<br>f_mount(0, NULL);<br><br>//USB disk<br>USB_Init();<br>while (bDeviceState != CONFIGURED);<span class=''Apple-tab-span'' style=''white-space:pre''> </span> //Wait until USB disk is ready
Thus, I avoided the collision.