I'm sorry for bumping this old thread, but when I was searching for similar threads on this forum I found many people with the same problem but the solution was never there. So I'm posting the final result and I hope it be usefull in the future for someone who is trying to get a L298 to work with a RPI:
I connected pins 11 and 12 to ENa and ENb of Hbridge to use PWM (that I emulated in Python). If I only needed to steer forward, just connect Ground to IN2 and IN4 so the DC motors kept moving one way. Because I wanted them to reverse also, I´ve connected pins 13 to IN1, 15 to IN2, 16 to IN4 and 18 to IN3. This HBridge I'm using accepts 2V3 as HIGH and less than 1V5 as LOW, so if I set pin 13 and 18 as HIGH and 15 and 16 as LOW the motors rotate clockwise. The opposite setting, like 13LOW and 15HIGH rotates the motorA the other way. The HBridge has protecting diods, so I didn't use any resistors between GPIO and HBridge...
I didn't connected the Raspberry Pi Ground to the L298N ground but it worked anyway. In a similar thread, someone connected the L298N 5V output to power the Pi through the microUSB.
The dc motors I used work between 3V and 6V and I'm using a 5V Battery. It seems the L298 drops a couple of volts to the motors, so it only reads 3V3 which barely moves the motors... I need to try with 7,5V battery or better dc motors