Carl-Daniel Hailfinger wrote:
If you tell me about the design constraints of your device, I can probably come up with a flashrom driver which can reflash an 1 MByte ROM in ~5 minutes or so. That will require some cooperation from your device, but should be doable with ~270 bytes of RAM. Even with ~140 bytes of RAM we should be able to get some decent performance. As long as we can optimize the protocol, it should be possible to get acceptable performance even with only 50 bytes of RAM, but generally more RAM will give you better performance.
The tester device is basically an Atmel AT90USB162, which has USB and SPI ports. Data sheet and a detailed manual are available on Atmel web pages. The USB is connected to the Linux host. SPI and some I/O pins are used to control a multiplexer and an SPI flash chip.
The microcontroller can be programmed in C with gcc, and I am using the open-source LUFA library for USB drivers on the device side.
The microcontroller has 16 Kbytes Flash ROM, 512 bytes SRAM, and a separate 176 byte buffer RAM in the USB controller. The CPU runs at 16 MHz. I have so far used the SPI bus at 1 MHz.
The USB controller supports up to 5 endpoints, including default control endpoint. Maximum packet size is 64 bytes. Two of the endpoints can be double buffered in hardware.
Is this enough details, or do you need something else?
Best regards, Juhana Helovuo