SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
The write-posting mode is selected when the GPMC_PREFETCH_CONFIG1[0] ACCESSMODE bit is set.
The NAND software driver must issue the correct address pointer initialization command (page program) before the engine can start writing data into the NAND memory device. The engine starts when the GPMC_PREFETCH_CONTROL[0] STARTENGINE bit is set to 1. The STARTENGINE bit clears automatically when posting completes. When all data have been written to the NAND memory device, the NAND software driver must issue the second cycle program command and monitor the status for programming process completion (adding ECC handling, if required).
If used, the ECC calculator engine must be started (configured, reset, and enabled) before the posting engine is started so that the ECC parities are calculated properly on all data written by the prefetch engine to the associated chip-select.
In write-posting mode, the GPMC_PREFETCH_CONFIG1[3] SYNCHROMODE bit must be cleared so that posting starts as soon as the STARTENGINE bit is set and the FIFO is not empty.
If the STARTENGINE bit is set after the NAND address phase (page program command), the STARTENGINE setting is effective only after the actual NAND command completion. To prevent GPMC stall during this NAND command phase, set the STARTENGINE bit field before the NAND address completion and ensure that the associated DMA channel is enabled after the NAND address phase.
The posting engine issues a write request when valid data are available from the FIFO and until the programmed GPMC_PREFETCH_CONFIG2[13-0] TRANSFERCOUNT accesses are complete.
The STARTENGINE bit clears automatically when posting completes. When all data have been written to the NAND memory device, the NAND software driver must issue the second cycle program command and monitor the status for programming process completion. The closing program command phase must be issued only when the full NAND page has been written into the NAND flash write buffer, including the spare area data and the ECC parities, if used.
Table 12-179 describes the write-posting configuration.
Bit Field | Register | Value | Comments |
---|---|---|---|
STARTENGINE | GPMC_PREFETCH_CONTROL[0] | 0 | Write-posting engine can be configured only if STARTENGINE is set to 0. |
ENGINECSSELECTOR | GPMC_PREFETCH_CONFIG1[26-24] | 0 to 3 | Selects the chip-select associated with a NAND device where the prefetch engine is active |
ACCESSMODE | GPMC_PREFETCH_CONFIG1[0] | 1 | Selects write-posting mode |
FIFOTHRESHOLD | GPMC_PREFETCH_CONFIG1[14-8] | Selects the maximum number of bytes read or written by the host on DMA or interrupt request | |
TRANSFERCOUNT | GPMC_PREFETCH_CONFIG2[13-0] | Selects the number of bytes to be read or written by the engine from/to the selected chip-select | |
SYNCHROMODE | GPMC_PREFETCH_CONFIG1[3] | 0 | Engine starts the access to chip-select as soon as STARTENGINE is set. |
ENABLEOPTIMIZEDACCESS | GPMC_PREFETCH_CONFIG1[27] | 0/1 | See Section 12.3.4.3.11.4.6, Optimizing NAND Access Using the Prefetch and Write-Posting Engine. |
CYCLEOPTIMIZATION | GPMC_PREFETCH_CONFIG1[30-28] | ||
ENABLEENGINE | GPMC_PREFETCH_CONFIG1[7] | 1 | Engine enabled |
STARTENGINE | GPMC_PREFETCH_CONTROL[0] | 1 | Starts the prefetch engine |