2013-05-19 09:15 AM
Dear STM32 guru,
I'm trying implement a small USB Mass storage allocated on internal chip flash memory. I tried to adopt code examples for STM3210x-EVAL and IAR-STM32-SK boards, but unfortunately it does not work (both boards have external memory (SD/etc.) and I failed to make right changes.Probably somebody could point me to relevant code examples. Thank you in advance, Leonid. #stm32f103 #usb-mass-storage2013-05-19 11:43 AM
One needs to consider the total size of the ''disk'' being emulated, and the sector size (512 bytes) vs the minimum erase size of the F1 device being utilized. If the minimum erase size is greater than 512 bytes you will need to perform the deblocking and perhaps caching and lazy writing to minimize wear to the flash. You might also want to consider how you format the device so as to align the cluster boundaries, and size, with the minimum erase size you are using.
2013-05-19 03:54 PM
Other potential pitfalls are executing from and modifying the flash array, causes significant stall and loss of real-time responsiveness. The SD Card via SPI on the F1 family has pretty low bandwidth.
2013-05-20 12:42 AM
Actually my goal is DFU implementing. The device does not have any external memory (just on chip flash). The mass storage I wanted to put there a readme file and a small host executable to support DFU from host size.