hmmm...
AFM is Airflow meter. CAS is Crank angle sensor.
Reseting the ECU should only need, disconnect, pump the brake for 30secs, reconnect but you can leave for longer or overnite etc if you wish.
Just check for dirty or bent contacts etc...
even try jiggling wiring while it's running too.
Try diconnecting each coil 1 by 1 and see if it stops it. It will only be running on 5 cylinders at a time but if one of your coils is goosed the chugging shouldn't happen when disconnected.