won't complete rinse cycle

I’ve searched alot of sites and the best I’ve come up with is that it needs a new main board. At $265.00 I’ll buy a new washer first. It does the wash cycle drains then stops and flashes F21. The only thing I can do at that point is unplug set to drain and spin. Setting it to rinse and spin gives me the same fault code. It’s not the cold water valve, I wash with cold water and it’s not the drive because it will agitate and spin. Any help will be greatly appreciated.