Dishwasher won't cycle

when we start the dishwasher it allows water in then stops after about 1 litres(10 seconds).then sits idle.(3 min) then the water is pumped out and it begins to let water in again.there are no leaks/water line in is clear and unblocked. i tried running the dishwasher with the door open and same result.i also was holding the level cap up to see if that was the problem/wasn’t. water is incomming then stops then drains. elements get hot. i’m wondering if it is in the controll panel?

modle#4070800 ser# MM878147B