From the description of your problem this can be caused by the pressure switch.
The error F21 is a long drain error and usually the drain pump is not working or the filter is clogged.
You say the pump is working and the hoses are clear but I'd still recommend you check the drain filter for this problem. The image below shows how to access and check the drain filter.
If the drain pump filter is clear and the drain pump does actually drain the water out then the pressure switch must not be seeing the water drain out. Suds can cause this problem and be sure you're using the HE detergent. See the 1st image for accessing the drain pump.
You can access the pressure switch and with the water drained out you can remove the plastic hose from the switch and blow towards the tub. It should blow freely and not be restricted. See the 2nd image for a picture and location of the pressure switch.
See if these checks help resolve this problem but if not then submit another question with any additional details for further assistance with this problem.