Open jiri-novotny opened 1 year ago
also internal checks are done in 4B mode, e.g. in _lx_nor_flash_logical_sector_find
if (list_word == LX_NOR_PHYSICAL_SECTOR_FREE)
with
#define LX_NOR_SECTOR_MAPPING_CACHE_ENTRY_MASK 0x7FFFFFFF
#define LX_NOR_SECTOR_MAPPING_CACHE_ENTRY_VALID 0x80000000
#define LX_NOR_PHYSICAL_SECTOR_VALID 0x80000000
#define LX_NOR_PHYSICAL_SECTOR_SUPERCEDED 0x40000000
#define LX_NOR_PHYSICAL_SECTOR_MAPPING_NOT_VALID 0x20000000
#define LX_NOR_LOGICAL_SECTOR_MASK 0x1FFFFFFF
#define LX_NOR_PHYSICAL_SECTOR_FREE 0xFFFFFFFF
this should be solved in PR #23
Provided example assumes sizeof(ULONG) is 4B
when changed to
subsequent write/read test failes