I hope you can help.
I've been working on a simple PWM-motor control (see attached schematic).
Everything worked until I introduced a small piece of code which is supposed to short the motor terminals via T1 when I want it stopped.
I've replaced T1 with an LED going from MC33152.7 to +BATT. It is supposed to be on when the PWM is off and off when the PWM is on (on when motor is stopped, off when the motor is running).
But when I push the trigger button, I can see that the LED doesn't go off. Instead, the LED flashes in the same frequency as the PWM, which is really weird, considering that T1 is controlled via PB.1 which is on a completely different port than the PWM-pin (PA.7).
What might be the cause of this?
Code removed since the general question is solved.