Motor not working with L298

Hi. I'm working on a automatic watering system, and everything it's ok but the engine. When I connect it to the solar panel without the driver, it works perfectly, but when I use the driver, the engines starts and stops almost inmediately. It's like the power is cut off, and back again in somekind of loop. I don't understand what's going on.

Help me please

Thank you very much, and sorry if I made any mistake

Technical data:

Driver: L298 Power source: Solar pannel 18V 556 mA directly connected to the driver Engine: 6V 220mA

What is the voltage output of your panel when you perform this test?
What happens to that voltage during the test?
What voltage is supplied to the motor during the test?

As I understand, the L298 has a considerable voltage drop that often causes grief like you are experiencing.
You might think about a better motor driver.
And we do not know if your panel is up to the task.

Post a link to the product page or specifications for the motor. We need to know the stall current for the motor.

The L298 driver is an inefficient antique, and not capable of driving most modern motors. Pololu has a good selection of modern, efficient motor drivers.

The stall current of the motor will be much more than the solar panel can handle. Time to rethink...