We've suddenly got this bizarre behavior. We've got an ATmega128
that controls our robot, and drives a brushless motor. It's been
working very well, but suddenly there's a strange roughness in the
BLDC at low speeds.
However, a previous version of the code works fine.
The only difference we've been able to detect is that one of the 3
PWM outputs is going from 0 to 2.5 V, rather than 0 to 5V (the
other two go from 0 to 5V). I've disconnected the PWMs from the
half bridges to ensure that the pin isn't being brought down by an
excessive load, but nothing changes. My first thought was that the
'128 was damaged, but older firmware doesn't exhibit this behavior.
Since the PWM outputs drive an IR MGD, I don't think the low output
is causing the problem, but it may be a symptom of the problem.
What (firmware) could cause an unloaded PWM output pin to drive at
2.5 V instead of 5?