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.

DRV8305: Setting half-bridges to Low, Pwm, or Hi-Z

Expert 1965 points
Part Number: DRV8305
Other Parts Discussed in Thread: , DRV8320

I'm setting up for a commutation exercise, and I'm doing trapezoidal commutation, where I want to be alternating/switching my half-bridges to be either PWM driven,  Hi-Z, or GND. So depending on trapezoidal stage, I'm either setting one of the 3 phases to voltage based on my generated PWM,  or I want to set to to ground, or leave Hi-Z for back EMF measurement...

When I'm in PWM stage for a particular phase, I switch a GPIO mux to PWM mode, and I verified that PWM is correct - measured on the board I/O pins, frequency right, and DC adjustment works all as expected. 

I'm not however sure if I'm setting correctly the GIO, especially when I want a phase output to be ground.

Looking at this table in the data-sheet for DRV8305:

As I understand, there are 2 Hi-Z states, and I'm settings inputs as :  (0, 0) when I need phase to be Hi-Z;   or switching GIO mux to PWM if my phase is in PWM stage; 

and I then I need ground on the phase, and I'm using (1,0), but I don't fully understand especially what I see on the phase.

I sort of expect 0V when its on ground always when it's on ground, and PWM duty cycle is 0, but that's not what I see , I see a square wave at the frequency of my commutation. 

  • Hello,

    Setting inputs as shown according to the 6x PWM truth table is how to achieve the high, low, and Hi-Z gate driver states. An easy way to set the Hi-Z states for gate driver outputs is to re-initialize the GPIO pins as inputs (rather than PWM outputs) to set the INHx/INLx pins low for that commutation state. 

    Sometimes people use PWM modules from MCUs to generate synchronous, inverting PWM waveforms for INHx/INLx with added deadband. Rather than re-initializing the PWM module from their previous settings to generate two high outputs, you can re-init the GPIO as inputs to set them low. 

    Feel free to watch the sensored trapezoidal training below:
    https://www.youtube.com/watch?v=xIORHY8Ii90


    Feel free to follow sensored trapezoidal code examples as shown below: 
    MSP430 based - https://www.ti.com/lit/zip/tidcfi3
    C2000 based - https://www.ti.com/lit/zip/slvc832

    Thanks,
    Aaron

  • Hi 

    An easy way to set the Hi-Z states for gate driver outputs is to re-initialize the GPIO pins as inputs (rather than PWM outputs) to set the INHx/INLx pins low for that commutation state. 

    So does this mean, the above truth table  INHx/INLx  (1,1), or (0,0) will not give HI-Z?  I thought the description in the guide as I understood says that will set Hi-Z state, but are you saying that I have to re-configure that GIO as input specifically ?

    Sometimes people use PWM modules from MCUs to generate synchronous, inverting PWM waveforms for INHx/INLx w

    That is what I'm using : I have setup the ePWM 's module to drive those half-bridges, and have configured deadbands - all verified, measured at the devboard PWM outputs, that they all as configured / intended, and deadband too.  So this I use when phase's trapezoidal stage is in V stage - i drive PWM out to those half-bridges.

    I struggle with measuring / observing the voltage output on the 3- phases of the DRV8305: what is needed to correctly capture output with the scope, if no-motor is connected?  Or may be its clearer this morning.

    With no motor connected, and just measuring on the 3-phases with scope, I cannot see clearly difference in output between Hi-Z, and GND (low) phases. On the scope it also seems that with no motor, instead of GND(0V) I get full battery supply voltage output.  When it's in PWM stage, then I start reading PWM signal at frequency as I configured, and dc changes per my setting.

  • Hello,

    INLx/INHx = (0,0) or (1,1) gives Hi-Z, all I'm saying is sometimes to get (0,0) people set the I/Os to inputs rather than ePWM outputs for simplicity. Are you using a Launchpad?

    Make sure you set WAKE = high and ENABLE = high and wait 1-ms before toggling PWM inputs to the DRV8305 so you're in operating mode. You shouldn't need a motor to see SHx go to PVDD or GND after turning on GHx or GLx. You will not see any outputs if you're in sleep mode or idle mode. 

    When you set INHx high, you should see GHx go to 10V above SHx, so VGS for the HS FET = 10V. Then SHx should go PVDD. You can measure each signal with respect to GND on the scope to see correct operation (INHx, GHx, SHx). 

    Can you please share waveforms of your issues? Is this on the EVM or on a custom PCB?

    Thanks,
    Aaron


  • I think, it may be clearer to me this morning what I'm seeing, .

    I was looking probably wrong at it when no MC is connected, and couldn't see HI-Z or GND phase's in my capture.  But, I think they are there, as I have highlighted below in snapshots.

    The areas in pink circles are my Hi-Z, where I will be doing position / angle estimations or zero-crossing, as my next stage.  Anyone disagrees? 

    No MC connected  (scope probe on phase..)

    MC connected, basic commutation /rotation going.. :

    So these are both at 2% DC, and 3% my freq, which is approx.

  • Make sure you set WAKE = high and ENABLE = high and wait 1-ms before toggling PWM inputs to the DRV8305 so you're in operating mode

    Any more details on these?  Is this in the DRV8305 user guide, where to get more details on this WAKE & ENABLE?

    Are you using a Launchpad?

    I'm using F2806M LauchPad + the BOOSTXL-DRV8305EVM, to plug on top of my Lauchpad.

  • Hello,

    Hi-Z at the phase outputs (SH_A, SH_B, SH_C) should look like below for example. Are your waveforms SH_x to GND? If so, you may have an incorrect commutation state if using trapezoidal commutation. 



    Are you using any dead time settings in DRV8305, or just keeping the default? Make sure dead time settings are not too high or else at smaller duty cycles or larger duty cycles, you may not have enough PWM period to generate an output at smaller PWM frequencies. 

  • Hi-Z at the phase outputs (SH_A, SH_B, SH_C) should look like below for example. Are your waveforms SH_x to GND? I

    I'm measuring at MOTA, phase A output to the motor.  My ground is my lauchpad ground ..Hmm, must be wrong then.

  • Hello, 

    Looks like you need to swap the states of the circled Hi-Z period, then the commutation sequence may be correct and trapezoidal in shape. It is likely vibrating now if not the correct sequence.

    Thanks,
    Aaron


  • Looks like you need to swap the states of the circled Hi-Z period, t

    Sorry Aaron, and when you mean swap the states of my circled Hi-Z, do you mean swap them between themselves, or what do you mean in detail?

  • Looking at the pins for those SH_x, 

    I don't see them routed out to the jumper pins on that DRV8305 board,  how do you measure then? Direct from the leg of the DRV8305 chip?

  • Hello,

    When commutating with 6-step trapezoidal commutation from Hall sensored feedback, you should set the PWMs accordingly to the next state. You can use these diagrams or the firmware examples from before to show how to set INHx/INLx each state to yield the appropriate GHx/GLx outputs and phase output waveforms (Phase U/V/W or SH_A/SH_B/SH_C). 




    For instance, if the Hi-Z waveforms of MOTA are backwards, maybe you need to swap states 1 and 4 as shown in the first table above (GHA = GLA = L --> Phase A = Hi-Z).

    You can measure phase outputs at the MOTA, MOTB, and MOTC motor connector. Connect an extra wire or probe to the motor output wire directly. 

    Thanks,
    Aaron

  • Hey Aaron,

    Will try this out. 

    BTW, for the record  , I'm not using Hall sensors, all control through 3 phases, and only feedback through BEMF.

  • Hello,

    Thanks for the update. Feel free to let us know if you have any additional questions.

    Best,

    Isaac

  • Swapping states as you suggested does not help, the scope capture at the phase is same as I pasted - kind of looking like trapezoidal sides are wrong side.

    I would like to perhaps get more help, if you suggesting this is wrong.

    Also, reviewing what I'm actually doing / implementing, I see that it is not 6 PWM's that I'm driving into the driver, it's 3 :

    So I have  3 EPWM, each EPWM drives  2 half-bridge inputs , with inverse/reverse polarity on each INHx/INLx.   So with that, my correct truth table reference should be:

    While it says, Any INLx is ignored, I'm assuming that setting them both HH or LL will give me Hi-Z. Is this wrong...

    This is then the only switching I'm doing in code :

    Trap stage 0:

      Change PhaseA PWM DC  (if changed)
      Switch pin mux for Phase A to PWM periph mode
      Switch pin mux for Phase B to GIO, set to  GND :  INHB =  0,   INLB = 1
      Switch ... Phase C to GIO, set to HIZ : INHC = 0,  INLC = 0   (or 1, 1, no difference I measure)

    Trap stage 1:

       Phase A stays PWM
       Phase B set HIZ:  INHB = 0, INLB = 0
       Phase C set GND : INHC = 0, INLC = 1

    Trap stage 2:

      Phase A switch to GIO, set HIZ : INHA = 0, INLA = 0
      Phase B switch mux to PWM, change DC
      Phase C to GND : INHC = 0, INHC = 1

     Trap stage 3:

       Phase A GND
      Phase B  PWM
      Phase C HIZ

    Trap stage 4:

      Phase A  GND
      Phase B HIZ
      Phase C PWM

    Trap stage 5:

       Phase C to PWM
       Phase A HIZ : INHA = 0, INLA = 0
      Phase  B GND :  INHA = 0, INHA = 1

  • Hello v01d,

    Thanks for the info, since you are using 3x PWM mode the datasheet specifies that that it can only be placed in one of two states either high or low. So the assumption you had above if using the HH or LL state would generate a high-z output just like in the 6x PWM mode is incorrect. The only input that makes a difference is the input at the INHx pin and INLx could be either high or low and generate the same outcome. 

    We do have other devices that have access to a hi-z state when using the 3x PWM mode, but DRV8305 does not have access to this state. Just as a reference here is a snippet of DRV8320 datasheet:

    I looks like you are able to create the state based on the scope captures provided above so it would be useful to identify which combinations yield which behaviors so that you know how to manipulate the inputs to create the specific outputs from your FETs.

    Best,

    Isaac