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.

Dead Time setting for PWM signals

Other Parts Discussed in Thread: MOTORWARE, DRV8312

According to the spruhj1f-InstaSpin-UserGuide.pdf Section 5.2.6 , there is supposed to be a variable called USER_PWM_DBCNT_INIT_STATE in user.h that helps set the dead band time . Alas, I could not find such a variable in user.h in the latest Motorware motorware_1_01_00_13 .  May be it was used in an older version of Motorware ?? Its so misleading especially for people who aren't the best at digging through OO software. 

After digging into HAL_setParams => HAL_setupPwms => I found where the dead time was set for my drv8312 kit. It was the function PWM_setDeadBandOutputMode , but then it was set to PWM_DeadBandOutputMode_Bypass which seems to be no dead time. I didnt want to risk blow up my hardware so I diged in more and found 

the functions in hal.c / hal.h

PWM_setDeadBandOutputMode

PWM_setDeadBandPolarity

PWM_setDeadBandRisingEdgeDelay

PWM_setDeadBandFallingEdgeDelay

to be my way to set the desired dead band. And the variables in hal.h

HAL_PWM_DBRED_CNT

HAL_PWM_DBFED_CNT 

There should be an update to Section 5.2.6 of the spruhj1f-InstaSpin-UserGuide.pdf to make life easy for people who don't want to spend a month studying everything - code and documents. 

  • you are 100% correct. I've filed this as a bug.

    This is a remnant from the first release when dead band was handled in the user.h
    Once we started releasing other MHz devices we realized we should handle this configuration differently
  • Thanks Chris. InstaSpin is really easy to use and these little things should get ironed out so more and more people can use it easily not feel confused and give up .

    Found another one. The spruhj1f-InstaSpin-UserGuide.pdf talks about Lab 8 in spintac and while there is no Lab 8 in instaspin_labs.pdf