Does anybody know if littleFS actually takes care of the bad block management for the Flash memory device? We noticed the driver for the winbond part actually wrote the code for bad block management, which can be found in this directory : “platforms > nuttx > NuttX > nuttx > drivers > mtd > w25n.c” , from the repo link above. But the driver for the MX35 does not include bad block management functions. Does this mean bad block management is something the user has to manually write by themself to support the proper operation of the part?
First, BE VERY CARREFULL when you make erase blocks for the first time, it will delete all the bad blocks table shipped from the manufacturer (cf p 39/51 section 11-1 of datasheet: please read out the bad block information before any erase operation since the bad block marks may be cleared by any erase operation.).
I made this mistake and erased all the shipped table for my w25n01gv on kakute h7 mini v1.3 board. And now the chip has 0 bad block! So avoid to use mtd erase or equivalent command for testing unless you know what you do.
I see that the MX35LF1GE4AB has already bad blocks management when ECC is enabled, so just follow the instructions : check the bad block marks and avoid using the bad blocks.
For using it like with PX4 like the px4 fmu-v6c board i need to modify some files:
Appreciate your response, your advice, and for sharing your project as well! We’ll keep in mind and be careful when formatting the part for the first time. Sorry to hear about your experience of losing the manufacturing default bad blocks.