1.1.4.4.8 DRV_NAND_FLASH_FeatureSet Function

C

bool DRV_NAND_FLASH_FeatureSet(const DRV_HANDLE handle, uint8_t *featureData, uint8_t featureDataSize, uint8_t featureAddress)

Summary

Enables or disables target specific features.

Description

This routine enables or disables target specific features to NAND Flash.

Preconditions

The DRV_NAND_FLASH_Open() routine must have been called for the specified NAND FLASH driver instance.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open routine
featureDataPointer to source buffer containing subfeature data to be programmed into NAND Flash
featureDataSizeTotal number of subfeature data bytes to be written
featureAddressSpecific feature address to be send after command cycle.

Returns

true - If specific feature is enabled or disabled successfully to the flash

false - If invalid handle

Example

i.e. Disable NAND Flash ECC controller if NAND Flash supports internal ECC controller
#define NAND_FLASH_TARGET_DISABLE_INTERNAL_ECC 0x90
uint8_t featureData[4] = {0, 0, 0, 0};
    DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open
    
    if (DRV_NAND_FLASH_FeatureSet(handle, featureData, sizeof(featureData), NAND_FLASH_TARGET_DISABLE_INTERNAL_ECC))
    {
        // Flash internal ECC controller is disabled
    }

Remarks

This routine will block for hardware access.