Chapter 10Motor Control PWMOperation X - 1910.3 Operation10.3.1 Motor Control PWM Operation■ Waveform ModeWaveform mode can be set by the WAVEMDn flag of the PWM mode control register (PWMMDn). When “0” isset, triangular waves are specified and “1” is set, saw-tooth waves are specified.Table: 10.3.1 shows the output waveform logic operation formula and output level.Table:10.3.1 Logic Operation Formula and Output LevelWhen triangular waves are set, the counter counts up and down. It counts the period setting and “0” twice each atthe end of counting up and down. When saw-tooth waves are set, the counter counts up. After the counter countsup until the period setting value, it becomes “0” at the next counting . Triangular and saw-tooth wave output fig-ures are shown below.Figure:10.3.1 Triangular and Saw-tooth WavesLogic operation formula PWMn0 to 2 NPWMn0 to 2Value to be compared≤Counter value H LValue to be compared>Counter value L H(1) (2) (3) (4) (5) (6) (7) (8)(0)Count value ( max:FFFF)Count value ( min:0000)PWM period setting(PWMSETn)PWM0 phase value to becompared setting ( TCMPnA)PWM count valuePWMn0NPWMn0PWMn1NPWMn1PWMn2NPWMn2Count value ( max:FFFF)Count value (min:0000 )PWMn0NPWMn0PWMn1NPWMn1PWMn2NPWMn2(1) (2) (3) (4) (5) (6) (7) (8)(0)WAVEMDn= 0PXDT(U, V, W)n=0PXDTN(U, V, W)n=0WAVEMDn= 0PXDT(U, V, W)n=0PXDTN(U, V, W)n=0PWM0 phase value to becompared setting (TCMPnB)PWM0 phase value to becompared setting (TCMPnC)PWM period setting(PWMSETn)PWM0 phase value to becompared setting (TCMPnA)PWM0 phase value to becompared setting (TCMPnB)PWM0 phase value to becompared setting (TCMPnC)PWM count value