Register Programming
Gory details
// Enable OC1-OC4 as output compare, preload enabled, active then inactive when counting up
// ("PWM mode 1")
TIM4->CCMR1 = (uint16_t)0x6868;
TIM4->CCMR2 = (uint16_t)0x6868;
// Activate OC1-OC4 as active low signals (with the CCMR1-2 settings, this causes a right-
// aligned active high pulse to appear on the output)
TIM4->CCER = (uint16_t)0x3333;Contributing Teams to this Article:
Last updated
Was this helpful?
