3steppersLB: seems like independent moving is OK

This commit is contained in:
2021-12-01 17:56:19 +03:00
parent d0ecad3877
commit b24111f884
90 changed files with 377 additions and 1349 deletions

View File

@@ -87,7 +87,7 @@ static IRQn_Type motirqs[MOTORSNO] = {TIM15_IRQn, TIM14_IRQn, TIM16_IRQn};
static void setup_mpwm(int i){
volatile TIM_TypeDef *TIM = mottimers[i];
TIM->CR1 = TIM_CR1_ARPE; // buffered ARR
TIM->PSC = MOTORTIM_PSC; // 64kHz
TIM->PSC = MOTORTIM_PSC; // 16MHz
// PWM mode 1 (active -> inactive)
TIM->CCMR1 = TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1;
#if MOTORTIM_ARRMIN < 5