Content originally posted in LPCWare by rocketdawg on Mon Jun 09 13:46:34 MST 2014
Tell customer that they indeed can have the remaining flash memory be used as a USB mass storage device (MSD).
but tell them that warranty issues are inevitable.
Most parts need to run the erase/reprogram code out of RAM. so, you lose RAM, you have enough RAM for more code and buffering?
and all interrupts must be off, so device is dead except for reprograming.
And what good is a flash drive with a few 10's of K of space? the FAT section will take up most of the space
and this flash is rated at a limited number of cycles, so every time a file is modified, the FAT section has to be rewritten, very bad, it will wear out.
100ms flash sector erase cycle on some parts. dam slow thumb drive.
and you have to erase a sector so you need more RAM for read/modify/write.
USB is going to add a lot of code space as well.
So, tell them you can do it. Yes, it is a massive amount of work.
Yes it will fail, rather soon, since the flash does not have the same hardware wear leveling, alternative block look up, ... that a SD card does. (and there are patents)
but make it VERY CLEAR, that warranty issues are not your concern if they want to do this.
because it will fail.
better to have the SD card as the storage device to the USB MSD. Still a lot of work.
and there can be only one master. The PC attached to the USB MSD is that master. If the device changes a file while it is attached to a PC, Windows will freak out.
the master might delete files that the device thinks are still open, or not yet flushed and closed.
Just quote them a very very big number for this feature creep.