cancel
Showing results for 
Search instead for 
Did you mean: 

USB Mass storage on internal chip flash memory (STM32F103)

vleonid
Associate
Posted on May 19, 2013 at 18:15

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-storage
3 REPLIES 3
Posted on May 19, 2013 at 20:43

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 20, 2013 at 00:54

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vleonid
Associate
Posted on May 20, 2013 at 09:42

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.