cancel
Showing results for 
Search instead for 
Did you mean: 

EVSPIN32G4 3 ph motor driver-- How to get motor speed on the GPIO to match with measured quantity in the motor pilot?

Sanchari
Associate

I am working on a 3ph motor control with EVSPIN32G4. I want to know how to measure motor speed through GPIO (To match with the measured quantities in motor pilot). Where can i find the details of that?

 

2 REPLIES 2
STuser2
Senior II

The motor speed can be calculated by measuring the hall signal using oscilloscope at the connector. 

GMA
ST Employee

Hello @Sanchari,

If you require an output signal proportional to the motor speed, use the DAC debug feature.

GMA_0-1760541547789.png

You can select the required data by replacing MC_REG_I_ALPHA_MEAS with MC_REG_STOPLL_ROT_SPEED (defined in the register_interface.h file), for example.

/**
  * @brief  Hardware and software initialization of the DAC object.
  * @param  pHandle pointer on related component instance.
  */
__weak void DAC_Init(DAC_Handle_t *pHandle)
{
#ifdef NULL_PTR_CHECK_DAC_UI
...
    /* Enable DAC Channel1 */
    /* By default send Ialpha motor 1 */
    (void)HF_GetPtrReg((MC_REG_I_ALPHA_MEAS + 0x1U), (void *)&pHandle->ptrDataCh[DAC_CH1]); //cstat !MISRAC2012-Rule-11.5
    LL_DAC_Enable(DAC1, LL_DAC_CHANNEL_1);
...

}

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA