IMHO the most important question had not been asked or answered yet: Does the firmware contain ANY code that erases/programs Flash at any time (such as a bootloader, or saving parameters at switch-off) ? If so, (which I strongly suspect), try to test without that code, and review/re-debug that code if necessary. If I learned something in the last 20 years in this business, it's that in 99.9 percent of all cases, the problem sits in front of the keyboard ...
↧