Nuvoton /M05x_registers /PWMA /CMR0

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as CMR0

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0CMR

Description

PWM Comparator Register 0

Fields

CMR

PWM Comparator Register CNR determines the PWM duty.

PWM frequency = PWMxy_CLK/(prescale+1)/(clock divider)/(CNR+1); where xy, could be 01, 23, 45 or 67, depends on selected PWM channel.

Duty ratio = (CMR+1)/(CNR+1).

CMR >= CNR: PWM output is always high.

CMR < CNR: PWM low width = (CNR-CMR) unit; PWM high width = (CMR+1) unit.

CMR = 0: PWM low width = (CNR) unit; PWM high width = 1 unit

(Unit = one PWM clock cycle) Note: Any write to CNR will take effect in next PWM cycle.

Links

()