# HG changeset patch # User ideenmodellierer # Date 1585510797 -7200 # Node ID 7ac0e76dbd6a5d57879f67891a0bc60265aef925 # Parent 5dd996ed8611ef5715fae58bf9cc47333e878132 Activated reset of sample information within header data at time of sector erasing: After sample information have been erased the header are pointing to empty storage locations. To redefine the headers the sample addresses will be set to zero incating that no data is available. In that case the dummy functionality implemented by the last commits will be applied diff -r 5dd996ed8611 -r 7ac0e76dbd6a Discovery/Src/externLogbookFlash.c --- a/Discovery/Src/externLogbookFlash.c Sat Mar 28 21:41:47 2020 +0100 +++ b/Discovery/Src/externLogbookFlash.c Sun Mar 29 21:39:57 2020 +0200 @@ -787,6 +787,7 @@ actualAddress = SAMPLESTART; } preparedPageAddress = actualAddress; + ext_flash_invalidate_sample_index(preparedPageAddress); ext_flash_erase64kB(); actualAddress = actualAdressBackup; } @@ -1795,7 +1796,12 @@ actualAddress = ringStart; if(do_not_erase == 0) - ext_flash_erase_if_on_page_start(); + { + if((ext_flash_erase_if_on_page_start()) && (type == EF_SAMPLE)) /* invalidate header sample information if needed */ + { + ext_flash_invalidate_sample_index(actualAddress); + } + } while( i stop search */ - { - break; - } -#endif - } -#if 0 - else /* ID not in use => stop search */ - { - break; - } -#endif - diveidx++; - } + } + } + diveidx++; + } }