circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

February 2006, Issue 187

Robust Bootloader for FPGAs


by Colin O'Flynn


DATAFLASH OVERVIEW

Atmel’s small DataFlash devices are available in sizes ranging from 1 to 64 Mb. I used a 4-Mb AT45DB041B for this project. The interface for programming involves three pins: the master in slave out (MISO) pin, the master out slave in (MOSI) pin, and the serial clock (SCK) pin. Atmel AVR devices have the ability to talk to these devices via their SPI ports.

DataFlash devices are organized in a number of pages. Like any flash memory device, you can only erase or write entire pages at one time. Each page is a block of 264 bytes in the 4-Mb device. To make this easier, the device has two SRAM buffers. The advantage here is that you can write to one buffer and then tell it to transfer to flash memory. While that’s writing, you can start writing data to the next SRAM buffer, which streamlines the transfer considerably. In fact, the LUB is faster than most other bootloaders. It takes only about 3 s to download an AVR file and 20 s to download an FPGA file.

Reading from the DataFlash is easy. You can set a start address, and then read the entire DataFlash device in one go. This is important because it enables the tinyloader to ignore the DataFlash’s paging setup (it only reads).

Now if only I could get a big bag of cash from Atmel for writing all of that.