[riot-devel] Does the servo driver work on atmegas?
wosym at airsantelmo.com
Tue Sep 1 20:00:09 CEST 2020
I spent quite some time yesterday trying to get a servo working on an
atmega1284p, unfortunately to no avail.
I was wondering if it is even possible at all. The current version of
the PWM peripheral has its resolution limited to 256. I think this
limitation is probably the cause for it not working.
I tried removing the asserts that enforce this limitation, and this
caused the servo to rotate into one direction, but then stop moving
again (I could not get it to rotate in the other direction).
I tried the same servo on a nucleo-board and this worked just fine.
However... only with a resolution way higher than 256. (Because STM32
does not have this limitation)
So I wonder... should atmega be blacklisted for this test, since it
cannot work? And would there maybe be a workaround to this problem? I'm
not that experienced on this matter, so I'm not really sure why the
limitation on this resolution was put in place, but is it possible to
make changes to the peripheral driver so we can increase it?
It's also possible that I'm simply doing something very wrong, and that
it should work without any changes. (hence the reason I asked on this
mailing list instead of opening an issue straight away)
More information about the devel