Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To keep the PWM LED on your iMX8MP device active during sleep mode, you need to ensure that the PWM is sourced from a clock that remains active in this state. Typically, the osc_32k
or osc_24m
clocks are used for this purpose as they are available during low-power modes.
Here’s a step-by-step guide to help you achieve this:
-
Modify the Device Tree: Locate the PWM node you are using in your device tree source file (e.g.,
&pwm2
). -
Set the Clock Source: Update the
clocks
property to use a clock that remains active in sleep mode. For example:&pwm2 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm_red>; clocks = <&osc_32k>, <&osc_32k>; clock-names = "ipg", "per"; };
Ensure that the clock source you choose is indeed available during sleep mode.
-
Recompile the Device Tree: After making changes, recompile the device tree and deploy it to your device.
-
Test the Configuration: Verify that the PWM LED remains active when the system enters sleep mode. You can use tools like multimeters or oscilloscopes to check the PWM signal.
-
Confirm Clock Availability: Double-check that the selected clock source is configured to remain active during sleep mode. This might require additional configuration depending on your specific hardware setup.
By following these steps, you should be able to keep the PWM LED active during sleep mode on your iMX8MP device. If you encounter any issues, ensure that the device tree configuration is correct and that the clock source is available during low-power states.
Best regards,
Toradex AI Assistant.
Please, also check if these links can help you solve your problem: