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.

DRV8908-Q1: PWM duty 255 is not 100% ON

Part Number: DRV8908-Q1

I'm using the DR8908 and I am writing the PWM_DUTY_CTRL registers to set my PWM duty cycle.

What I see on my oscilloscope is that when I write 255, the PWM duty is 99.6%.

The datasheet says 100% duty is 255 and gives the formula for duty as register value * 100% * 1/255.

My measurements suggest that it is actually 1/256. This is problematic because that would mean 255/256 is impossible and fully on is impossible.

A workaround is to disable PWM in software if the desired value is 100%, but I'd rather not take that route.

Can you verify my measurement and tell me whether the datasheet is wrong or not?

  • Hi Elco,

    I'm using the DR8908 and I am writing the PWM_DUTY_CTRL registers to set my PWM duty cycle.

    What I see on my oscilloscope is that when I write 255, the PWM duty is 99.6%.

    The datasheet says 100% duty is 255 and gives the formula for duty as register value * 100% * 1/255.

    I think the PWM duty cycle formula is for explaining of the relationship between the register value and the pwm signal, but no where in the datasheet that it says the output pwm signal can be 100%. I agree that the datasheet should point out the limitation of having only 99.6% and not 100%.

    My question to you: why 99.6% is not workable for your application and you have to have 100% pwm output? I would think one wants to design a product with some margin for safety, and so nobody should aim for 100% pwm, and 99.6% fails to work.

    Regards,

    Brian  

  • I guess you are right, it doesn't say that. It is just unexpected that a PWM output cannot stay 100% on. It's what my customers will expect. But I think I can do that by disabling the PWM generator for those MOSFETs when the duty cycle is set to 100%, which would be 256 in my application in that case.

  • But I think I can do that by disabling the PWM generator for those MOSFETs when the duty cycle is set to 100%, which would be 256 in my application in that

    I'm not sure why you even need to do anything. Why do you want to write to the 8-bit pwm generator with zero (256 = 0x100) instead of 255 or 0xFF?

  • The PWM generator of the device has 256 steps, 0-255. But 255 is not 100%. So I am extending the range to 0-256. For 0-255, I write the PWM duty register and enable PWM. For 256, I disable the PWM generator by writing the PWM_CTRL register, so the device reverts to continuously on. Already implemented and works well.

    A bit of a workaround, but it solves my problem.

  • For 256, I disable the PWM generator by writing the PWM_CTRL register, so the device reverts to continuously on. Already implemented and works well.

    OK, you made it sounds complicate. Simply just say to have true 100% pwm output, switch the mode from pwm to continuous.

    A bit of a workaround, but it solves my problem.

    What's problem? you don't have a real practical problem of having only 99.6% instead of 100%. 

    By the way, this driver has the pwm frequency from 80 to 2000 hz. What frequency are you using and does it make any humming noise? Don't know why this chip has such low pwm frequency, as most other motor drivers that TI offers are in 50K to 100K hz. 

    Brian

  • Elco,

    Sounds like a perfectly good way to solve the problem and what I would suggest from TI.

    Brian,

    Thanks for your help on this post.  Definitely wish the PWM frequency was higher on this device.  A lesson learned that we plan to take to next generation developments.  

    Regards,

    Ryan