-
I am trying to use the on board LED but the LED remains constantly on. I have even tried turning the LED completely off (0 pulse) but no change. Any ideas as to why it's not working. Here is my arduino_due.overlay:
and here is my example code:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I have narrowed my focus to: The bindings for pwm-leds describes the setup.
I'm struggling to work out how to define my "group of pwm leds" for the due. |
Beta Was this translation helpful? Give feedback.
-
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. 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:
|
Beta Was this translation helpful? Give feedback.
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: