CC3D Erase/Save Settings problem - Wizard Mixer Error


Problem found and fixed, so this is a description of the known and fixed issue.

Erase settings fails silently. Save settings from GCS fails (with red X?). Reports say that the setup wizard has a "mixer error" or "mixer save error", probably when trying to save settings.

It is noticeable that, on the firmware page, after pressing OK when doing Erase Settings, the FlightTime re-starts counting with an initial time of about 23 seconds on CC3D's that don't have this problem (ST flash RAM chip) and about 3 seconds on CC3D's that do have this problem (Winbond flash RAM chip).

Technical description of problem and fix:
flashfs_m25p_cfg hard codes CC3D to use 64k erase sectors (the erase size), 64k arenas (like a disk partition), and 256 byte slots (like a disk file). The code iterates through all the sectors in an arena (there is only one) and sends the erase sector command. The wrong erase sector command was used (0x20 = erase 4k sector), so only the first 4k (16 slots of you include slot 0 which is used for the arena header) of each arena was erased. Later, when checking the validity of the arena, like before mounting it, the code would find erased sectors, then used sectors, then more erased sectors, which should not happen and the code knows this would violate code assumptions. It would fail the mount, erase the whole thing and retry, and the retry would fail too. Once the correct erase sector command (0xD8 = erase 64k sector) is coded, it self heals and mounts correctly at the next boot, with no further code changes needed.


CC3D that has a Winbond flash RAM chip






Fix versions

Affects versions