Access PWM 1-6 from A9

Discussion in 'UDOO NEO' started by maleadt, Feb 21, 2016.

  1. maleadt

    maleadt New Member

    Joined:
    Feb 15, 2016
    Messages:
    8
    Likes Received:
    0
    Hi all,

    I want to PWM 3 (or possibly more) pins from the A9, and according to the pinout there should be 6 PWMs available. However, following the documentation and using the device tree editor to enable the PWM feature, I can only enable PWM 2 and 5.

    How do I enable those other PWM channels?
     
  2. maleadt

    maleadt New Member

    Joined:
    Feb 15, 2016
    Messages:
    8
    Likes Received:
    0
    Also, is there a way to determine which pins /sys/.../pwmchip$X/pwm$Y correspond to?
     
  3. maleadt

    maleadt New Member

    Joined:
    Feb 15, 2016
    Messages:
    8
    Likes Received:
    0
    Looking at imx6sx-udoo-neo-externalpins.dtsi which dtweb ships, PWMs 1 to 6 are defined and available. Is there a reason the web interface only allows access to PWMs 2 and 5?
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    If you edit the /opt/dtweb/public/boards/neo/board.js file you can add the other pwm pins manually. You have to take care of the pin numbering as in the mentioned pinout documentation.
    Then you can use dtweb to set them.

    I do not know why they are not yet listed in dtweb. Perhaps there are some conflicting ports? But if you give it a try we all can benefit of it :)
     
    Andrea Rovai likes this.
  5. maleadt

    maleadt New Member

    Joined:
    Feb 15, 2016
    Messages:
    8
    Likes Received:
    0
    I just want to make sure the pins aren't disabled for a good reason, ie. enabling them in the -dist dt will not blow up my udoo...
     
  6. Francesco

    Francesco Active Member

    Joined:
    Jun 23, 2015
    Messages:
    220
    Likes Received:
    110
    Yes, the good reason is that the SoC has 8 PWMs.
    6 PWMs are assigned to the Arduino core, 2 to Linux.

    If you want to use the other PWMs you must disable the M4 core, or rebuild MQX disabling the PWM capability of Arduino.
    Adding the other PWMs to the device tree (without turning off M4 - with udoom4ctl) you would expect bad behaviours (eg. kernel panics) but the hardware will not blow up.
     
    Andrea Rovai and waltervl like this.
  7. longhongc

    longhongc New Member

    Joined:
    Apr 29, 2019
    Messages:
    1
    Likes Received:
    1
    waltervl likes this.
  8. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580

    Attached Files:

  9. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    37
    Likes Received:
    3
  10. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Why are you running Android OS?
     
  11. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    37
    Likes Received:
    3
    because my project is android based
    like example:- using the android os control board peripherals
     
  12. hiten

    hiten UDOOer

    Joined:
    Dec 9, 2019
    Messages:
    37
    Likes Received:
    3
    waltervl likes this.

Share This Page