2023-01-19 01:59 AM
Hello!
I am using STM32WB5MMG processor to start working with mass storage class using the internal FLASH memory.
However, I have a problem with using the internal FLASH to declare the capacity of the built file system, because the device is detected by the computer, but without obtaining information about its capacity or the size of the allocation unit.
I tried to use the advice from this post ("STM32F4 mass storage class with internal flash"), but unfortunately it didn't work.
Best regards.
2023-01-20 01:01 AM
Start by implementing MSC using RAM on any other STM32 with a bigger RAM. Then prepare your own formatted FAT structure, as Windows is not very fond of small mass storage volumes and cannot reasonably format them. After you have this working, try to move to Flash. It's not a trivial task, you need to at least add an extra layer for translating 512 B FAT sectors to Flash pages (at least two page buffers in RAM would be needed with deferred Flash writes to avoid wear-out). Alternatively, if you need to work with just one or two files, do some smart tricks "virtualizing" the volume (that's how it's done in MSC bootloaders).