I write a library for L298p and L298n(GitHub - leyap/LispMotor: L298x arduino library), both driver board have 6pin: int1, int2, int3, int4, enA, enB, I connect 2 pwm pin of arduino (Uno 5,6) to enA and enB of L298x for control speed, a 12V battery power L298x and arduino powered by L298x 5V output pin, both can control int1, int2, int3, int4 to change direction, but L298p can't work, , only L298n can change speed by pwm. I tried use another battery power arduino and L298p use a 12V battery, it works!. I don't know why?
Well neither do we.
You'll need to give as much detail as possible of the two setups to help track this down.
Both use the same code?
finally I solved it
So what was the issue?