Jump to content

Recommended Posts

Posted

Good morning,

I have a NanoPi Neo Core that I want to use to generate a PWM wave. As far as I understand, the pin for this is PA5, which is shared with UART. However, by using the corresponding overlay, the UART would be disabled, and PWM would be enabled. Is that correct?

What would be the next steps to verify that this is correct and to generate the PWM wave? Is there a specific command to do this?

Thanks for your help, and best regards!

Posted

Hi MastinZgZ,

 

You would need to make sure the overlay has a pin control node to set PA5 to PWM function. Given this is most likely used for serial console as it is UART0, you should ideally route console output to another Serial port if available. When set up correctly you should be able to configure PWM output via /sys/class/pwm/pwmchip0. Then pin first has to be exported before it can be used and you also have to be in super user mode to configure the behavior.

 

Hope this helps

 

Ryzer

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines