motor driver getting hot + cannot change the motor speed

i have a problem a motor driver FIPSD2M and it`s link

connected with motor and its specs below

and i have 2 roblems
1-i cannot change the motor speed using potentiometer (using potentiometer 100k ohm)
2-the IC L298 is getting hot, is this normal ?(the driver supports 2Amp /phase)

**and below is my arduino code ,i do not know what is the problem **

int pot=A0;

int Ena=10; //enable the driver
int Dir=8; // motor direction
int CLK=9; // motor speed
int val=0;
int mSpeed=0;
void setup()
// put your setup code here, to run once:


void loop()
// put your main code here, to run repeatedly:
analogWrite(CLK ,mSpeed);


It is normal for the driver to get hot.

The L298 won't deliver 2A without overheating and shutting down, and the motor can't handle 2A/phase either. To what value have you set the current limit?

analogWrite(CLK ,mSpeed);

This is not the way to control the speed and it won't work at all. The CLK input commands one step.

You should try using the Accelstepper library.