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
99 stars 59 forks source link

in lx_nand_flash_data_page_copy.c judge NOT SEQUENTIAL #18

Closed EricXue2013 closed 4 months ago

EricXue2013 commented 1 year ago

levelx 6.2.1 in file lx_nand_flash_data_page_copy.c

/ Check if the pages in destination block is still sequential. / if ((destination_page) != (logical_sector + i % nand_flash -> lx_nand_flash_pages_per_block)) { / Mark the block status as non sequential. / dest_block_status |= LX_NAND_BLOCK_STATUS_NON_SEQUENTIAL; }

should be / Check if the pages in destination block is still sequential. / if ( destination_page != ((logical_sector + i )% nand_flash -> lx_nand_flash_pages_per_block)) { / Mark the block status as non sequential. / dest_block_status |= LX_NAND_BLOCK_STATUS_NON_SEQUENTIAL; }

xiuwencai commented 1 year ago

Thank you for reporting the bug. We will fix it.

rahmanih commented 4 months ago

already fixed https://github.com/eclipse-threadx/levelx/blob/24eb7d86926dea748e816dd43f5c5b88875776cc/common/src/lx_nand_flash_data_page_copy.c#L174