comparison Discovery/Src/externLogbookFlash.c @ 1040:74be24428049 GasConsumption

Bugfix Fontpack update for large blocks: The update of a font pack with a size > 768000 byte was interrupted and a manuel switch to bootloader had to be performed to get the font pack flashed. Rootcause was a missing address adjustment during the block read back function which caused a false error detection. Blocks > 768000 are read in two step while only one buffer is used for comparation. To fill the correct data into this buffer a dummy read of the flash data was added to get the data pointers to the correct offset. Another bug was regardings the read back itself where only the first byte was checked. After array indexing the complete buffer is noch verified.
author Ideenmodellierer
date Mon, 13 Oct 2025 20:54:25 +0200
parents 158100a84ebd
children
comparison
equal deleted inserted replaced
1039:f8e2895c91e5 1040:74be24428049
332 } 332 }
333 } 333 }
334 } 334 }
335 else if(pSample2) 335 else if(pSample2)
336 { 336 {
337 actualAddress += length1; 337 /* actualAddress += length1; do dummy read to get EEPROM to the correct address */
338 for(uint32_t i = 0; i<length1; i++)
339 {
340 ext_flash_read_block(&pSample2[0], EF_FIRMWARE2);
341 }
338 for(uint32_t i = 0; i<length2; i++) 342 for(uint32_t i = 0; i<length2; i++)
339 { 343 {
340 ext_flash_read_block(&pSample2[i], EF_FIRMWARE2); 344 ext_flash_read_block(&pSample2[i], EF_FIRMWARE2);
341 } 345 }
342 } 346 }