Hi, I would like to use 3 PWM pins on the udoo neo but I can't find how to configure the pwm (duty cycle and frequency). Are there some librairies with functions for configurating PWM or should I use the register to configure the PWM? Can someone explain me how to configure PWM? Thanks
Hello, I hope this help http://www.udoo.org/docs-neo/Debugging_&_Troubleshooting/Arduino_PWM_Issue.html " Arduino PWM Issue There is a little change to use PWM on M4 sketches. Don't need to declare pinMode() for PWM "
On the Linux side you have 2 PWM available which you can configure. http://www.udoo.org/docs-neo/Hardware_&_Accessories/PWM.html On the Arduino side all I know is the standard pwm analogwrite option. Perhaps the Arduino PWM setup commands would work. If you for example look at this Arduino page https://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM I don't know how to do the other more complex pwm examples on the M4.
Pwm_2 and pwm_6. You have to activate them according this manual (using Udoobuntu) https://www.udoo.org/docs-neo/Hardware_&_Accessories/PWM.html
Thank you @waltervl I used android os in my udoo neo board and it is very stressful for me.so I have some question (1) How do you say that there is only two PWM used on the Linux side? according to this page https://www.udoo.org/docs-neo/Hardware_&_Accessories/GPIO.html there is multiple piles mention an external bank (2) By following this link https://www.udoo.org/docs-neo/Hardware_&_Accessories/PWM.html I set only pwmchip0 & pwmchip1 and those link show only how to set pwm0 but I do not understand how to set pwm2 and pwm6 Ex: echo 1000000 > /sys/class/pwm/pwmchip0/pwm2/period (/system/bin/sh: can't create /sys/class/pwm/pwmchip0/pwm2/period: No such file or directory) (3) Are there any changes that must be done in dtsi file for use PWM (a9 code)? (4)which are the pin numbers support pwm2 and pwm6?
The rest of pwm is assigned to the M4 as stated in the documentation. It is pwm_5 and not 6 btw. There are also multiple pwmchips each serving several pwm pins so it is a combination. But no documentation on that other than the big resource file of freescale/nxp. I found a topic with an helpfully link to a GitHub blog entry, last topic. https://www.udoo.org/forum/threads/access-pwm-1-6-from-a9.3509/