Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 11/27/2024
Public
Document Table of Contents

5.3.6.9.3. NAND Device Error

Operations like read/write/erase can occur at any time and in those scenarios the NAND Flash controller can get information from the device with the fail condition (in parallel to the command engine waiting for the operation to complete).

The NAND Flash controller provides a mechanism to configure which part of read status word is interpreted as NAND Flash device error information. This mechanism is based on reading the device status after an operation (through read status command), masking this through an AND operation and comparing this with a specific value. The command device status checking mechanism is selected by clearing rb_enable bit in the rdst_ctrl_0 (0x0410) register and configuring the error_mask and error_value fields in the rdst_ctrl_1 (0x0414) registers. With this configuration, after every operation, the controller reads the device status and applies the AND operation with error_mask field and if the resulting value matches error_value field, then the controller interprets this as a device error. The controller does not apply any implicit check, so host needs to unmask all the status bits that need to be checked to detect the error condition. The device error is only probed when the command interface is used to detect device status.

For the multi-plane operations, the controller returns status independently for each plane. The plane statuses can be found on the pl_device_error field of the last operation status. The host can check latest operation status associated with the selected thread by reading the cmd_status (0x0014) register. This register contains command status from thread selected by value of the cmd_status_ptr (0x0010) register.

Refer to the Status Polling Configuration section for additional information related to get the status of the NAND Flash device.