Mac Ventura 13.2, Apple Silicon
Arduino IDE: 2.1.0
Adafruit Metro M4 Express/Samd51
Hello,
I am unable to set PWM resolution for a samd51 device. The Adafruit code does support the analogWriteResolution function and maps 8, 12 and 16 bit accordingly but the analogWrite() function value is apparently truncates to 8 bit for the SAMd-51. Arduino reference says the analogWriteResolution function is for the Zero, Due and MKR family, Does this not also apply for the samd family?
.../Library/Arduino15/packages/adafruit/hardware/samd/1.7.11/cores/arduino/writing_analog.c
Thanks
Mark
unable to change pwm resolution on metro M4
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: unable to change pwm resolution on metro M4
Mark,
Take a look at the Adafruit ZeroTimer library. It supports the M4 and is mostly used internally.
Take a look at the Adafruit ZeroTimer library. It supports the M4 and is mostly used internally.
- marklb
- Posts: 16
- Joined: Mon Jun 24, 2019 3:49 pm
Re: unable to change pwm resolution on metro M4
Yep that looks like it will work for my needs. Thanks for the tip.
Mark
Mark
Please be positive and constructive with your questions and comments.