50.7.40 PWM Channel n Mode Register

This register can only be written if bits WPSWS2 and WPHWS2 are cleared in the PWM Write Protection Status Register.

Name: PWM_CMRn
Offset: 0x0200 + n*0x20 [n=0..3]
Reset: 0x00000000
Property: Read/Write

Bit 3130292827262524 
          
Access  
Reset  
Bit 2322212019181716 
     PPMDTLIDTHIDTE 
Access R/WR/WR/WR/W 
Reset 0000 
Bit 15141312111098 
   TCTSDPOLIUPDSCESCPOLCALG 
Access R/WR/WR/WR/WR/WR/W 
Reset 000000 
Bit 76543210 
     CPRE[3:0] 
Access R/WR/WR/WR/W 
Reset 0000 

Bit 19 – PPM Push-Pull Mode

The Push-Pull mode is enabled for channel n.

ValueDescription
0The Push-Pull mode is disabled for channel n.
1The Push-Pull mode is enabled for channel n.

Bit 18 – DTLI Dead-Time PWMLn Output Inverted

ValueDescription
0The dead-time PWMLn output is not inverted.
1The dead-time PWMLn output is inverted.

Bit 17 – DTHI Dead-Time PWMHn Output Inverted

ValueDescription
0The dead-time PWMHn output is not inverted.
1The dead-time PWMHn output is inverted.

Bit 16 – DTE Dead-Time Generator Enable

ValueDescription
0The dead-time generator is disabled.
1The dead-time generator is enabled.

Bit 13 – TCTS Timer Counter Trigger Selection

ValueDescription
0The comparator of the channel n (OCn) is used as the trigger source for the Timer Counter (TC).
1The counter events of the channel n is used as the trigger source for the Timer Counter (TC).

Bit 12 – DPOLI Disabled Polarity Inverted

ValueDescription
0When the PWM channel n is disabled (CHIDn(PWM_SR) = 0), the OCn output waveform is the same as the one defined by the CPOL bit.
1When the PWM channel n is disabled (CHIDn(PWM_SR) = 0), the OCn output waveform is inverted compared to the one defined by the CPOL bit.

Bit 11 – UPDS Update Selection

  • If the PWM period is center-aligned (CALG=1):
    ValueDescription
    0The update occurs at the next end of the PWM period after writing the update register(s).
    1The update occurs at the next end of the PWM half period after writing the update register(s).
  • If the PWM period is left-aligned (CALG=0), the update always occurs at the end of the PWM period after writing the update register(s).

Bit 10 – CES Counter Event Selection

The bit CES defines when the channel counter event occurs when the period is center-aligned (flag CHIDn in PWM Interrupt Status Register 1).

  • If the PWM period is center-aligned (CALG=1):
    ValueDescription
    0The channel counter event occurs at the end of the PWM period.
    1The channel counter event occurs at the end of the PWM period and at half the PWM period.
  • If the PWM period is left-aligned (CALG=0), the channel counter event occurs at the end of the period and the CES bit has no effect.

Bit 9 – CPOL Channel Polarity

ValueDescription
0

The OCn output waveform (output from the comparator) starts at a low level.

1

The OCn output waveform (output from the comparator) starts at a high level.

Bit 8 – CALG Channel Alignment

ValueDescription
0

The period is left-aligned.

1

The period is center-aligned.

Bits 3:0 – CPRE[3:0] Channel Prescaler

ValueNameDescription
MCK

Peripheral clock

1MCK_DIV_2

Peripheral clock/2

2MCK_DIV_4

Peripheral clock/4

3MCK_DIV_8

Peripheral clock/8

4MCK_DIV_16

Peripheral clock/16

5MCK_DIV_32

Peripheral clock/32

6MCK_DIV_64

Peripheral clock/64

7MCK_DIV_128

Peripheral clock/128

8MCK_DIV_256

Peripheral clock/256

9MCK_DIV_512

Peripheral clock/512

10MCK_DIV_1024

Peripheral clock/1024

11CLKA

Clock A

12CLKB

Clock B