STM32L4 Mass Storage Class (MSC) Write to SD Card Not Saving
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-13 8:27 AM
I'm working on a custom board with an STM32L476ZGT6 and set up code through the STM32CubeMX utility and followed along with the sample code for the eval board. I want to be able to copy files to the SD card when I connect my device and am able to get the connection and move the file to the SD Card and it will show up as being completed, however once I disconnect the device I lose the file. I've traced through the code and I do all the writes successfully, I just can't seem to save the file there once I unplug my device, any help would be greatly appreciated.
#usb-mass-storage #sd-card #sd #stm32l4- Labels:
-
SDIO-SDMMC
-
STM32L4 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-13 8:38 AM
Hi Kenny
I have moved your question to the
‌ where someone should be able to help you.Thanks
Oli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-13 10:31 AM
You need to make sure the file system structures get flushed to the media. On Windows this would mean closing the files, and then Ejecting (safely removing) so all local caching and write-back completes.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-13 11:36 AM
As the move gets reported in the Inbox I'm not convinced of the value of this message. Someone 'might' be able to help posters, but it isn't a guarantee.
We might want to review the systemic reason people keep posting in the wrong places, and address that. I think it has to do with the somewhat muddled and overlapping views presented of content and posts.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-14 9:10 AM
I close the files and then safely remove my device but still no luck on keeping the file on the SD card.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-14 9:42 AM
At that point you're left with analysing what has in fact been written to the media, and walking the file system structures.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-15 2:07 AM
Which Bus you use?
First I would connect a LogicAnalyzer (or at least an Oscilloscope). Look if there is something and try to interpret it. If you use SPI-Connection (avoid this for professional Solutions, it's removed from eMMC-Standard) it could be easy. With SDIO (normal SDMMC-Interface) it will be more difficult. For the commonly used Saleae-LogicAnalyzers exists a nonoffical Plugin for interpreting the CMD-Line of SD-Traffic. If you need to interpret also eMMC or the DataLines you will need an much more expansive Analyzer which is in most other Cases worse than the Saleae ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-15 9:10 AM
If it validates properly at a block access level then the bus is not an issue. Step one is to determine what is being read, and is that structurally correct and consistent.
Up vote any posts that you find helpful, it shows what's working..
