This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: How to keep pwm running from power-up to start of application.

Part Number: AM623

Tool/software:

I have a custom AM6234 board running real time Linux.  I am using pwm0 for splash screen backlight control.  I start pwm0 by writing directly to the PWM control registers in evm.c.  The splash screen lights up and displays the screen, but about halfway through Linux kernel boot pwm0 stops.  It works again after I call it in my application.

I need pwm0 to keep running from power-up until my application takes over.  I cannot use LED or Backlight in the device tree because they only accept fixed hard coded pwm settings.  Plus they won’t let you change pwm settings from your application after boot.

Pinmux settings appear to hold while booting but I think pwm0  counter registers are getting reset when Linux boots.

PWM code snippets from the kernel device tree:

               epwm0: pwm@23000000 {

                              compatible = "ti,am64-epwm", "ti,am3352-ehrpwm";

                              #pwm-cells = <3>;

                              reg = <0x00 0x23000000 0x00 0x100>;

                              power-domains = <&k3_pds 86 TI_SCI_PD_EXCLUSIVE>;

                              clocks = <&epwm_tbclk 0>, <&k3_clks 86 0>;

                              clock-names = "tbclk", "fck";

               };

 

               main_epwm0_pins_default: main-epwm0-pins-default {

                              pinctrl-single,pins = <

                                             AM62X_IOPAD(0x204, PIN_OUTPUT, 2) /* (AB2) MMC0_DAT4.EHRPWM0_A */

                              >;

 

&epwm0 {

               pinctrl-names = "default";

               pinctrl-0 = <&main_epwm0_pins_default>;

               status = "okay";

};

How can I keep pwm0 running from power-up until my application launches?