Other Parts Discussed in Thread: DRV8316
Tool/software:
Hi,
I am using mspm0_sdk_2_02_00_05 with DRV8316 to develop FOC motor control project.
For the following function in file "focHALInterface.c",
void HAL_SelectShuntMeasure(HAL_MEASURE_MOTOR_INPUTS_T *pMotorInputs) { HAL_MEASURE_CURRENT_T *pCurrent = &(pMotorInputs->current); MC_PHASE_TYPES maxDutyPhase = *(pCurrent->pMaxDutyPhase); #ifdef CURRENT_THREE_SHUNT_DYNAMIC if(maxDutyPhase != pCurrent->prevMaxDutyPhase && pCurrent->flags.b.threeShuntDynamic) { /* Max duty phase has changed and dynamic update on 3 * shunt is enabled */ switch(maxDutyPhase) { case PHASE_A: pCurrent->currentShunt = CURRENT_TWO_SHUNT_B_C; break; case PHASE_B: pCurrent->currentShunt = CURRENT_TWO_SHUNT_A_C; break; case PHASE_C: pCurrent->currentShunt = CURRENT_TWO_SHUNT_A_B; break; case PHASE_INVALID: pCurrent->currentShunt = pCurrent->currentShuntSet; break; } HAL_SetPhaseCurrentChannels(pMotorInputs); } #endif }
I think
#ifdef CURRENT_THREE_SHUNT_DYNAMIC
should be
#ifdef __CURRENT_THREE_SHUNT_DYNAMIC
It is a typo, right?
Robert.