Help determining EKF Failsafe cause

I’ve seen this happen a couple of times now. The quad seems to make several fast, uncommanded attitude changes. Almost seemed like it was switching between two IMUs, one that was correct and one that was tilted forward instead of being level.

This happened near the end of the flight before the motor stop switch was hit (because it was flying away). It was leaning in the opposite direction from what I was doing on the sticks. At the end the quad was heading north away from me and I was pulling back toward myself.

This a small 250 sized quad flying with a largish 5Ah 4s battery. Using a pixhawk lite that is hard mounted to the frame. It flies pretty well normally, pretty stable and everything, this is really the only issue we’ve had. Running v3.4.5.

The log showed increased vibrations at the end but the pixhawk board was still secure on the board afterwards so I don’t think it was a hardware error causing the vibrations. The LogAnalyzer came up with errors on the compass and imu, but I’m wondering why it flew fine for the first few minutes and what changed to make it go nuts. It’s somewhat possible that the compass came loose in flight but I don’t know how that would cause the issue we saw.

45.BIN (2.4 MB)