Other Parts Discussed in Thread: DRV8301, DRV8305
Tool/software: Code Composer Studio
I am working with mono_servo motor control example which is available in control suite,some of the code is not very clear. Thanks for helping explain them
void InitMotor1_DRV_Gpio(void)
{
// Configure as Output : Motor 1 - EN-GATE
GPIO_WritePin(MOTOR1_EN_GATE_GPIO, 0); // Disable EN_GATE
GPIO_SetupPinOptions(MOTOR1_EN_GATE_GPIO, GPIO_OUTPUT, GPIO_ASYNC);
GPIO_SetupPinMux(MOTOR1_EN_GATE_GPIO, 0, MOTOR1_EN_GATE_MUX);
#if (DRV_MOTOR1 == DRV8301)
// Configure as Output : Motor 1 - DC-CAL for DRV8301
GPIO_WritePin(MOTOR1_DC_CAL_GPIO, 1); // Set DC-CAL to 1 to disable amplifiers
GPIO_SetupPinOptions(MOTOR1_DC_CAL_GPIO, GPIO_OUTPUT, GPIO_ASYNC);
GPIO_SetupPinMux(MOTOR1_DC_CAL_GPIO, 0, MOTOR1_DC_CAL_MUX);
#else
// Configure as Output : Motor 1 - WAKE for DRV8305
GPIO_WritePin(MOTOR1_WAKE_GPIO, 0); // Set WAKE to 0 (default state)
GPIO_SetupPinOptions(MOTOR1_WAKE_GPIO, GPIO_OUTPUT, GPIO_ASYNC);
GPIO_SetupPinMux(MOTOR1_WAKE_GPIO, 0, MOTOR1_WAKE_MUX);
#endif
}
why disable the EN_GATE and Set DC-CAL to 1 to disable amplifiers?