Skip to content

Cannot get PWM Blinky to work on an Arduino Due board - created new arduino_due.overlay #90350

Closed Answered by Gerriko
Gerriko asked this question in Q&A
Discussion options

You must be logged in to vote

It turns out the Arduino docs for the Due is not strictly correct.

There is no PWML1 linked to D13 and hardware PWM is not available for all pins 2 to 13.

Arduino must have a software implementation for some pins.
https://content.arduino.cc/assets/A000056-full-pinout.pdf

Trawling through ATSAM3X8E data confirms this.

Anyway I got it working using D9/PC21 for my test. The secret sauce to learning which pins will work etc and getting the correct detail for pinmux is in: #include <dt-bindings/pinctrl/sam3XXe-pinctrl.h>

Here is the overlay I used:


/*
 * Devicetree overlay for the arduino_due in the pwm_blinky application.
 *
 */

#include <zephyr/dt-bindings/pwm/pwm.h>
#include <dt-bindings/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Gerriko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant