PWM Duty Cycle values in RTOS SDK

hreintke
Posts: 9
Joined: Fri Jan 08, 2016 6:56 am

PWM Duty Cycle values in RTOS SDK

Postby hreintke » Mon Feb 08, 2016 4:16 am

I am busy getting the PWM SDK function of the RTOS SDK working.

Have trouble with the duty cycle settings.
Trial and error gave me for 20msec period, the duty cycle should vary from 0-1024 to get working pwm between 0 and 100%.
For other period lengths, these min/max values seem to be different, as pwm doesn't work as expected when i use the 0-1024 for other period values.

There is a define PWM_DEPTH 1023 in the document, which is not used within the document itself.

- Is there a difference between NONOS SDK and RTOS SDK with regards to duty cycle values ?
- Are there other differences between both SDK's regarding PWM API's ?
- Is there a working RTOS example using PWM ?

hreintke
Posts: 9
Joined: Fri Jan 08, 2016 6:56 am

Re: PWM Duty Cycle values in RTOS SDK

Postby hreintke » Tue Feb 09, 2016 8:09 pm

LS,

Did more testing and I have better results.

My impression now is that duty cycle parameter is from 0-1023, valid for all period values i've tested.

Additional question is whether the PWM_DEPTH can be changed, either programmatically or otherwise ?

skandalfo
Posts: 1
Joined: Mon Feb 15, 2016 3:41 am

Re: PWM Duty Cycle values in RTOS SDK

Postby skandalfo » Mon Feb 15, 2016 3:44 am

I've also confirmed (by having LEDs plugged) that duty values need to be in the 0..1023 range, no matter what the specified period value is.

This is with the RTOS SDK v. 1.3.0.

Who is online

Users browsing this forum: No registered users and 190 guests