I have a code 5d that comes up once in a while. Its has been followed by F21 which is a drain problem.
The 5d is really an Sd and yes, it and the F21 indicate that the machine is not draining within a prescribed time, 8 minutes.
The most likely problem is something clogging the pump or internal drain line. Clean it out, power up again and you may be fixed.