Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 7/19/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.3.7.5. ECC Enabling

When enabling ECC, it is necessary to set the appropriate correction level depending of the page size available (main + spare area) on the device. The following steps need to be followed to configure the ECC engine correctly:

  1. Set the ecc_enable bit in the ecc_config_0 (0x0428) register to enable ECC engine. If enabled, the following fields need to be programmed accordingly.
  2. The corr_str field in the ecc_config_0 (0x0428) register needs to be programmed with the required correction ability value. The value of this field should be coded as shown in the "ECC Correction Capability Encoding" table in the ECC Engine Functionality section. If programmed value is not supported by the ECC engine, the lowest supported correction ability is selected.
  3. The sector_size field in the transfer_cfg_1 (0x0404) register needs to be programmed with the ECC sector size value.Value programmed in this field is used to parameterize size for all ECC sectors except the last one.
  4. The last_sector_size field in the transfer_cfg_1 (0x0404) register needs to be programmed with the ECC sector size value. Value programmed in this field is used to parameterize size for the last ECC sector. If control data mechanism is used, see the control data mechanism section to get the correct value to be configured in this field.
  5. The scrambler_en bit in the ecc_config_0 (0x0428) register needs to be set if the embedded scrambler must be enabled.
  6. Program the skip_bytes and marker fields in the skip_bytes_conf (0x100c) register if the software intends to preserve the spare area marker.
  7. Set the erase_det_en bit in the ecc_config_0 (0x0428) register and program the erase_det_lvl in the ecc_config_1 (0x042c) register if erased pages detection mechanism is used.