l298n heating

I'm using the example of stepper in Arduino connected to a L298N. My stepper has no load connected to it and when I run the program it works, but the L298N is heating too much and my bench power supply is reading more than 3 Amp of output. Why is it heating up? and what can I do to stop that big current consumption?

The ancient, inefficient and weak L298 cannot handle your motors.

Pololu has a good selection of modern, efficient motor drivers.

Post a link to the motor data sheet or product page for help with motor driver selection.

That is one of the problems, I don't have the information of the stepper, but I have been using the A4988 and It work fine with it, which is strange.

javosegurag:
but I have been using the A4988 and It work fine with it, which is strange.

What is even more strange is why you are trying to use an L298 if you have an A4988.

...R
Stepper Motor Basics
Simple Stepper Code