eclipse-threadx / levelx

Eclipse ThreadX - LevelX Provides Flash Wear Leveling for FileX and Stand Alone purposes.
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/levelx/index.md
MIT License
102 stars 61 forks source link

The problem of levelX's block recovery of nand flash #8

Closed aod-ad closed 3 years ago

aod-ad commented 3 years ago

UINT _lx_nand_flash_block_reclaim(LX_NAND_FLASH *nand_flash) { ... if (obsolete_pages == nand_flash->lx_nand_flash_pages_per_block) ... }

obsolete_pages cannot exceed (nand_flash->lx_nand_flash_pages_per_block-1), Because the first page is used as the mapping list.

xiuwencai commented 3 years ago

Thank you for the feedback, this is a bug in the code. We will fix it.

bhnaphade commented 3 years ago

This is fixed in Azure RTOS release 6.1.8