STM32F1 FSMC

Started by tha, December 29, 2020, 08:15:46 AM

Previous topic - Next topic

tha

ECC result registers 2/3 (FSMC_ECCR2/3)

Address offset: 0xA000 0000 + 0x54 + 0x20 * (x – 1), x = 2 or 3
Reset value: 0x0000 0000

registers เหล่านี้บรรจุ the current error correction code value ที่คำนวณโดย the ECC computation modules ของ the FSMC controller (one module ต่อ NAND Flash memory bank). เมื่อ the CPU อ่าน the data จาก a NAND Flash memory page ที่ the correct address (อ้างอิงถึง Section 21.6.6: Computation of the error correction code (ECC) in NAND Flash memory), the data อ่านจากหรือเขียนถึง the NAND Flash ถูก processed โดยอัตโนมัติโดย ECC computation module. ที่ the end ของ X bytes read (สอดคล้องกันกับ the ECCPS field ใน the FSMC_PCRx registers), the CPU ต้องอ่าน the computed ECC value จาก the FSMC_ECCx registers, และจากนั้นตรวจสอบว่า computed parity data เหล่านี้เป็นอย่างเดียวกันกับ the parity value ที่บันทึกใน the spare area, เพื่อตัดสินว่า a page ใช้ได้, และ, เพื่อถูกต้องมันถ้าใช้ประโยชน์ได้. The FSMC_ECCRx registers ควรถูกเคลียร์หลังจากได้อ่านแล้วโดยการเซ็ต the ECCEN bit เป็นศูนย์. เพื่อคำนวณ a new data block, the ECCEN bit ต้องถูกเซ็ตเป็นหนึ่ง.



Bits 31:0 ECCx[31:0]: ECC result
field นี้ให้ค่าที่คำนวณโดย the ECC computation logic. Table 135 ต่อจากนี้อธิบายเนื้อหาของฟิลด์บิตเหล่านี้.


tha