cancel
Showing results for 
Search instead for 
Did you mean: 

Timer 4 CCMR2 configuration (STM32F4)

Kumar B
Associate II

Hi,

I want to use output compare4 mode for timer 4. I have doubt regarding the register

setting in TIM4->CCMR2 value

As per the reference manual it is given

Bits 14:12 OC4M: Output compare 4 mode and

Bit 11 OC4PE: Output compare 4 preload enable

I have to set this bits.

TIM4->CCMR2 = 0x6800; //0b 0110 1000 0000 0000

 IM4->CCMR2 = 0x7800; Which one is correct?

Is this value correct?

0b 0110 1000 0000 0000

and in the reference manual there is no description for the 12, 13 and 14 bits. If it is there, how to set them?

1 ACCEPTED SOLUTION

Accepted Solutions

Have a look at the description of OC1M bits in CCMR1.

JW

View solution in original post

2 REPLIES 2

Have a look at the description of OC1M bits in CCMR1.

JW

Thanks for the reply.