To detect stalling, you could use something like this:
power input is on the left, the right goes to the PWM transistor and the H bridge.
R1 has the value 1/s Ω where s is the stall current of the motor in amps.
R2 should be about 1k, and R3, 10k.
While the current through R1 is...