pbuf: the old block 301 is a bad block, but ignore it for now.
pbuf: the old block 301 is a bad block, but ignore it for now.pbuf: the old block 302 is a bad block, but ignore it for now.
pbuf: the old block 302 is a bad block, but ignore it for now.pbuf: can't load page from flash ! fs : can't get buffer when read obj.
I found this problem is happend when func uffs_BufLoadPhyData() is called, and func uffs_FlashReadPage() returns an error.
I tested more than 2000 devices, and The problem was found in 8 devices.
Ricky, can you help me why this problem happend? What should I do to fix this problem?
The uffs's version is uffs-1.3.5, and uses UFFS_ECC_SOFT.
My config.h is as follows:
#define UFFS_MAX_PAGE_SIZE 2048
#define UFFS_MAX_SPARE_SIZE ((UFFS_MAX_PAGE_SIZE / 256) * 8)
#define UFFS_MAX_ECC_SIZE ((UFFS_MAX_PAGE_SIZE / 256) * 5)
#define MAX_CACHED_BLOCK_INFO 15
#define MAX_PAGE_BUFFERS 40
#define CLONE_BUFFERS_THRESHOLD 2
#define MAX_SPARE_BUFFERS 5
#define MAX_DIRTY_PAGES_IN_A_BLOCK 32
#define MAX_DIRTY_BUF_GROUPS 3
#define CONFIG_ENABLE_UFFS_DEBUG_MSG
#define CONFIG_USE_GLOBAL_FS_LOCK
//#define CONFIG_USE_PER_DEVICE_LOCK
#define CONFIG_USE_STATIC_MEMORY_ALLOCATOR 1
#define CONFIG_USE_SYSTEM_MEMORY_ALLOCATOR 0
#define CONFIG_FLUSH_BUF_AFTER_WRITE
//#define CONFIG_UFFS_AUTO_LAYOUT_USE_MTD_SCHEME
#define MAX_OBJECT_HANDLE 50
#define FD_SIGNATURE_SHIFT 6
#define MAX_DIR_HANDLE 10
#define MINIMUN_ERASED_BLOCK 2
#define CONFIG_CHANGE_MODIFY_TIME
#define CONFIG_ENABLE_BAD_BLOCK_VERIFY
#define CONFIG_ERASE_BLOCK_BEFORE_MARK_BAD
// #define CONFIG_PAGE_WRITE_VERIFY
#define CONFIG_BAD_BLOCK_POLICY_STRICT
#define CONFIG_ENABLE_PAGE_DATA_CRC