how does NFC_LDD map pages to blocks/pages?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how does NFC_LDD map pages to blocks/pages?

Jump to solution
859 Views
bowerymarc
Contributor V

The WritePages and ReadPages API in NFC_LDD only asks for page number, and not block number.  But erase blocks wants blocks.  I need to know the mapping of pages to blocks for this to work, otherwise how can I know which page to erase and then write?

Is is simply blockNumber x NAND_FLASH_PAGE_SIZE + pageNumber?

or blockNumber x NAND_FLASH_PHY_PAGE_SIZE + pageNumber?

thanks,

Marc

Labels (1)
0 Kudos
Reply
1 Solution
706 Views
vfilip
NXP Employee
NXP Employee

Hello,

please check the details from our development team below. Anyway we will improve the documentation or will add some #define for next release:

These symbols are defined in NFC componenets header file:

#define NAND_FLASH_PAGE_COUNT                0xYYU
#define NAND_FLASH_BLOCK_COUNT               0xYYU

You can define new symbol  NAND_FLASH_BLOCK_PAGE_COUNT             

#define  NAND_FLASH_BLOCK_PAGE_COUNT        (NAND_FLASH_PAGE_COUNT  / NAND_FLASH_BLOCK_COUNT )

and use folowing macro for page address to block address mapping:

#define GetBlockAddressFromPageAddress(_PageAddress_)     (_PageAddress_  /  NAND_FLASH_BLOCK_PAGE_COUNT)

Best regards

Vojtech Filip

Processor Expert Support Team

View solution in original post

0 Kudos
Reply
1 Reply
707 Views
vfilip
NXP Employee
NXP Employee

Hello,

please check the details from our development team below. Anyway we will improve the documentation or will add some #define for next release:

These symbols are defined in NFC componenets header file:

#define NAND_FLASH_PAGE_COUNT                0xYYU
#define NAND_FLASH_BLOCK_COUNT               0xYYU

You can define new symbol  NAND_FLASH_BLOCK_PAGE_COUNT             

#define  NAND_FLASH_BLOCK_PAGE_COUNT        (NAND_FLASH_PAGE_COUNT  / NAND_FLASH_BLOCK_COUNT )

and use folowing macro for page address to block address mapping:

#define GetBlockAddressFromPageAddress(_PageAddress_)     (_PageAddress_  /  NAND_FLASH_BLOCK_PAGE_COUNT)

Best regards

Vojtech Filip

Processor Expert Support Team

0 Kudos
Reply