udoo neo PWM configuration

Discussion in 'UDOO NEO' started by qbot, May 20, 2016.

  1. qbot

    qbot New Member

    Joined:
    May 20, 2016
    Messages:
    2
    Likes Received:
    0
    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
     
  2. JackSilb

    JackSilb Active Member

    Joined:
    Nov 3, 2015
    Messages:
    100
    Likes Received:
    32
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
    Last edited: May 22, 2016
    Andrea Rovai likes this.
  4. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    26
    Likes Received:
    0
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
    Because that issue (Don't need to declare pinMode() for PWM in arduino sketch) has been solved.
     
  6. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    26
    Likes Received:
    0
    @waltervl which 2 pwm pins available on Linux side?
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
  8. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    26
    Likes Received:
    0
    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?
     
  9. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539
    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/
     
    hiten likes this.
  10. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    26
    Likes Received:
    0
    Thank you so much now finally you clear my doubts
     
  11. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,136
    Likes Received:
    539

Share This Page