2025-10-15 5:18 AM
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?
2025-10-15 7:59 AM
The motor speed can be calculated by measuring the hall signal using oscilloscope at the connector.
2025-10-15 8:27 AM
Hello @Sanchari,
If you require an output signal proportional to the motor speed, use the DAC debug feature.
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);
...
}