Can I combine FatFs and USB MSC functions for the same SD card application together?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-11-10 7:36 PM
Posted on November 11, 2015 at 04:36
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?
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-11-10 8:08 PM
Posted on November 11, 2015 at 05:08
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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-11-10 10:25 PM
Posted on November 11, 2015 at 07:25
I tried modify FS_READONLY becomes 1 in ffconf.h, but it dose not work.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-11-11 1:48 AM
Posted on November 11, 2015 at 10:48
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.
