Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Arthur,
Thank you for reaching out with your question about configuring pin 66 as a PWM on the Verdin AM62. Let’s go through the steps to ensure your device tree is set up correctly for this purpose.
-
Identify the Correct PWM Controller and Pin Mapping:
- First, confirm which PWM controller is associated with pin 66. This information is typically available in the SoC’s reference manual or pinmuxing guide.
- Ensure that pin 66 can be configured as a PWM output.
-
Modify the Device Tree:
- Open the device tree source file, such as
k3-am62-verdin.dtsi
, where the pin configuration is defined. - Add or modify the node for the PWM controller to include pin 66. This involves setting the correct pin function and muxing options.
- Here is an example snippet for a PWM node in the device tree:
&pwm1 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>; }; &pinctrl_pwm1 { pinmux = <PIN_66_MUX_OPTION>; /* Replace PIN_66_MUX_OPTION with the actual mux option for PWM */ };
- Ensure the
status
property is set to “okay” to enable the PWM controller.
- Open the device tree source file, such as
-
Recompile and Deploy the Device Tree:
- After making the necessary changes, recompile the device tree to generate the updated device tree blob (DTB).
- Deploy the new DTB to your Verdin AM62 board.
-
Verify PWM Interface in Sysfs:
- Once the board is booted with the updated device tree, check for the PWM interface in
/sys/class/pwm/
. - You should see directories like
pwmchipX
where you can export and configure the PWM channels.
- Once the board is booted with the updated device tree, check for the PWM interface in
-
Troubleshooting:
- If the PWM interface is still not visible, double-check your device tree modifications for any errors.
- Ensure that the kernel has PWM support enabled for your specific SoC.
By following these steps, you should be able to configure pin 66 as a PWM on the Verdin AM62. If you encounter any issues, reviewing the pinmuxing options and ensuring the correct PWM controller is targeted will be crucial.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem: