Skip to main content
Kumar B
Associate III
Nov 9, 2019 5:36 PM UTC
Solved

Timer 4 CCMR2 configuration (STM32F4)

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.
waclawek.jan
waclawek.janBest answer
Super User
Nov 9, 2019 6:06 PM UTC

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

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
Nov 9, 2019 6:06 PM UTC

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

JW

Kumar B
Kumar BAuthor
Associate III
Nov 9, 2019 6:08 PM UTC

Thanks for the reply.