Hello.
I report a information of problem between XIAO PWM out and Arduino Servo Library.
I tried to use both PWM output and Arduino Servo Library for SAMD on Seeeduino XIAO, but pin6 and pin7 of analogWrite() didn’t work.
I solved it by rewriting TC4 to TC5 in ServoTimers.h of Arduino Servo Library for SAMD in order to change Timer/Counter.
Arduino IDE version 1.8.12
Seeed SAMD Boards version 1.7.2
rewritted ServoTimers.h for SAMD
1 Like
Hi there:
thank for your feedback,we has been test it.and it regular work at samd 1.7.2.there exist test code at
this is hardware connection:
Hello, Hansen.
Thank you for your feedback.
The problem is happen when using both Servo Library and pin6,7 PWM out.
(PWM outputs other than pins 6,7 work fine.)
It seems Timer/Counter is conflict between analogWrite and Servo Library for SAMD,
so I solved to change TC4 to TC5 on ServoTimers.h.
Test code
It’s result for test code.
(All I/O pin connect to green LEDs.)

Hi there:
thanks, we got your feedback. we will update the lib.
1 Like