Page 1 of 1
USB MSD using SPI FLASH
Posted: Thu Mar 16, 2017 5:09 pm
by Tabulous
Hi Just looking at USB MSD and looking to use this on SPI flash.
The MSD Config struct requires a block device driver like SDC, but could we not use the new hal_flash driver here instead ?
Re: USB MSD using SPI FLASH
Posted: Thu Mar 16, 2017 5:41 pm
by Tabulous
Or maybe easier is to use mmc_spi and change the required parts to suit
Re: USB MSD using SPI FLASH
Posted: Fri Mar 17, 2017 1:20 pm
by Tabulous
Got it working using a hacked mmc_spi interface.
Attached are the files. This uses the same flash driver as in
http://www.chibios.com/forum/viewtopic.php?f=3&t=3320The usb_msd.c is change to support 4096 blocks, i.e. the buffers.
Re: USB MSD using SPI FLASH
Posted: Mon Apr 03, 2017 3:17 am
by DeusExMachina
Good job! How about speed? I am considering changing my eMMC to SPI flash in the future. Does it support some wear leveling?
Re: USB MSD using SPI FLASH
Posted: Mon Apr 03, 2017 11:42 am
by Tabulous
DeusExMachina wrote:Good job! How about speed? I am considering changing my eMMC to SPI flash in the future. Does it support some wear leveling?
Ive not really done any performance testing but speed is not really an issue for me, writes to the flash i do very minimal. Its manly used for boot loading, so i can drag/drop new binaries on to it and then flash them to host MCU flash.
There is no wear leveling either.