PWM under windows 10 IOT

jmadeley New Member Posts: 12

I am trying to use PWM off the 40 pin connector under windows IOT.

I have installed the framework and compiled and deployed the UpDemoApp. I can read the Board name, Board Manufacturer and Bios version, but I do not seem to be able to control outputs via the App. I receive good status replies from the calls but the outputs do not change.

The PwmSetValue function call completes without error and I am able to retrieve the values using PwmGetValue, but the output does not pulse. I cannot find documentation describing the parameters for these functions: PWMBaseUnitInt, PWMBaseUnitFrac or PWMDutyCycle.

Advice on getting the GPIO working, particularly the PWM would be greatly appreciated!


  • jmadeley
    jmadeley New Member Posts: 12

    Has anyone got the framework working under Windows IOT?

  • jmadeley
    jmadeley New Member Posts: 12

    When I use the flash.ffu from the AAEON downloads I am able to control the PWM output. When I try and build the flash using the "Windows IOT BSP and Guide" document ( I get an error in the Build Image step -- "Package is missing from \?\C:\Program Files (x86)\Windows Kits\10\MSPackages\Retail\AMD64\fre\"

  • jmadeley
    jmadeley New Member Posts: 12

    I was able to build the Windows IOT ffu file when I tried on a different computer. This allowed me to access the PWM.

    My problem is now the PWMSetValue routine is unable to set the fractional value. The fractional value always reads back as zero using PWMGetValue and the value does not affect the frequency of the PWM output. This means the lowest frequency I can output is 75 KHz, but I need about 1 KHz.

    I see that another user was also unable to set the fractional value -- .

            uint _pwmInt = 1;
            uint _pwmFrac = 200;
            uint _pwmDuty = 128;
            Debug.WriteLine($"Setting PWM Channel 0 _pwmInt={_pwmInt}, _pwmFrac={_pwmFrac}, _pwmDuty={_pwmDuty} ");
            EAPIStatus_t status = (EAPIStatus_t) upb.PwmSetValue(0, _pwmInt, _pwmFrac, _pwmDuty);
            if (status == EAPIStatus_t.EAPI_STATUS_SUCCESS)
                upb.PwmGetValue(0, out uint tInt, out uint tFrac, out uint dutyCycle);
                Debug.WriteLine($"Reading PWM channel 0, tint={tInt}, tfrac={tFrac}, dutyCycle={dutyCycle} ");

    ---- output
    Setting PWM Channel 0 _pwmInt=1, _pwmFrac=200, _pwmDuty=128
    Reading PWM channel 0, tint=1, tfrac=0, dutyCycle=128

Privacy Policy