cancel
Showing results for 
Search instead for 
Did you mean: 

Custom USB storage based-on STM32F7.

kieuvietdich
Associate II
Posted on July 08, 2016 at 06:31

Hi all,

I'm developing custom usb mass storage using stm32f746 + MT29F64G08CF MLC NAND.

Can you show me low-level nand driver of Cube Firmware support for this NAND ? I can run usb mass storage using sdcard on stm32f7-disco. How to convert that projects for NAND ?

Thanks very much.

BR,
9 REPLIES 9
Posted on July 08, 2016 at 07:47

Ok, so it has a 128KB erase block size, do you or other members of your team have experience with block devices, or file systems?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kieuvietdich
Associate II
Posted on July 08, 2016 at 10:28

Hi clive1

I'm sorry, this's first time my team do it. Can you show me what i must be to learn for this ?

I had run OK usb mass storage stm32f7-disco example with sdcard. So what can i do for convert sdcard to nand ?

I'm Vietnamese. STMicro have a support team in my country ?

Thanks very much.
Posted on July 08, 2016 at 11:56

You need to manage the writing of one or more 512 byte sector into the 128KB block, ie reading, erasing, merging and writing back. You'd likely want caching and lazy writing to minimize repetition.

I don't work for ST, review their sales/support offices.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kieuvietdich
Associate II
Posted on July 08, 2016 at 12:08

Can you share me document or example code about this ?

Thanks,
Posted on July 08, 2016 at 12:27

Sorry, you'll have to use the resources available on the internet documenting NAND devices, and block storage device implementations.

At a minimum you should review how your SD Card MSC implementation accesses sector reads/writes, the use patterns, and then how you are going to map/deblock such writes onto a medium that has very large blocks which must be erased before being rewritten.

The behaviour of NAND devices has been this way for a very long time, and is not unique to STM32 or F7 devices.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kieuvietdich
Associate II
Posted on July 09, 2016 at 06:25

Hi clive1

Thanks for your attention.

I was try sdcard but it's very slow speed (300kbps copy out and ~100kbps copy in). I things use sdcard slower NAND. What do you thing about this ?
Posted on July 09, 2016 at 16:41

I don't think that's an inherent speed constraint of a MicroSD/SDIO. On an F4 I can read cards at rates >10MBps. USB-FS would add it's own bandwidth limitations which would get you to 700-800KBps 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kieuvietdich
Associate II
Posted on July 12, 2016 at 20:00

Hi clive1

How to remove that bandwidth limitations ? Can you share your project for me ?

Thanks.

Posted on July 12, 2016 at 21:06

I have posted a number of F4 projects demonstrating SDIO+FATFS and SDIO+MSC, please review those threads. The search on the forum isn't that good, I'd use Google or Bing..

Write speeds on MicroSD cards is highly dependent on the specific make/model, and access patterns aligned to the physical geometry of the flash array.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..