2011-07-06 04:38 AM
Hi,
I am trying to reprogram the flash memory of an ARM (STM32F105RC) trhought a memry stick (USB OTG) and I would know if it is possible and someone has any experience on that. Reading the documentation it seems it should be possible but I'm not sure. Any help? #usb-host-iap-flash2011-07-06 05:51 AM
Yes, it should be possible.
You need a USB Host and (presumably) a filesystem to read the image from the stick. There should be plenty of examples of this. You also need to write the image to Flash, and then run it; which is what a Bootloader does. Bootloader examples are available. One potential issue is the amount of code space that all this will take - which will limit the size of image that you can load...2011-07-06 06:22 AM
Any time you can see and touch data in your system, you should be able to use that as a source for an update.
So you'd need a USB stack, a mass-storage driver, and a minimalist file system (ie find one specific file in the root directory) for FAT 16/32. As Andrew points out the foot print (FLASH and RAM) to do this will likely be quite substantial. People have done similar things with MMC cards, serial flash, ethernet networks, wireless modems, etc. Basically any data conduit you have access to. If you have enough memory, you could use application code to get the data into the system, and then the boot loader would then just need to copy that into FLASH, simplifying the boot loader significantly.2011-07-06 09:43 AM
Ok, I will start looking for some examples then, thanks :)
2011-07-07 05:46 AM
The USB Host library example (UM1021 STM32F105/107xx USB Host library ) for mass-storage already has the code for reading files from the USB-Disk. I have used this FW. Once the file is read, you can use this to program the flash. For this, use the IAP related examples. for example refer to AN3226 (& also UM0462)
2011-07-07 07:07 AM
The USB Host library example (UM1021 STM32F105/107xx USB Host library ) for mass-storage already has the code for reading files from the USB-Disk. I have used this FW. Once the file is read, you can use this to program the flash. For this, use the IAP related examples. for example refer to AN3226 (& also UM0462)
Out of curiosity, How large was the footprint you ended up with?2011-07-29 02:43 AM
Hi,
Please refer to this Application note, it covers your needs:http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f105_107_usb_fw.zip
Cheers, STOne-32.