ELM
Table 7-169. ELM Processing Completion for Continuous Mode (continued)
Step
Register/ Bit Field / Programming Model
Value
endif
Clear the corresponding i interrupt.
ELM_IRQSTATUS[i] LOC_VALID_i
0x1
A new syndrome polynomial can be processed after the end of processing
(ELM_SYNDROME_FRAGMENT_6_i[16] SYNDROME_VALID = 0x0) and after the exit status register
check (ELM_LOCATION_STATUS_i).
Table 7-170. ELM Processing Completion for Page Mode
Step
Register/ Bit Field / Programming Model
Value
Wait until process is complete for syndrome
polynomial i:
Wait until the ELM_IRQ interrupt is generated, or
poll the status register.
Wait for page completed interrupt:
ELM_IRQSTATUS[8] PAGE_VALID
0x1
All error locations are valid.
Repeat the following actions the necessary number of times. That is, once for each valid defined block in the page.
Read the process exit status.
ELM_LOCATION_STATUS_i[8] ECC_CORRECTABLE
if the process fails (too many errors)
ELM_LOCATION_STATUS_i[8] ECC_CORRECTABLE
0x0
It is software dependant.
else (process successful, the engine completes)
ELM_LOCATION_STATUS_i[8] ECC_CORRECTABLE
0x1
Read the number of errors.
ELM_LOCATION_STATUS_i[4:0] ECC_NB_ERRORS
Read the error-location bit addresses for syndrome
ELM_ERROR_LOCATION_0_i[12:0]
polynomial i of the ECC_NB_ERRORS first
ECC_ERROR_LOCATION
registers.
ELM_ERROR_LOCATION_1_i[12:0]
ECC_ERROR_LOCATION
...
ELM_ERROR_LOCATION_15_i[12:0]
ECC_ERROR_LOCATION
endif
End Repeat
Clear the ELM_IRQSTATUS register.
ELM_IRQSTATUS
0x1FF
Next page can be correctly processed after a page is fully processed, when all tagged polynomials have
been processed (ELM_IRQSTATUS[i] LOC_VALID_i = 0x1 for all syndrome polynomials i used in the
page).
7.4.4.2
Use Case: ELM Used in Continuous Mode
In this example, the ELM module is programmed for an 8-bit error-correction capability in continuous
mode. After reading a 528-byte NAND flash sector (512B data plus 16B spare area) with a 16-bit
interface, a non-zero polynomial syndrome is reported from the GPMC (Polynomial syndrome 0 is used in
the ELM):
•
P = 0x0A16ABE115E44F767BFB0D0980
Table 7-171. Use Case: Continuous Mode
Step
Register/ Bit Field / Programming Model
Value
Resets the module
ELM_SYSCONFIG[1] SOFTRESET
0x1
Wait until reset is done.
ELM_SYSSTATUS[0] RESETDONE
0x1
Configure the slave interface power management:
ELM_SYSCONFIG[4:3] SIDLEMODE
0x2
Smart idle is used.
482 Memory Subsystem
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated