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
Solved! Go to Solution.
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
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