Cannot attach servo on some GPIOs

Post here first, or if you can't find a relevant section!
ABOSTM
Posts: 60
Joined: Wed Jan 08, 2020 8:40 am
Answers: 7

Re: Cannot attach servo on some GPIOs

Post by ABOSTM »

Concerning issue with GPIO, I found a limitation in Servo.h that limit internal pin number used to 0..63.
But in your case, pin number PA0 is 103 and thus out of range.
I proposed a patch to extended usable pin number to 255.
See Pull Request:
https://github.com/stm32duino/Arduino_C ... /889/files
Step73
Posts: 27
Joined: Tue Jan 14, 2020 2:55 pm

Re: Cannot attach servo on some GPIOs

Post by Step73 »

Good catch! I'm going to patch the library manually to check if it fixes. Thanks.
User avatar
fpiSTM
Posts: 1754
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Cannot attach servo on some GPIOs

Post by fpiSTM »

@Step73
I've merged the fix made by @ABOSTM, here you will find the wiki made by him about the Servo:
https://github.com/stm32duino/wiki/wiki/Servo-library
Post Reply

Return to “General discussion”