Nuvoton /M05x_registers /PWMA /CNR2

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 CNR2

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 0CNR

Description

PWM Counter Register 2

Fields

CNR

PWM Counter/Timer Loaded Value CNR determines the PWM period.

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

()