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.

PWM driver's bug

I am using Varicite's 3730 demo board, and after some struggles, I finally figured out how it work (and seems to find some bug)

 bug 1: PWM_IOCTL_SET_CLOCK call always return 0, but it does set the clock

bug 2: when setting the ontime to 1000 (set to same as the period), the output set it to low instead of always on.

bug 3: when setting the ontime to 0, the output is ontime of 1

bug 4: PWM_IOCTL_ENABLE doesn't do anything, the PWM output is always on, and this call always return true, but doesn't disable/enable the output

bug 5: comment bug? the frequency is 26KHz instead of 13KHz when the period is 1000 (twice of what the comment states)

 

so seems like you can't set it to either always on nor always off

I have not try PWM_IOCTL_GET_CLOCK, but probably doesn't work.