Swapping out flash memory and upgrading! - Page 1
Forum section: electronics / beginners

author: bbpun
author_rank: Newbie
timestamp: July 26, 2015, 12:27:36 pm
content: Hi,I have an EasyAcc Wi100-s7800 wifi router (http://wiki.openwrt.org/toh/easyacc/wi100-s7800). It is essentially a portable wifi hotspot. The chipset (based on RT5350F) conveniently supports OpenWRT (open source router firmware). However, there is a limitation when it comes to the size of the firmware you can build. Presently, the device has a Winbond W25Q64FVSIG flash memory soldered on the board which provides 8MB of flash memory. I'd like to do a straight swap with the Winbond W25Q128FVSG which effectively doubles the flash memory available. I've checked out the datasheets for both and from what I can see, they only differ in storage space and their maximum clock speeds. The 64 supports up to 80MHz, and the 128 supports up to 70MHz.What I would greatly appreciate an understanding of is whether I can simply swap the flash memory to increase flash memory size?Ta!

author: Jeroen3
author_rank: Super Contributor
timestamp: July 26, 2015, 08:52:12 pm
content: I'd think so. But how are you going to get the firmware on the flash?The chip default to boot from external flash, so it'll just start running code, and the code itself will configure the flash for maximum speed.But there is also an internal boot ROM, I'm not sure if this contains dfu code, or boot code. See if you can find the pins used to determine to mode in which the device boots.

author: sync
author_rank: Frequent Contributor
timestamp: July 26, 2015, 09:03:47 pm
content: I use an USB flash drive on my OpenWRT router. The internal flash is used for booting the kernel and mounting the root file system which is on the USB drive. Much easier that fiddling with flash chips and much more capacity. Maybe this is an option.

author: BennVenn
author_rank: Regular Contributor
timestamp: July 26, 2015, 10:32:21 pm
content: I have a WR703-n which ships with 4mb Flash, I've added 8mb and tried 16mb however the u-boot doesn't support 16mb so only 8mb is used. I compile openwrt with the USB and vfat drivers and mount a USB drive at startup and run my OS from that.The code to update the flash is on the flash so you'll need a way to flash your new SPI chip with at least the original firmware then do the update while its in the device.What I have done in the past (I've done this about 5 times and haven't damaged anything yet...) is boot the router with the TTL-USB adaptor on it, invoke the u-boot command prompt, de-solder the flash IC and re-solder it without turning it off, then do the update. The ROM image is copied to RAM and executed, it is not accessed after bootup so it wont crash when you remove it.You must use hot air, you cant use a grounded iron tip on the 3.3v or data lines, it will short it out and reset itself.Use the lowest temp you can, IC's don't like to be powered up at such high heats.I bought one of those chinese SPI USB flashers and while it did work, it took about an hour to flash 8mbytes. These are very slow due to them being programmed via bit banging one clock transition at a time, and under USB 1.1 protocol. ~1ms per clock edge.I've since built a USB SPI programmer based around a 32bit ARM. It enumerates as a Mass storage device and allows direct read and write to the flash IC as if it was a drive (Emulated Fat12 in the ARM). An 8mb read is done in a few second and a write is not much slower. By far the most convenient way to re-write a flash. I've got a few boards left for my programmer if you are interested.