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.

current measurement Is_A in Lab9. BOOSTXL-DRV8305EVM

Other Parts Discussed in Thread: DRV8305

I do not quite understand how this works.
In maximum current of Iq_A = 20A for DRV8305
In this example, we multiply 20 * 20 = 400, but for iQ24 is maximum 127.

  // calculate vector Is in amps
  gMotorVars.Is_A = _IQsqrt(_IQmpy(gMotorVars.Id_A, gMotorVars.Id_A) + _IQmpy(gMotorVars.Iq_A, gMotorVars.Iq_A));

Moschet forgot to transfer the float?

Thank you.

Andrew.

  • Andrew,

    I agree, if the input values are 20 then this formula would exceed the IQ24 range of +- 128. Since this SW is for the DRV8305, this code should be changed to support the maximum current range of the DRV8305.

     

    IQmpy() can be called with a specific IQN scaling and the input parameters can be scaled to a specific IQN scaling. Here’s an example provided in the IQmath reference guide changing the scaling from the GLOBAL_Q to Q23:

     

     

    Jeff

  • Andrew,

    I agree, if the input values are 20 then this formula would exceed the IQ24 range of +- 128. Since this SW is for the DRV8305, this code should be changed to support the maximum current range of the DRV8305.

     

    IQmpy() can be called with a specific IQN scaling and the input parameters can be scaled to a specific IQN scaling. Here’s an example provided in the IQmath reference guide changing the scaling from the GLOBAL_Q to Q23:

     

    Jeff