hi All, some ArduPilot users have reported parameter corruption on Pixracer after a reboot. I have reproduced it on my board. I have also reproduced FRAM write failures using "mtd rwtest" but only when the ms5611 driver is running. I have also reproduced it on px4 master, so it is not ardupilot specific
for anyone who is interested, the way I reproduced it in px4 master is
1) replace rcS with just "sercon" and "nshterm /dev/ttyACM0 &", so I get a convenient nsh shell on usb on startup (I don't have a debug cable setup)
2) on boot, connect with terminal program on usb, run "uorb start" followed by "mtd start /fs/mtd", followed by "mtd rwtest /fs/mtd"
I find that rwtest is reliable. I then start ms5611 using "ms5611 start"
and after that mtd rwtest /fs/mtd is no longer reliable. It fails some runs
this indicates a likely failure of communication with the FRAM
interestingly, it is failing in a write test, like this: "mtd: write failed"
that indicates the FRAM drivers knows it fails the write, it isn't just silent corruption
I also noticed that px4 is not running the mtd rwtest on startup.
@tridge I have run into problems in the past with fs/mtd/params being corrupted on cycling power (likely due to a write being interrupted on power-down), but I've cycled power on my PixRacer dozens of times in the past week without encountering any problems running PX4 master.