I have an Frigidaire Affinity washer that runs perfectly fine, (all the way through wash & rinse cycles), when empty, but as soon as you put even a small load of clothes in it, it stops working halfway through the wash cycle, leaving a tub half full of water and very wet clothes. I noticed that when this happens the timer resets to the start of the wash cycle, and then will shut off after about 15 minutes. What could be causing this sort of behavior? The machine is only 4 years old and is all digital.
The machine is not emptying properly for some reason. All washing machines are designed never to spin whilst full of water. The default is either to pause indefinitely or reset the program. It's odd that the machine is fine when empty though.
I would still do the following before calling out a repair company.
The most common cause is a failed timer. Most machines use an electromechanical unit that is prone to breaking. Hard to fix and is almost always just replaced.
You say that the machine is "all digital" but the valves are mechanical, and many digital machines operate physical relays.
Even if it is out of warranty, it may be worth a call to service since total failure should not occur on a four year old machine (and your problem is effectively total failure). Occasionally they will cover the cost of the part if not the service call.