MotorControl Workbench with AS5600(12-Bit Programmable Contactless Potentiometer)
Hi everyone!
I try use SDK with sensor AS5600(12-Bit Programmable Contactless
Potentiometer) and 1/2-H Bridge Driver DRV8313
Motor is 24N28P
MCU: STM32F072C8T6
One shunt resistor with LM2904
I choose hall sensors in Workbench:
- Sensors displacenent: 120
- Placement electrical angle: 0
- Input capture filter duration: 5.33usec
and I convert values AS5600 in HALL-values: 5,1,3,2,6,4 depends on angle. In my case every change of angle 4.25 degree - change hallstate in struct HALL_Handle_t
I do it in while() and if hallstate is changed I call void * HALL_TIMx_CC_IRQHandler( void * pHandleVoid ). Here and in static void HALL_Init_Electrical_Angle( HALL_Handle_t * pHandle ) I comment next code ih these functions:
/* pHandle->HallState =(uint8_t) ((LL_GPIO_IsInputPinSet( pHandle->H3Port, pHandle->H3Pin ) << 2)
| (LL_GPIO_IsInputPinSet( pHandle->H2Port, pHandle->H2Pin ) << 1)
| LL_GPIO_IsInputPinSet( pHandle->H1Port, pHandle->H1Pin ) );
*/and instead of
bPrevHallState = pHandle->HallState;i write
bPrevHallState = myVariableOfPrevHallStateBut my motor don't spin - only vibrate or brake-on condition. It seems that I check out everything and have no idea what to do next.
Could you help me, please?