Skip to main content
Kumar B
Associate III
November 9, 2019
Solved

Timer 4 CCMR2 configuration (STM32F4)

  • November 9, 2019
  • 1 reply
  • 910 views

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?

This topic has been closed for replies.
Best answer by waclawek.jan

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

JW

1 reply

waclawek.jan
waclawek.janBest answer
Super User
November 9, 2019

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

JW

Kumar B
Kumar BAuthor
Associate III
November 9, 2019

Thanks for the reply.