2021-04-18 08:39 AM
There are many threads about using internal flash as MAss Storage in the USB Mass Storage Class, but non of them ever lead to anything.
Has anyone actually managed to get it working and is willing to share their code? I have scraped the internet for any info, but cant't find anything that actually works
2021-04-18 09:19 AM
Generally because it is slow and erase/write blocks real-time operation (USB). People who you expect to code a solution have made different choices.
Depending on the STM32 family/model the block size of the flash sectors is too large and inconsistent
2021-04-18 10:37 AM
Ok, but that still doesn't answer my question: is ist actually possible or am I wasting my time on something that isnt posssible at all?
If it is a good idea or the proper application is TBD.
2021-04-18 10:52 AM
That's not the question you've asked. The answer to your original question is "probably no thus no", but that's hard to prove, given the size and nature of internet. Clive explained you, why the answer is probably no.
Answer to question "is it actually possible" is "probably yes".
JW
2021-04-18 03:43 PM
Then, how the mbed updater works? It seems to write images directly to the target internal flash, and it does MSC ?
--pa
2021-04-19 12:14 AM
yup, it clearly says ram, my bad
2021-04-19 05:21 AM
Yes, but there one mcu programs the other.
And I wrote "probably possible".
JW
2021-04-19 05:25 AM
> this guy makes a step by step guide of USB mass storage class +filesystem using the Flash memory
Does he? The description of the video says:
STM32 USB MSC Device using RAM/SD CARD
JW
2021-04-20 10:15 AM
Generally being USB MSC device doesn't mean it has to be with a "real" file system and store files. It can present some special data records, which show up as files, the tree structure can be static, files can be read-only etc. It definitely is possible!
2021-04-20 10:54 AM
The mbed, and some other loader, fain being a USB MSC+FAT as a means of fooling the OS sufficiently to send a contiguous file it can write to internal flash.
I have serious doubts it can read back or perform random seek type behaviour.
In any case it really requires a pretty deep understanding of the MSC, FAT File System, and OS nuances and behaviours for drag-n-drop.