- Using Timer2 and Timer3 to the wheel direction and speed with PWM signals
- Channel 1 for forward rotation
- Channel 2 for backwards rotation
- Motor 1:
- Input A - PA6 - D12 - Timer3_CH1
- Input B - PA7 - D11 - Timer3_CH2
- Motor B:
- Input A - PA0 - A0 - Timer2_CH1
- Input B - PA1 - A1 - Timer2_CH2
- Motor Driver - MDD3A
- PWM frequency up to 20kHz, using 13.125kHz
- Pre-scaler: 24
- Counter Period: 256
- Will probably change above values in the future
- PWM frequency up to 20kHz, using 13.125kHz
- Important functions:
- HAL_TIM_PWM_Start()
- HAL_TIM_SET_COMPARE()
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.