Download Print this page

Renesas M16C/50 Series User Manual page 359

Advertisement

M16C/5L Group, M16C/56 Group
17.3.1.7
Three-Phase PWM Output Pin Select
Pins U, U , V, V , W, and W output a three-phase PWM waveform when the PFCi bit (i = 0 to 5) in the
PFCR register is 1 (three-phase PWM output). When the PFCi bit is 0 (I/O port), these pins are used
as I/O ports (or other peripheral function I/O ports). Therefore, while some of the six pins output a
three-phase PWM waveform, the other pins can be used as I/O ports (or other peripheral function I/O
ports).
The PFCR register can be rewritten when the TPRC0 bit in the TPRC register is 1 (write to the PFCR
register enabled). The functions of the three-phase PWM waveform output pins can be protected
from being rewritten due to an unexpected program operation. To prevent rewrite, follow these steps:
(1) Set the TPRC0 bit to 1.
(2) Rewrite the PFCR register.
(3) Set the TPRC0 bit to 0 (write to the PFCR register disabled).
Figure 17.4 shows Three-Phase Output and I/O Port Switch Function Operation.
Timer B2
U-pin output
V-pin output
W-pin output
The above assumes the following:
The output data of the ports which share a pin with pins V and W are both 0 (low-level).
The direction bits of the ports which share a pin with pins V and W are both 1 (output mode).
Figure 17.4
Three-Phase Output and I/O Port Switch Function Operation
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
Functions as a port
Write to the PFCR register
PFC0 bit = 1
PFC2 bit = 1
PFC4 bit = 0
17. Three-Phase Motor Control Timer Function
Functions as a port
Write to the PFCR register
PFC0 bit = 1
PFC2 bit = 0
PFC4 bit = 1
Page 322 of 803

Advertisement

loading