2 Replies Latest reply on Aug 1, 2014 12:27 AM by StBa_721356

    PWM signal on 20737S

      I found there's strength PWM output on 20737S, could someone help to check?

      I test again with pwm_tones demo project in SDK2.0, and get the following signal:

      The 1st picture is a cycle of PWM signal, and the 2nd picture is a zoom out that shows there is another "big" cycle to generate.

      The output tone is periodically "bi", "bi" .... around around 1 sec. period. I think this is not the normal PWM. Then I test following simple code again in Hello project, but get similar strange result.


          aclk_configure(512000, ACLK1, ACLK_FREQ_24_MHZ);
          pwm_start(0, PMU_CLK, 0x2FF, 0x200);

          gpio_configurePin(26 >> 4, 26 & 0x0F, GPIO_OUTPUT_ENABLE, 0);



        • 1. Re: PWM signal on 20737S

          20737S seems to be in sleep mode between tones.

          Please try devlpm_registerForLowPowerQueries() and return 0 at the registered function.

          • 2. Re: PWM signal on 20737S

            You can also use LHL_CLK instead of PMU_CLK to have a PWM output even when the device is in sleep mode.

            But be aware that LHL_CLK has a lower frequency than PMU_CLK.


            Snippet from include/Drivers/pwm.h:


            /// Clock used for PWM. When LHL_CLK is set, 128 KHz is used. When PMU_CLK is set, 1 MHz or 8 MHz. 

            typedef enum




            } PwmClockType;

            1 of 1 people found this helpful