<< Previous | Next >>

nf_readPage

int nf_readPage( nf_device * dev, long buffer, long page );

Description

Reads data from the specified NAND flash device and page to the specified buffer in xmem. Note that in the case of most error results at least some of the NAND flash page's content has been read into the specified buffer. Although the buffer content must be considered unreliable, it can sometimes be useful for inspecting page content in "bad" blocks.

Parameters

dev
Pointer to an initialized nf_device structure

buffer
Physical address of the xmem buffer to read data into

page
Specifies the zero-based number of a NAND flash page to be read, relative to the first "good" page's number.

Return value

 0: Success, or the first error result encountered
-1: NAND flash device is busy
-2: Block check time out error
-3: Page is in a bad block
-4: Page read time out error
-5: Uncorrectable data or ECC error

Library

NFLASH.LIB (This function was introduced in Dynamic C 9.01)

See Also

CalculateECC256, ChkCorrectECC256, xCalculateECC256, xChkCorrectECC256


Dynamic C Functions << Previous | Next >> rabbit.com