PWM PINS Problem

Discussion in 'UDOO NEO' started by Berk, Apr 14, 2017.

  1. Berk

    Berk New Member

    Joined:
    Nov 22, 2016
    Messages:
    17
    Likes Received:
    5
    I have a problem with accessing PWM pins. I managed them as PWM2 and PWM5 from Device Tree Editor. But, I can not reach them from udoo terminal. I wrote:

    Code:
    sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/export"
    Then, I took from terminal "I/0 Error". How can ı fix this problem ?
    Thank you.
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I am not sure but pwm_2 could be exported with echo 1 > /sys/class/pwm/pwmchip0/export

    This would result in a pwm1 in /sys/class/pwm/pwmchip0

    But it could also be 2 instead of 1 resulting in pwm2. Depends how the count is done.
     
  3. Berk

    Berk New Member

    Joined:
    Nov 22, 2016
    Messages:
    17
    Likes Received:
    5
    I just have tried, but I got same result. I will try to manage PWMs from IDE. It may work. Thanks for your response walter.
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Are you sure you did a reboot after using the device tree editor?
     
  5. Berk

    Berk New Member

    Joined:
    Nov 22, 2016
    Messages:
    17
    Likes Received:
    5
    Yes, I am sure. I rebooted every time after I used it. Firstly I tried it in default positions of pins, that time terminal showed to me no such files or directory. Then I fixed it logically, but I can not handle it with I/O error :(
     
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I just tried it and I was able to create pwm0 ( pwm_2) with

    sudo sh -c "echo 0 > /sys/class/pwm/pwmchip0/export

    And I got a working flashing led following the pwm instructions.
     
  7. Berk

    Berk New Member

    Joined:
    Nov 22, 2016
    Messages:
    17
    Likes Received:
    5

    Do you think I should boot my device ? I will start everything simply :)
     

Share This Page