Em 25/3/2011 18:54, Olin Lathrop escreveu: > Dwayne Reid wrote: >> In other words, his boot-loader is responsible for saving the new >> firmware to scratchpad FLASH as it received. That requires word >> writes. > I don't consider that a "bootloader" function. It's really a uploader > function that he happened to put in the bootloader code. > > In any case, I still don't see why word writes are necessary. First, it > would make sense for the upload blocks to be the same size as the write > blocks. Yes, the upload blocks are the same size of a program row (64 instructions or 192 bytes) > However, even if that is not possible or desirable, I would expect > the whole upload area to be erased once before any blocks are uploaded. Yes, the whole temporary area is erased when a special block (called header) is received and the process begins. This block also contains the CRC of the whole new firmware, a number to identify the version of the firmware and the number of blocks to be received and programmed. Each block (header of program) has its own CRC also. > Then blocks are written as received without any erases. Even if partial > pages are written, it still makes sense to use page writes. Even if you'= re > writing just two words in a page, why would you do two separate word writ= es > when they can be written at the same time with a single page write? It > doesn't make sense. The blocks (rows) of 192 bytes are programmed using page writes, but one additional word write is made to a different area to signal that that particular block was received. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .