| Electronic Components Datasheet Search |
|
PIC24FJ128GL302 Datasheet(PDF) 70 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC24FJ128GL302 Datasheet(HTML) 70 Page - Microchip Technology |
|
70 / 424 page ![]() PIC24FJ128GL306 FAMILY DS30010198B-page 70 2019-2020 Microchip Technology Inc. 6.4 Error Correcting Code (ECC) In order to improve program memory performance and durability, these devices include Error Correcting Code (ECC) functionality as an integral part of the Flash memory controller. ECC can determine the presence of single-bit errors in program data, including which bit is in error, and correct the data automatically without user intervention. ECC cannot be disabled. When data are written to program memory, ECC generates a 7-bit Hamming code parity value for every two (24-bit) instruction words. The data are stored in blocks of 48 data bits and seven parity bits; parity data are not memory-mapped and are inaccessible. When the data are read back, the ECC calculates the parity on them and compares it to the previously stored parity value. If a parity mismatch occurs, there are two possible outcomes: • Single-bit error has occurred and has been automatically corrected on read-back • Double-bit error has occurred and the read data are not changed Single-bit error occurrence can be identified by the state of the ECCSBEIF (IFS6[12]) bit. An interrupt can be generated when the corresponding interrupt enable bit is set, ECCSBEIE (IEC6[12]). The ECCSTATL register contains the parity information for single-bit errors. The SECOUT[7:0] bits field contains the expected calculated SEC parity and the SECIN[7:0] bits contain the actual value from a Flash read opera- tion. The SECSYNDx bits (ECCSTATH[7:0]) indicate the bit position of the single-bit error within the 48-bit pair of instruction words. When no error is present, SECINx equals SECOUTx and SECSYNDx is zero. Double-bit error occurrences generate a generic hard trap and set the ECCDBE (INTCON4[1]) bit. If no Inter- rupt Service Routine is implemented for the hard trap, a device Reset will also occur. The ECCSTATH register contains double-bit error status information. The DEDOUT bit is the expected calculated Dual Bit Error Detection (DED) parity and DEDIN is the actual value from a Flash read operation. When no error is present, DEDIN equals DEDOUT. 6.4.1 ECC FAULT INJECTION To test Fault handling, an ECC error can be generated. Both single and double-bit errors can be generated in both the read and write data paths. Read path Fault injection first reads the Flash data and then modifies them prior to entering the ECC logic. Write path Fault injection modifies the actual data prior to them being written into the target Flash and will cause an ECC error on a subsequent Flash read. The following procedure is used to inject a Fault: 1. Load the Flash target address into the ECCADDR register. 2. Select 1st Fault bit determined by the FLT1PTRx (ECCCONH[7:0]) bits. The target bit is inverted to create the Fault. 3. If a double Fault is desired, select the 2nd Fault bit determined by the FLT2PTRx (ECCCONH[15:8]) bits; otherwise, set to all ‘1’s. 4. Write the NVMKEY unlock sequence (see Section 6.3 “Control Registers”). 5. Enable the ECC Fault injection logic by setting the FLTINJ bit (ECCCONL[0]). 6. Perform a read or write to the Flash target address. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |