There have been multiple comments/questions concerning the speed of the cldp programming. The provided flash programmer drivers that are used to program flash on Analog Devices Inc EZ-KITs are not optimized for programming speed. They are merely given as an example of how to program a flash device using the cldp and also to allow programming out of the box. There are definitely ways to speed up the programming process and those options will be outlined in this FAQ.
Increase buffer size
Most default ldf files only allow for a certain size heap which often limits the buffer size that the cldp can program during 1 transaction. For instance if a file is 1000 bytes and the buffer size is only 10 then 100 commands have to be sent from the cldp to the flash programmer driver running on the processor in order to transfer the entire buffer. It may be possible to increase this so that only 1 transaction is needed or maybe a handful. Users will have to determine the correct buffer size that gives the best performance boost. The buffer size variable that will need to be changed in the flash programmer driver is AFP_Size. Since there is only a certain amount of heap space by default and the buffer is created dynamically, users will have to take care to make sure they are not allocating too much memory for the amount of heap space that is allowed. Otherwise users would have to increase the heap size in the ldf file.
Increase SPI clock
The SPI clock used in the flash programmer driver may not be the max SPI clock for the device being programmed. The specification for the flash device found on the EZ-KIT should be used in order to find the max SPI clock allowed when programming the flash device. Once the max SPI clock is identified, reviewing the Hardware Reference manual will help with configuring the clock on the processor.
Change programming instruction
Many flash devices offer multiple programming options. Often the normal page program instruction is used but there may be other options that are faster. Consulting the instruction set table of the flash specification for other faster programming options would be recommended. There may be a dual page program or quad page program option available or possibly some other faster mechanism for programming flash that can be used.
Don't use -verify (v) option
By default when programming the verify option is NOT set. Please make sure that this option has not been added to the command line as it will slow down programming.
Upgrade emulators
If using the ICE-1000, ICE-100b, or USB-ICE emulators then upgrading to an HPUSB-ICE or ICE-2000 (latest emulator) would speed up programming as well.