Related document ..................................................................................................................................................... 7
Terms and Abbreviation .......................................................................................................................................... 10
2.1. Configuration of the VE .................................................................................................................................... 12
2.2. Interaction between the VE, PMD, and ADC ................................................................................................... 14
3. Description of Operations ........................................................................................................................... 15
3.2.1. Schedule Control ........................................................................................................................................................ 17
3.2.2. Start Control ............................................................................................................................................................... 19
3.2.3. Interrupt Control .......................................................................................................................................................... 20
3.3. Description of Tasks ........................................................................................................................................ 21
3.3.1. Current Control (Task 5) ............................................................................................................................................. 23
3.3.4. Output Control ............................................................................................................................................................ 36
3.3.4.1. Output control 1 (Task 0) ............................................................................................................................................... 36
3.3.4.2. Output control 2 (Task 9) ............................................................................................................................................... 42
3.3.8. Other Tasks ................................................................................................................................................................ 58
3.3.8.1. ATAN2 (Arctangent function 2) (Task 12) ...................................................................................................................... 58
4.1. List of Registers ............................................................................................................................................... 60
4.2. Details of VE Control Registers ....................................................................................................................... 63
4.2.1. [VExEN] (VE Operation Enable/Disable Register) ...................................................................................................... 63
4.3.9. Coefficient Registers for PI control ............................................................................................................................. 76
4.3.9.1. [VExCIDKI] (d-axis Current Integral Coefficient setting Register for PI control) ............................................................. 76
4.3.9.2. [VExCIDKP] (d-axis Current Proportional Coefficient setting Register for PI control) .................................................... 76
4.3.9.3. [VExCIDKG] (d-axis Coefficient Range setting Register for PI control) .......................................................................... 76
4.3.9.4. [VExCIQKI] (q-axis Current Integral Coefficient setting Register for PI control) ............................................................. 77
4.3.9.5. [VExCIQKP] (q-axis Current Proportional Coefficient setting Register for PI control) .................................................... 77
4.3.9.6. [VExCIQKG] (q-axis Coefficient Range setting Register for PI control) ......................................................................... 77
4.3.9.7. [VExVDIH] (d-axis Voltage Integral component Store Register for PI control (Upper)) .................................................. 78
4.3.9.8. [VExVDILH] (d-axis Voltage Integral component Store Register for PI control (Lower)) ................................................ 78
4.3.9.9. [VExVQIH] (q-axis Voltage Integral component Store Register for PI control (Upper)) .................................................. 78
4.3.9.10. [VExVQILH] (q-axis Voltage Integral component Store Register for PI control (Lower)) .............................................. 78
4.3.10. [VExPIOLIM] (Output Limitation Register for PI control) ........................................................................................... 78
4.3.13.1. [VExCOS] (Cosine value Register of θ) ....................................................................................................................... 80
4.3.13.2. [VExSIN] (Sine value Register of θ)............................................................................................................................. 80
4.3.13.3. [VExCOSM] (Previous Cosine value Register) ............................................................................................................ 80
4.3.13.4. [VExSINM] (Previous Sine value Register) .................................................................................................................. 80
4.3.14. Sector Information Registers .................................................................................................................................... 81
4.3.14.1. [VExSECTOR] (Sector Information Register) .............................................................................................................. 81
4.3.14.2. [VExSECTORM] (Previous Sector Information Register) ............................................................................................ 81
4.3.15. 3-phase Current Registers ....................................................................................................................................... 82
4.3.15.4. [VExIAADC] (ADC Conversion Result Register for a-phase Current) .......................................................................... 83
4.3.15.5. [VExIBADC] (ADC Conversion Result Register for b-phase Current) .......................................................................... 83
4.3.15.6. [VExICADC] (ADC Conversion Result Register for c-phase Current) .......................................................................... 83
4.3.15.7. [VExIA] (a-phase Current Register) ............................................................................................................................. 83
4.3.15.8. [VExIB] (b-phase Current Register) ............................................................................................................................. 84
4.3.15.9. [VExIC] (c-phase Current Register) ............................................................................................................................. 84
4.3.16. DC Supply Voltage Registers ................................................................................................................................... 85
4.3.16.1. [VExVDC] (DC Supply Voltage Register) .................................................................................................................... 85
4.3.16.2. [VExVDCL] (DC2 Supply Voltage Register)................................................................................................................. 85
4.3.17. d-axis/q-axis Current Registers ................................................................................................................................ 86
4.3.17.1. [VExID] (d-axis Current Register) ................................................................................................................................ 86
4.3.17.2. [VExIQ] (q-axis Current Register) ................................................................................................................................ 86
4.3.18. [VExTADC] (ADC Conversion Time setting Register) .............................................................................................. 87
4.3.25.5. [VExCPHIG] (Motor Magnetic Flux Range setting Register) ........................................................................................ 96
4.3.25.6. [VExCLG] (Motor Inductance Range setting Register) ................................................................................................ 96
4.3.25.7. [VExCRG] (Motor Resistance Range setting Register) ................................................................................................ 96
4.3.26. [VExVDE] (d-axis Voltage Register for Non-interference Control) ............................................................................ 97
4.3.27. [VExVQE] (q-axis Voltage Register for Non-interference Control) ............................................................................ 97
4.3.28. [VExDTC] (Dead Time Compensation Register) ...................................................................................................... 97
4.3.29. [VExHYS] (Hysteresis Width Register for Current Polarity Determination) ............................................................... 97
4.3.30. [VExHYS2] (Hysteresis Width Register 2 for Current Polarity Determination) .......................................................... 98
4.3.31. [VExDTCS] (Dead Time Compensation Control/Status Register) ............................................................................ 98
2021-02-24
Rev. 3.1
Page 5
TXZ/TXZ+ Family
5 / 107
Advanced Vector Engine Plus
4.3.32. [VExTHTCLP] (Clipped Phase value setting Register) ............................................................................................. 99
4.3.33. 2-phase Voltage Registers ....................................................................................................................................... 99
4.3.33.1. [VExVALPHA] (α-phase Voltage Register) .................................................................................................................. 99
4.3.33.2. [VExVBETA] (β-phase Voltage Register) .................................................................................................................... 99
4.3.34. 3-phase Voltage Duty Registers ............................................................................................................................. 100
4.3.34.1. [VExVDUTYA] (a-phase Voltage Duty Register) ....................................................................................................... 100
4.3.34.2. [VExVDUTYB] (b-phase Voltage Duty Register) ....................................................................................................... 100
4.3.34.3. [VExVDUTYC] (c-phase Voltage Duty Register) ....................................................................................................... 100
4.3.35. 2-phase Current Registers ..................................................................................................................................... 101
4.3.35.1. [VExIALPHA] (α-phase Current Register) .................................................................................................................. 101
4.3.35.2. [VExIBETA] (β-phase Current Register) .................................................................................................................... 101
6. Revision History ........................................................................................................................................ 104
RESTRICTIONS ON PRODUCT USE ............................................................................................................. 107
2021-02-24
Rev. 3.1
Page 6
TXZ/TXZ+ Family
6 / 107
Advanced Vector Engine Plus
List of Figures
Figure 2.1 Block diagram of VE ............................................................................................................... 12
Figure 2.2 Connection diagram of VE and peripherals ............................................................................ 14
Figure 3.1 Example of Motor Control Operation Status Flowchart .......................................................... 15
Figure 3.3 Relationship diagram of tasks ................................................................................................. 22
Figure 4.1 [VExVDC]/[VExVDCL] store register ...................................................................................... 70
Figure 4.2 ADC conversion time .............................................................................................................. 87
List of Tables
Table 2.1 List of signals ........................................................................................................................... 13
Table 3.1 Execution task in each schedule.............................................................................................. 17
Table 3.2 Example of setting for typical operation flow ........................................................................... 18
Table 3.4 List of tasks .............................................................................................................................. 21
Table 4.1 <UPWM>, <UOC[1:0]> PMD setting: Output control of U-phase(UOx, XOx) ......................... 92
Table 4.2 <VPWM>, <VOC[1:0]> PMD setting: Output control of V-phase(VOx, YOx) .......................... 92
Table 4.3 <WPWM>, <WOC[1:0]> PMD setting: Output control of W-phase(WOx, ZOx) ...................... 92
Table 6.1 Revision history ...................................................................................................................... 104
2021-02-24
Rev. 3.1
Page 7
7 / 107
Preface
Related document
Document name
Advanced Programmable Motor Control Circuit
12-bit Analog to Digital Converter
Exception
Clock Control and Operation Mode
Product Information
TXZ/TXZ+ Family
Advanced Vector Engine Plus
2021-02-24
Rev. 3.1
Page 8
TXZ/TXZ+ Family
8 / 107
Advanced Vector Engine Plus
Conventions
●Numeric formats follow the rules as shown below:
Hexadecimal: 0xABC
Decimal: 123 or 0d123 – Only when it needs to be explicitly shown that they are decimal numbers.
Binary: 0b111 – It is possible to omit the "0b" when the number of bit can be distinctly understood from a
sentence.
● "_N" is added to the end of signal names to indicate low active signals.
● It is called "assert" that a signal moves to its active level, "deassert" to its inactive level.
● When two or more signal names are referred, they are described like as [m: n].
Example: S[3: 0] shows four signal names S3, S2, S1 and S0 together.
●The characters surrounded by [ ] defines the register.
Example: [ABCD]
●"n" substitutes suffix number of two or more same kind of registers, fields, and bit names.
Example: [XYZ1], [XYZ2], [XYZ3][XYZn]
●"x" substitutes suffix number or character of units and channels in the Register List.
In case of unit, "x" means A, B, and C ...
Example: [ADACR0], [ADBCR0], [ADCCR0][ADxCR0]
In case of channel, "x" means 0, 1, and 2 ...
Example: [T32A0RUNA], [T32A1RUNA], [T32A2RUNA] [T32AxRUNA]
●The bit range of a register is written like as [m: n].
Example: Bit[3: 0] expresses the range of bit 3 to 0.
●The configuration value of a register is expressed by either the hexadecimal number or the binary number.
●Properties of each bit in a register are expressed as follows:
R: Read only
W: Write only
R/W: Read and Write are possible
● Unless otherwise specified, register access supports only word access.
● The register defined as reserved must not be rewritten. Moreover, do not use the read value.
● The value read from the bit having default value of "—" is unknown.
● When a register containing both of writable bits and read-only bits is written, read-only bits should be written
with their default value, in the cases that default is "—", follow the definition of each register.
●Reserved bits of the Write-only register should be written with their default value.
In the cases that default is "—", follow the definition of each register.
●Do not use read-modified-write processing to the register of a definition which is different by writing and
read out.
2021-02-24
Rev. 3.1
Page 9
TXZ/TXZ+ Family
9 / 107
Advanced Vector Engine Plus
All other company names, product names, and service names mentioned herein may be trademarks of their
respective companies.
2021-02-24
Rev. 3.1
Page 10
10 / 107
Terms and Abbreviation
Some of abbreviations used in this document are as follows:
ADC Analog to Digital Converter
A-PMD Advanced Programmable Motor Control Circuit
A-VE+ Advanced Vector Engine Plus
PMD Programmable Motor Control Circuit
VE Vector Engine
TXZ/TXZ+ Family
Advanced Vector Engine Plus
2021-02-24
Rev. 3.1
Page 11
TXZ/TXZ+ Family
11 / 107
Function
Classification
Calculate with fixed point number.
Interface task for PMD(Note1) and ADC(Note2)
d axis PI control, q axis PI control.
- Output limit by voltage scalar value
SIN/COS
Calculate sine and cosine values at phase θ
- Phase interpolation and phase clipping possible
- Coordinate transformation(Inverse park transformation)
Clarke transformation)
Convert 3-phase voltage to PWM output setting of PMD(Note1) (2 types)
- Compensation control of dead time
Trigger generation
task
Calculate AD conversion sampling timing set value of PMD from 3-phase
duty.
Read the ADC(Note2) conversion results and convert it to fixed point
- Current polarity determination (hysteresis/reverse hysteresis)
- Phase transformation (Clarke transformation)
- Axis transformation (park transformation)
- Arctangent (ATAN) calculation task
- Square root calculation task
Execute tasks sequentially
- 15 types of schedule
- Command start
process task by the ADC conversion end interrupt
Schedule end
interrupt
Interrupt that occurs when PWM interrupt is input from PMD(Note1) during
output schedule execution
Task end interrupt
Interrupt that occurs when the specified task completion.
Outputs a signal at task transition timing during schedule operation.
It can be monitored by PMD's(Note1) debug output function.
Advanced Vector Engine Plus
1. Outlines
The advanced vector engine plus (hereafter referred to as VE) can support vector control of 1 channel motor in 1
unit. The following is a list of functions.
- Start input schedule by end of AD conversion.
Start from the standby state after the output schedule ends from the input
Interrupt that occurs at the completion of schedule
Note1: For details of the PMD, refer to the reference manual "Advanced Programmable Motor Control
Circuit".
Note2: For details of the ADC, refer to the reference manual "12-bit Analog to Digital Converter".
2021-02-24
Rev. 3.1
Page 12
12 / 107
Ta sk s
Current Control
Output voltage
transformation
Output control
Trigger generation
Input process
Input current
transformation
Scheduler
Schedule 0
Schedule
management
Start co
ntrol
Schedule
control
Interrupt control
Registers
Computation
Unit
INTPWMx
INTVCNx
Decoder
Error detection
ADC
INTADxPDA
INTADxPDB
INTVCTx
VExDBGO
Schedule 1
Schedule 15
PMD
ADxREG0 to 3
VExCMPU to W
VExTRGCMP0,1
VExTRGSEL
VExEMGRS
VExOUTCR
2. Configuration
2.1. Configuration of the VE
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Figure 2.1 Block diagram of VE
2021-02-24
Rev. 3.1
Page 13
TXZ/TXZ+ Family
13 / 107
U-phase PWM duty
([VExCMPU] register output to PMD)
V-phase PWM duty
([VExCMPV] register output to PMD)
W-phase PWM duty
([VExCMPW] register output to PMD)
Trigger compare 0
([VExTRGCMP0] register output to PMD)
([VExTRGCMP1] register output to PMD)
Synchronous trigger output selection
([VExTRGSEL] register output to PMD)
Conduction control / output control
([VExOUTCR] register output to PMD)
EMG release
[VExEMGRS]
9
INTPW Mx
PWM interrupt (from PMD)
Input
Product Information
ADC conversion result 0
(Current 1 data from ADC)
ADC conversion result 1
(Current 2 data from ADC)
ADC conversion result 2
(Current 3 data from ADC)
ADC conversion result 3
(DC voltage data from ADC)
ADC conversion end interrupt A
(Trigger from ADC)
ADC conversion end interrupt B
(Trigger from ADC)
16
INTVCNx
Schedule end interrupt
Output
Exception, Product Information
17
INTVCTx
Task end interrupt
Output
Exception, Product Information
18
VExDBGO
Task transition signal (debug output)
Output
Product Information
Advanced Vector Engine Plus
Table 2.1 List of signals
No Signal name Signal name I/O Related Reference manual
1 VExCMPU
2 VExCMPV
3 VExCMPW
4 VExTRGCMP0
5 VExTRGCMP1
6 VExTRGSEL
7 VExOUTCR
8 VExEMGRS
10 ADxREG0
11 ADxREG1
12 ADxREG2
13 ADxREG3
Trigger compare 1
(
register output to PMD)
Output Product Information
Output Product Information
Output Product Information
Output Product Information
Output Product Information
Output Product Information
Output Product Information
Output Product Information
Input Product Information
Input Product Information
Input Product Information
Input Product Information
14 INTADxPDA
15 INTADxPDB
Input Product Information
Input Product Information
2021-02-24
Rev. 3.1
Page 14
TXZ/TXZ+ Family
14 / 107
VE ch0
PMD ch0
ADC unit A
Trigger output
Port
UO0
VO0
WO0
XO0
YO0
ZO0
・
・
・
Port
AINAx
ADAREG0
ADAREG1
ADAREG2
ADAREG3
VE0CMPU
VE0CMPV
VE0
CMPW
VE0OUTCR
VE0EMGRS
VE0TRGCMP0
VE0TRGCMP1
VE0TRGSEL
INTPW M0
INTPW M0
PMD0CMPU
PMD0CMPV
PMD0CMPW
PMD0OUTCR
PMD0EMGRS
PMD0TRGCMP0
PMD0TRGCMP1
PMD0TRGSEL
PWM output
Protect signal
(Internal)
EMG0
OVV0
Protect signal
(External)
General purpose trigger
PMD trigger 0 to 5
Monitor function output
from timer
Analog input
INTADAPDA
INTADAPDA
INTADAPDB
INTADAPDB
Current 1 input
Current 2 input
Current 3 input
DC voltage input
ADAREG0
ADAREG1
ADAREG2
ADAREG3
Advanced Vector Engine Plus
2.2. Interaction between the VE, PMD, and ADC
As shown in Figure 2.2, the VE allows to swap data between the PMD and ADC directly.
When the [PMDxCMPU], [PMDxCMPV], [PMDxCMPW], [PMDxMDOUT], [PMDxTRGCMP0],
[PMDxTRGCMP1] and [PMDxTRGSEL] registers of the PMD is set to the VE mode with the
[PMDxMODESEL] register, these registers are switched to [VExCMPU], [VExCMPV], [VExCMPW],
[VExOUTCR], [VExTRGCMP0], [VExTRGCMP1] and [VExTRGSEL] of the VE registers(Note). In this case,
these VE registers cannot be controlled via the corresponding registers of the PMD by the CPU. These registers
can be written by the VE. There are no read/write restrictions for other PMD registers.
The VE can read the value of the conversion result storage registers ([ADxREG0], [ADxREG1], [ADxREG2], [ADxREG3]) of the ADC in the input process task. When reading the conversion result, phase information set in
the conversion program for each synchronous trigger from the PMD is also read from the ADC.
Note: Even if PMD register is switched to VE register, double buffer / triple buffer function of PMD is
valid. Refer to "Advanced Programmable Motor Control Circuit" in the reference manual for details
of buffer function.
When executing double buffers / triple buffers with PMD, while executing the task of operating
these registers with VE (output control 1 task/output control 2 task/trigger generation task, refer to
"3.3 Description of Tasks".) Even if the double buffer / triple buffer execution stage update timing is
reached, the execution stage is not updated.
Figure 2.2 Connection diagram of VE and peripherals
2021-02-24
Rev. 3.1
Page 15
TXZ/TXZ+ Family
15 / 107
RESET
Initial input
Stop
Positioning
Forced
commutation
Speed control by
current feedback
Brake
Initial setting
EMG release
:
Executed by the VE
:
Software control
Change
[VExACTSCH]
Enable VE
Change
[VExMODE]
Change [VExACTSCH
]
Change [VExMODE
]
Change [VExACTSCH]
Change [VExMODE]
Change [VExACTSCH]
Change [VExMODE]
Change [VExACTSCH]
Change [VExMODE]
Change
[VEx
ACTSCH]
Change[VExMODE]
Advanced Vector Engine Plus
3. Description of Operations
3.1. Clock Supply
When you use VE, please set an applicable clock enable bit to "1" (clock supply) in Clock supply and stop register
A for fsys ([CGFSYSENA], [CGFSYSMENA]), Clock supply and stop register B for fsys ([CGFSYSENB], [CGFSYSMENB]), and Clock supply and stop register for fc ([CGFCEN]).
An applicable register and the bit position vary according to a product. Therefore, the register may not exist with
the product. Please refer to "Clock Control and Operation Mode" of the reference manual for the details.
3.2. Schedule Management
Figure 3.1 shows a flowchart of motor control. The VE changes operation status according to the schedule setting
([VExACTSCH]) and mode setting ([VExMODE]).
Figure 3.1 Example of Motor Control Operation Status Flowchart
2021-02-24
Rev. 3.1
Page 16
Advanced Vector Engine Plus
16 / 107
Item
Function
RESET Resets the MCU.
Initial setting Specifies the initial setting by software.
Stop Stops the motor.
Initial input Samples and stores zero-current data when the motor is at stop.
Positioning Controls the motor initial position.
TXZ/TXZ+ Family
Forced commutation
Speed control by current feedback Control motor rotation speed by current feedback.
Brake Deceleration control
EMG release Release the EMG protection state.
Rotates the motor. The motor is rotated without current feedback control at
a specified speed in a motor activation period.
2021-02-24
Rev. 3.1
Page 17
TXZ/TXZ+ Family
17 / 107
Provided by
execution
SIN/COS
Output
formation
for
for
mation
Input
formation
Task 5
Task 6
Task 7
Task 8
Task 11
Task 0
Task 9
Task 1
Task 2
Task 10
Task 3
Task 4
Task 12
Task 13
0:Individual
task execution
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
(Note 1)
10: Schedule 10
11: Schedule 11
12: Schedule 12
13: Schedule 13
14: Schedule 14
Advanced Vector Engine Plus
3.2.1. Schedule Control
An operation schedule is selected with the [VExACTSCH] register.
The schedule is comprised of the output schedule handling output process tasks and the input schedule handling
input process tasks. Table 3.1 shows the relationship between the schedules and operation tasks.
A task operation is specified with the dedicated register according to the motor control method.
Table 3.1 Execution task in each schedule
Output schedule
execution tasks
Input schedule
execution tasks
only individual
Schedule
Selection
[VExACTSCH]
<VACT>
1: Schedule 1
Current
control
calcula-
coordi-
tion
(Note 1)
nate
axis
trans-
Output
phase
trans-
mation
1
Output
phase
trans-
mation
2
-
Output
control
1
Output
control
2
-
Trigger
genera-
tion
(Note 1)
Input
process
1
Input
process
2
-
Input
phase
trans-
for
coordi-
nate
axis
trans-
ATAN2
calcula-
tion
(Note 1) (Note 1)
- -
Square
root
calcula-
tion
2: Schedule 2 - - - - -
3: Schedule 3 - - - - -
4: Schedule 4 -
-
-
-
- -
5: Schedule 5 - - - - - -
6: Schedule 6 - - - - - -
7: Schedule 7 -
-
-
-
- -
8: Schedule 8 - - - - -
9: Schedule 9 - - - - - - - - - - -
15:Schedule 15 - - - - - - - - - -
-
- - - - - - - -
- - - - - - - - -
- - - - - - - - -
-
- - - - - - - -
- - - - - - - - - -
Note 1: Only the tasks that are specified with [VExTASKAPP] are executed.
Note 2: : Execution task, -: Non execution task
2021-02-24
Rev. 3.1
Page 18
18 / 107
Setting
Phase
<PVIEN>
Forced
commutation
Current feedback
speed control
×
Start command
Execute
output schedule
Execute
input schedule
Wait for
start trigger
Schedule end
Yes
No
Start trigger
Repeated specified
number of times?
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Table 3.2 Example of setting for typical operation flow
Motor control
flow
Stop 9 0
Initial input 9 0
Positioning 1 5 0 01 0
Brake 4 6 0 01 0
EMG release 9 0
Short circuit brake 4 6
Schedule
setting
[VExACTSCH]
<VACT>
1 5 1 01 0
1 5 1 01 0
Task selection
[VExTASKAPP]
<VTASK>
interpolation
enable
[VExMODE]
×
×
×
Output control
operation
[VExMODE]
<OCRMD>
00 0
00 1
11 0
10 0
Zero-current
detection
[VExMODE]
<ZIEN>
×: don’t care
An output schedule starts operation with the command ([VExCPURUNTRG]). When all output-related tasks are
completed, the VE enters standby state and waits for a start trigger ([VExTRGMODE] setting).
An input schedule starts operation by a start trigger. When all input-related tasks are completed, the VE generates
an interrupt to the CPU and enters halt state. However, if the number of repeating of the schedule
([VExREPTIME]) is set to "2" or more, the output schedules continue execution. An interrupt does not occur
until the schedules have been executed for the specified number of times.
Note: Repeat setting is not available in Schedule 10 to Schedule 15. (The schedule ends once even if the
condition is [VExREPTIME]≥ 2.)
Figure 3.2 Operation schedule flowchart
2021-02-24
Rev. 3.1
Page 19
TXZ/TXZ+ Family
19 / 107
Register name
Function
Advanced Vector Engine Plus
3.2.2. Start Control
Before the schedule is started, set the VE to enable ([VExEN]<VEEN> = 1), and then set the operation schedule
selection register ([VExACTSCH]), task selection register ([VExTASKAPP]) and operation schedule repeat
specify register ([VExREPTIME]). After that, the schedule can be executed as follows:
A schedule of the VE is comprised of output schedules and input schedules. Typically, the VE enters wait state
after an output schedule is complete. At this time, if a startup trigger occurs, an input schedule is executed.
The output schedule and the input schedule are started on different conditions below:
● Start conditions for the output schedule
‒ Starting by the command. A task ([VExTASKAPP]) is specified with [VExCPURUNTRG].
‒ Repeat setting. Starting after the input schedules have been executed for the number of times
([VExREPTIME]≥ 1).
● Start conditions for the input schedule
‒ Starting an input process task that is started from wait state by a trigger (specified with
[VExTRGMODE]). In this case, the VE is in wait state after the output schedule is complete.
‒Starting by the command. A task ([VExTASKAPP]) is specified with [VExCPURUNTRG].
[VExACTSCH]
[VExTASKAPP]
[VExREPTIME]
[VExTRGMODE]
Operation
schedule selection
Starting
task designation
The number of
repeating of
the schedule
Start trigger mode
selection
Table 3.3 Schedule-related tasks
0x0: Only the task specified with [VExTASKAPP] is executed.
0x1: Schedule 1 is executed.
0x2: Schedule 2 is executed.
0x3: Schedule 3 is executed.
0x4: Schedule 4 is executed.
0x5: Schedule 5 is executed.
0x6: Schedule 6 is executed.
0x7: Schedule 7 is executed.
0x8: Schedule 8 is executed.
0x9: Schedule 9 is executed.
0xA: Schedule 10 is executed.
0xB: Schedule 11 is executed.
0xC: Schedule 12 is executed.
0xD: Schedule 13 is executed.
0xE: Schedule 14 is executed.
0xF: Schedule 15 is executed.
Specifies the task number that can be executed among the selected
operation schedule.
Sets the number from "1" to "15".
Note: When one-time execution is specified, set "1".If "0" is set, the
schedule is not executed.
Selects the input schedule trigger.
Sets INTADxPDA or INTADxPDB.
2021-02-24
Rev. 3.1
Page 20
Advanced Vector Engine Plus
20 / 107
3.2.3. Interrupt Control
The VE has a schedule end interrupt (INTVCNx) that occurs at the completion of the schedule, and a task
completion interrupt (INTVCTx) that occurs at the completion of specified task.
●Schedule end interrupt
(1) Specifies the schedule with the operation schedule selection register ([VExACTSCH]). Sets the
command ([VExCPURUNTRG] = 1).
(2) When the schedules have been executed for the specified times ([VExREPTIME]), an INTVCNx
interrupt occurs.
(3) If the error detection interrupt control is enabled ([VExERRINTEN]<VERREN> = 1), a PWM
interrupt of the PMD circuit occurs while output schedule is being executed. Then an INTVCNx
interrupt occurs and an error flag ([VExERRDET]<VERRD>) is set to "1".
●Task end interrupt
(1) Specifies a task triggered of a task end interrupt ([VExTASKAPP]<VITASK>). Sets task end interrupt
control to enable ([VExERRINTEN]<INTTEN> = 1).
(2) Starts the schedule by the command ([VExCPURUNTRG] = 1). Sets a INTVCTx interrupt to occur at
the completion of the task specified with <VITASK>
TXZ/TXZ+ Family
2021-02-24
Rev. 3.1
Page 21
Advanced Vector Engine Plus
21 / 107
Task
number
Output coordinate
transformation
Output phase
transformation 1
Input phase
transformation
3.3. Description of Tasks
This subsection describes the outline of each task operation in the schedule.
Table 3.4 shows the task numbers that are used to specify the execution task and the start task.
Table 3.4 List of tasks
Task Task function
PI control for d-axis/q-axis (PI control output limit enable)
Current control
SIN/COS
calculation
Non-interference control for d-axis and q-axis, voltage scalar
limitation
Transforms from 2-phase to 3-phase [Inverse Clarke
transformation]
Converts the data to PMD setting format. Switches PWM Shift
1.
Limits the PWM output.
Sets the dead time compensation control.
Converts the data to PMD setting format. Switches PWM Shift
2.
Limits the PWM output.
Sets the dead time compensation control.
Generates the synchronous trigger timing for ADC.
Corresponds to sensor, 3-shunt and 1-shunt current
detection.1-shunt is corresponded in the case of PWM Shift
prohibited or PWM Shift 1.
Captures the result of AD conversion and converts them into
fixed-point format.
Specifies the hysteresis width to determine the current polarity.
Corresponds to sensor, 3-shunt and 1-shunt current
detection.1-shunt is corresponded in the case of PWM Shift 2.
Captures the result of AD conversion and converts them into
fixed-point format.
Specifies the hysteresis width to determine the current polarity.
11
10
7
0
9
1
2
Transforms from 3-phase to 2-phase.
Input coordinate
axis
transformation
ATAN2 calculation Calculates the arctangent. 12
SQRT calculation Calculates the square root. 13
Performs Park transformation
Calculates the declination angle of the current vector or the
induced voltage vector on the d-q coordinate.
3
4
2021-02-24
Rev. 3.1
Page 22
22 / 107
Input process
Output control
Phase
transformation
Current control
SIN/COS
calculation
Phase
interpolation
PI
control
PI
control
Cordinate axis
transformation
[I-Park]
Phase
transformation 1
[SVM]
Output
control 1
sin,cos
VD
VQ
Valpha
Vbeta
DUTYA
DUTYB
DUTYC
SECTOR
θ
ω
Trigger
generation
Phase
transformation
[Clark]
Input
process1
Ialpha
Ibeta
VDC,VDCL
ID
IQ
PWM output
setting (PMD)
Synchronous
trigger t setting
(PMD)
Current/Voltage
detection value
(ADC)
SIN
COS
IDREF
ID
IQ
IQREF
VDC
IA
IB
IC
Phase
transformation 2
[I-Clark]
Output
control 2
Input
process2
VDC
Cordinate axis
transformation
[Park]
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Figure 3.3 Relationship diagram of tasks
2021-02-24
Rev. 3.1
Page 23
TXZ/TXZ+ Family
23 / 107
Advanced Vector Engine Plus
3.3.1. Current Control (Task 5)
The current control task is comprised of a PI control unit for d-axis current and a PI control unit for q-axis current,
and calculates the d-axis and q-axis voltages respectively.
The expansion control enables the non-interference control and the voltage scalar limitation that controls d-axis
and q-axis together.
a. d-axis current PI control
<Equation>
[PI control]
Δid = [VExIDREF] - [VExID]; Calculates between the current reference value
and the current feedback
kpg = ([VExCIDKG]<CIDKPG> setting) ; Range of proportional coefficient
kig = ([VExCIDKG]<CIDKIG> setting) ; Range of Integral coefficient
limit = [VExPIOLIM]if (kpg ≥ 2) n = kpg ; Selected range is more than twice
cidki = [VExCIDKI] × kig ; Integral coefficient vdi0 = cidki × Δid + VDI ; Calculates the integral components.
vd0 = cidkp × Δid + vdi0 ; Calculates the voltage by adding the
proportional components.
[PI control output limitation]
if (vd0 > limit) ; The upper-limit value
vd = limit
[VExMCTLF]<PIDOVF> = 1
else if (vd0 < -limit) ; The lower-limit value
vd = -limit
[VExMCTLF]<PIDOVF> = 1
else
[VExVD] = vd × n ; Save more than a double proportional range
to be compensated.
[Anti-windup]
Δvd = vd - vd0 ; Calculates the difference between the d-axis
voltage and the limit.
VDI = vdi0 + Δvd × ([VExMODE]<AWUMD> setting) ; Reflects the above difference
to the integral component.
vd = vd0
2021-02-24
Rev. 3.1
Page 24
24 / 107
Register name
Function
Detail
d-axis current reference
value
Integral component
of d-axis voltage
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Input
[VExID]
[VExIDREF]
[VExCIDKP]
[VExCIDKI]
[VExCIDKG]
[VExPIOLIM]
[VExMODE]
d-axis current
Proportional coefficient
Integral coefficient
[3:0] Sets a range of
d-axis PI control integral
coefficient
[11:8] Sets a range of
d-axis PI control
proportional coefficient
PI control output
limitation
[9:8] Anti-windup ratio
setting when output is
limited.
0: Expansion control is disabled.(Scalar limitation is
disabled.)
1: Expansion control is enabled.
<VSLIMMD>
00: Scalar limitation is disabled.
(Limitation in each axis is enabled.)
01: Scalar limitation is enabled.
(Limitation on the d-axis direction.)
10: Scalar limitation is enabled.
(Limitation on the q-axis direction.)
11: Scalar limitation is enabled.
(dq proportional limitation.)
16-bit fixed-point data (15 fractional bits)
Output
[VExVDELTA]
[VExVD]
[VExVQ]
[VExMCTLF]
The voltage declination
angle
d-axis voltage
q-axis voltage
excess flag for voltage
16-bit data
0x0000 to 0x4000 (0-degree to 90-degree)
32-bit fixed-point data (31 fractional bits)
<VSOVF>
0:non excess 1:excess
2021-02-24
Rev. 3.1
Page 29
TXZ/TXZ+ Family
29 / 107
Register name
Function
Detail
The value of clipped
phase
Advanced Vector Engine Plus
3.3.2. SIN/COS calculation (Task 6)
The SIN/COS calculation task executes phase interpolation calculation and SIN/COS calculation.
Phase interpolation calculates the rotation speed by integrating with the PWM period. It is executed only when
phase interpolation is enabled ([VExMODE]<PVIEN> = 1).
a. Phase interpolation
<Equation>
theta0 = [VExOMEGA] × [VExTPWM] + [VExTHETA]; Calculates the value of
phase interpolation
theta0 = theta0 & 0x0000FFFF
if ([VExMODE]<CLPEN> = 1) ; Enables the clipping if ([VExOMEGA]≥ 0) ; On positive rotation
if ([VExTHETA]≤[VExTHTCLP]≤ theta0) theta0 = [VExTHTCLP] else if (theta0 ≤[VExTHETA]≤[VExTHTCLP]) theta0 = [VExTHTCLP] else if ([VExTHTCLP]≤ theta0 ≤[VExTHETA]) theta0 = [VExTHTCLP]
else if ([VExOMEGA] < 0) ; On inverse rotation
if (theta0 ≤[VExTHTCLP]≤[VExTHETA]) theta0 = [VExTHTCLP] else if ([VExTHTCLP]≤[VExTHETA]≤ theta0) theta0 = [VExTHTCLP] else if ([VExTHETA]≤ theta0 ≤[VExTHTCLP]) theta0 = [VExTHTCLP]
if ([VExMODE]<PVIEN> = 1) [VExTHETA] = theta0 ; Updates the [VExTHETA] value when
phase interpolation is enabled
Input
Output
[VExTHETA]
[VExOMEGA]
[VExTPWM]
[VExTHTCLP]
[VExMODE]
[VExTHETA]
Phase θ16-bit fixed-point data (0.0 to 1.0, 16 fractional bits)
Rotational speed
PWM period rate
[0] Phase interpolation
enable
[7] Phase clipping
control
Phase θ
16-bit fixed-point data (-1.0 to 1.0, 15 fractional bits)
16-bit data
16-bit fixed-point data (0.0 to 1.0, 16 fractional bits)
<PVIEN>
0: Phase interpolation is disabled
1: Phase interpolation is enabled
<CLPEN>
0: Clipping is disabled 1: Clipping is enabled
16-bit fixed-point data (0.0 to 1.0, 16 fractional bits)
2021-02-24
Rev. 3.1
Page 30
TXZ/TXZ+ Family
30 / 107
Register name
Function
Detail
Advanced Vector Engine Plus
b. SIN/COS calculation
<Equation>
[VExSINM] = [VExSIN]; Stores the previous value (for input process)
[VExCOSM] = [VExCOS]
[VExSIN] = SIN ([VExTHETA]) ; Calculates the SIN and COS values
[VExCOS] = SIN ([VExTHETA] + 1 / 4)
if ([VExFMODE]<MREGDIS> = 1) ; Confirms that the previous value is not maintained
[VExSINM] = [VExSIN]
[VExCOSM] = [VExCOS]
Note: SIN: Sine calculation
Input
Output
[VExTHETA]
[VExFMODE]
[VExSIN]
[VExCOS]
[VExSINM]
[VExCOSM]
Phase θ
[9] Selects to store the
previous value of SIN
and COS
The sine value of θ
The cosine value of θ
Previous sine value
Previous cosine value
16-bit fixed-point data (0.0 to 1.0, 16 fractional bits)
<MREGDIS>
0: Previous value is maintained.
1: Previous value is not maintained.
16-bit fixed-point data (-1.0 to 1.0, 15 fractional bits)
2021-02-24
Rev. 3.1
Page 31
TXZ/TXZ+ Family
31 / 107
[VExVD]
d-axis voltage
[VExVQ]
[VExSIN]
[VExCOS]
[VExVALPHA]
[VExVBETA]
Advanced Vector Engine Plus
3.3.3. Output Voltage Transformation (Coordinate Axis Transformation/Phase
Transformation)
Output voltage transformation is performed in two steps: coordinate axis transformation and phase transformation.
There are two types of phase transformation: Space vector transformation and inverse Clarke transformation.
Output phase transformation 1 determines a sector using α-axis voltage and β-axis voltage. This task calculates the
duties of a-phase voltage, b-phase voltage, and c-phase voltage based on space vector transformation in each
sector.
This task can be selected either from 2-phase or 3-phase modulation as a modulation type.
a. Sector determination
<Equation>
[VExSECTORM] = [VExSECTOR]; Stores the previous value
Output phase transformation 2 determines a sector using α-axis and β-axis voltages. This task calculates the duties
of a-phase, b-phase and c-phase voltages based on inverse Clarke transformation. This task supports only 3-phase
modulation as a modulation type.
In addition, if [VExFMODE]<PHCVDIS> is set to "1", this task can calculate the duty of 2- phase voltage.
a. Sector determination
<Equation>
[VExSECTORM] = [VExSECTOR]; Stores the previous value
32-bit fixed-point data (0.0 to 1.0, 31 fractional bits)
2021-02-24
Rev. 3.1
Page 36
TXZ/TXZ+ Family
36 / 107
Advanced Vector Engine Plus
3.3.4. Output Control
Output control unit converts a 3-phase voltage duty into the PMD setting format. The conversion result is set to
[VExCMPU], [VExCMPV], and [VExCMPW]. According to the output control operation setting, [VExOUTCR]
should be set. Dead time compensation control and PWM output limitation can also be executed.
There are two types of output control task: output control 1 and output control 2. Each task supports different
PWM outputs.
Note: When PMD is set to VE mode, the PMD's [PMDxCMPU]/[PMDxCMPV]/[PMDxCMPW]/
[PMDxMDOUT] registers switch to [VExCMPU]/[VExCMPV]/[VExCMPW]/[VExOUTCR].
Even so, double buffer/triple buffer function of PMD is effective. For details of the buffer function, refer
to "Advanced Programmable Motor Control Circuit" in the reference manual.
When double buffers are enabled with PMD, while the output control 1 task/output control 2 task/trigger
generation task are running, the execution stage is not updated at the execution stage update timing.
3.3.4.1. Output control 1 (Task 0)
Output control 1 task supports normal PWM outputs and PWM outputs in the PWM Shift 1. When PWM Shift is
enabled, if the rotational speed ([VExOMEGA]) is lower than the reference of PWM Shift switch
([VExFPWMCHG]), PWM outputs changes to PWM Shift 1.
Note: PWM Shift 1 can only be selected in the 1-shunt current detection mode.
a. Output conversion
<Equation>
[VExMCTLF]<LAVFM> = [VExMCTLF]<LAVF> ; Updates a previous value of low-speed flag
[VExMCTLF]<PLSLFM> = [VExMCTLF]<PLSLF> ; Updates a previous value of PWM duty check flag
[VExMCTLF] = & 0xFFEE ; Current flag is cleared
if (([VExFMODE]<IDMODE[1]> = 1) & ([VExFMODE]<C2PEN> = 1) & ([VExFMODE]<SPWMEN> = 1)) ; Shift 1 is enabled in 1-shunt current and
2-phase modulation modes
if (|[VExOMEGA]| < [VExFPWMCHG]) [VExMCTLF]<LAVF> = 1 ; Sets the low-speed flag for low speed
determination
dutya = [VExVDUTYA]
dutyb = [VExVDUTYB]
dutyc = [VExVDUTYC]
if ([VExMCTLF]<LAVF> = 1) ; PWM Shift 1 at low-speed
if ([VExMCTLF]<LAVF> = 1) ; PWM Shift 1 at low-speed
if ([VExSECTOR]<[0]> = 0) difmin = difmax ; Maximum width difference at even sectors
else difmin = difmax-difmin ; Medium width difference at odd sectors
else if ([VExFMODE]<C2PEN> = 1) ;
if ([VExSECTOR] = 0, 3, 4, 7, 8, 11) difmin = difmin × 2 ; Corrected on the sector
(minimum width = minimum width difference)
if (difmid < difmin) difmin = difmid ; Check the minimum width difference
after correction
dmax = pwma
if (pwmb > dmax) dmax = pwmb
if (pwmc > dmax) dmax = pwmc ; Minimum width
offmin = 1-dmax ; All OFF-width
if ([VExMODE]<OCRMD> = 01) ; Output enable
if ([VExFMODE]<IDMODE[1]> = 1)) ; 1-shunt current detection
if (difmin < [VExMINPLS]) [VExMCTLF]<PLSLF> = 1 ; Check the minimum width difference
else ; 3-shunt, 2 sensors
if (offmin < [VExMINPLS]) [VExMCTLF]<PLSLF> = 1 ; All OFF-width check
Normal PWM at 2-phase modulation
2021-02-24
Rev. 3.1
Page 41
41 / 107
Register name
Function
Detail
[3:2] Output control
operation
mode
U-phase PWM duty
setting of the PMD
V-phase PWM duty
setting of the PMD
W-phase PWM duty
setting of the PMD
PMD output control
setting
PMD EMG release
command
[5:4] PWM duty check
flag
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Input
Output
[VExSECTOR]
[VExMODE]
[VExFMODE]
[VExMINPLS]
[VExCMPU]
[VExCMPW]
[VExOUTCR]
[VExEMGRS]
[VExMCTLF]
Sector information
[0] Modulation mode
[3:2] Current detection
Minimum pulse width 16-bit data
[1:0] Low Speed flag
4-bit data
<OCRMD>
<C2PEN>
<IDMODE>
16-bit data ("0x0000" to "0x8000") [VExCMPV]
9-bit setting
1-bit setting
<LAVFM>, <LAVF>
<PLSLFM>, <PLSLF>
2021-02-24
Rev. 3.1
Page 42
TXZ/TXZ+ Family
42 / 107
Register name
Function
Detail
[VExVDUTYA]
a-phase voltage duty
[VExVDUTYB]
b-phase voltage duty
[VExVDUTYC]
[VExMCTLF]
Advanced Vector Engine Plus
3.3.4.2. Output control 2 (Task 9)
Output control 2 task supports two mode outputs: normal PWM outputs and PWM outputs in PWM Shift 2.
When the PWM output in PWM Shift 2 is set, enable PWM Shift ([VExFMODE]<SPWMEN> = 1) and select the
value other than "00" for PWM Shift mode selection ([VExFMODE]<SPWMMD>).
Note: PWM Shift can be selected only in 1-shunt current detection mode.
a. Output conversion
<Equation>
mctlfm = [VExMCTLF]; Read the flag register.
mctlfm = & 0x0011 ; Extracts the current value flag
mctlfm = mctlfm << 1 ; Shifts to the previous value
if (|[VExOMEGA]| < [VExFPWMCHG]) mctlfm[0] = 1 ; Sets a low-speed flag based on low-speed
determination
[VExMCTLF] = & 0xFFCC ; Current flag is cleared.
[VExMCTLF] = | mctlfm ; Update the flag.
pwma = [VExVDUTYA] × 0x8000 ; The setting value of the PMD is converted.
pwmb = [VExVDUTYB] × 0x8000
pwmc = [VExVDUTYC] × 0x8000
Input
c-phase voltage duty
Output
[1:0] Low-speed flag <LAVFM>, <LAVF>
32-bit fixed-point data (0.0 to 1.0, 31 fractional bits)
2021-02-24
Rev. 3.1
Page 43
TXZ/TXZ+ Family
43 / 107
Register name
Function
Detail
Sets the upper-limit
value of the PWM.
Sets the lower-limit
value of the PWM.
[11] Indicates the excess
limitation.
Advanced Vector Engine Plus
b. PWM output limitation
<Equation>
if ([VExPWMMAX] = 0) max = 0x8000
else max = [VExPWMMAX]
if (pwma > max) & (0x8000 > max)) ; Checks the PWM upper-limit for U-phase.
if (([VExMODE]<PWMFLEN> = 0) | (pwma < 0x8000)) ; Confirms the duty of 100% of the output
limitation.
pwma = max
[VExMCTLF]<PWMOVF> = 1
min = [VExPWMMIN]
if ((pwma < min) & (min > 0)) ; Checks the PWM lower-limit for U-phase.
if (([VExMODE]<PWMBLEN> = 0) | (pwma > 0)) ; Confirms the duty of 0% of the output
limitation.
pwma = min
[VExMCTLF]<PWMOVF> = 1
(Calculates the other 2-phase in the same manner)
[VExPWMMAX]
[VExPWMMIN]
Input
Output
[VExMODE]
[VExMCTLF]
[12] Sets the output duty
of 0% when the PWM is
limited.
[13] Sets the output duty
of 100% when the PWM
is limited.
flag of the PWM output
16-bit data ("0x0000" to "0x8000")
<PWMBLEN>
0: Duty of 0% setting is disabled.
1: Duty of 0% setting is enabled.
<PWMFLEN>
0: Duty of 100% setting is disabled.
1: Duty of 100% setting is enabled.
<PWMOVF>
2021-02-24
Rev. 3.1
Page 44
TXZ/TXZ+ Family
44 / 107
Register name
Function
Detail
The amount of dead time
compensation
Dead time compensation
Advanced Vector Engine Plus
c. Dead time compensation
<Equation>
if (0 < pwma < 0x8000) dt = [VExDTC]
else dt = 0
if ([VExDTCS]<IASTS> = 001, 101) ; On Positive current
if ([VExMODE]<PMDDTCEN> = 1) ; Sets the dead time correction of the PMD
The trigger generation unit calculates the synchronous trigger timing for ADC from the PWM duty setting values
([VExCMPU], [VExCMPV], and [VExCMPW]) based on the current detection method, and sets it to the [VExTRGCMP0] and [VExTRGCMP1] registers.
Note 1: [VExTRGCMP0] and [VExTRGCMP1] are updated only in 1-shunt current detection
Note 2: [VExTRGCMP0] and [VExTRGCMP1] are not updated when PWM Shift 2 is selected.
Note 3: Please select "Compare to basic carrier" in the trigger control register comparison carrier selection
[PMDxTRGCMP1] / [PMDxTRGSEL] register of PMD when PMD is set to VE mode. Even in that
case, double buffer / triple buffer function of PMD is effective. When double buffers / triple buffers are
enabled in the PMD, the execution stage is updated even when the update timing of the double buffer /
triple buffer execution stage is reached while the output control 1 task/output control 2 task/trigger
generation task is being executed not.
Note 5: For details of PMD, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
mode
<IDMODE>
PWM Shift
setting
<SPWMEN>
Modulation
mode
<C2PEN>
Low-speed
flag
<LAVF >
Trigger generation formula
3-shunt -
2 sensors -
Disable
PWM Shift
1-shunt
(Latter half)
PWM Shift 1 2-phase
PWM Shift 2 3-phase - (No trigger generation)
Disable
PWM Shift
1-shunt
(First half)
PWM Shift 1 2-phase
PWM Shift 2 3-phase - (No trigger generation)
3-phase -
2-phase -
3-phase -
2-phase -
- (No trigger generation)
- (No trigger generation)
High-speed
Low-speed
High-speed
Low-speed
[VExTRGCMP0] =
[VExTRGCMP0] =
[VExTRGCRC]
[VExTRGCRC]
Note: dmin: A value on the minimum duty phase, dmax: A value on the maximum duty phase, dmid: A value
on the medium duty phase
2021-02-24
Rev. 3.1
Page 48
48 / 107
Register name
Function
Detail
U-phase PWM duty
setting of the PMD
V-phase PWM duty
setting of the PMD
W-phase PWM duty
setting of the PMD
[8] Trigger correction
enable
PMD trigger 0 timing
setting
PMD trigger 1 timing
setting
PMD trigger selection
setting
TXZ/TXZ+ Family
Advanced Vector Engine Plus
[VExCMPU]
16-bit data ("0x0000" to "0x8000") [VExCMPV]
[VExCMPW]
Input
[VExTADC]
[VExTRGCRC]
[VExSECTOR]
[VExMODE]
[VExFMODE]
ADC conversion time
Trigger correction value 16-bit data ("0x0000" to "0x8000")
Sector information
[0] Zero-current
detection
[3:2] Output control
operation
[0] Modulation mode
[1] PWM Shift enable
[3:2] Current detection
mode
[15:14] PWM Shift mode
16-bit data ("0x0000" to "0x8000")
4-bit data
<ZIEN>
0: Normal current detection
1: Zero-current detection
<OCRMD>
00: Output is disabled.
01: Output is enabled.
10: Short circuit brake.
11: EMG release.
<C2PEN>
0: 3-phase modulation 1: 2-phase modulation
<SPWMEN>
0: Shift is disabled 1: Shift is enabled
<IDMODE[1:0]>
00: 3-shunt 01: 2 sensors 10, 11: 1-shunt
<CRCEN>
<SPWMMD>
00: Shift 1
01: Shift 2 (U-phase Center PWM)
10: Shift 2 (V-phase Center PWM)
11: Shift 2 (W-phase Center PWM)
Output
[VExMCTLF]
[VExTRGCMP0]
[VExTRGCMP1]
[VExTRGSEL]
[0] Low-speed flag
<LAVF>
16-bit data ("0x0001" to "0x7FFF")
3-bit data: [VExSECTOR] / 2
2021-02-24
Rev. 3.1
Page 49
TXZ/TXZ+ Family
49 / 107
Advanced Vector Engine Plus
3.3.6. Input Process
In the input process, the vector engine reads conversion results and phase information from the ADC. Depending
on the current detection method and PWM Shift mode setting, the vector engine converts the phase current data
and the voltage data into the fixed-point format and stores them in predefined registers.
In zero-current detection mode, current detection results are stored in the zero-current register.
The vector engine specifies the hysteresis width to determine the current polarity for dead time compensation
control.
There are two types of input process: Input process 1 task and Input process 2 task. Each task supports different
current detection method.
3.3.6.1. Input process 1 (Task 2)
Input process 1 task supports 3-shunt current detection (only 2-phase current detection (Note 1)) and 1-shunt
current detection. However, 1-shunt current detection is not available in PWM Shift 2 (Note 2).
Note 1: Current detection result is used only for two phases. Remained one phase is calculated.
Note 2: PWM Shift can only be selected in 1-shunt current detection mode.
a. Input conversion
<Equation>
[VDC fixed-point transformation/store]
if ([VExMODE]<VDCSEL> = 0) [VExVDC] = [DC voltage] >>1
else [VExVDCL] = [DC voltage] >>1
lavfm = [VExMCTLF]<LAVFM> ; Previous low-speed flag
if ([VExFMODE]<MREGDIS> = 1) ; Previous value invalid.
n = 6 - [Current 2 phase information] -[Current 1 phase information] ; Calculates the phase number
of Current 3
if (n = 1) ia = -ib -ic
else if (n = 2) ib = -ic -ia
else if (n = 3) ic = -ia -ib
[Current storage]
[VExIA] = ia
[VExIB] = ib
[VExIC] = ic
, 10, 11) ia = -ia
2021-02-24
Rev. 3.1
Page 51
51 / 107
Register name
Function
Detail
[VExVDC]
DC supply voltage
[VExVDCL]
DC supply voltage
The ADC conversion
result of a-phase current
The ADC conversion
result of b-phase current
The ADC conversion
result of c-phase current
b-phase current
[VExICO]
c-phase zero-current
Positive
polarity
Negative
polarity
Hysteresis: 0 ≥ HYS
-HYS +HYS
Reverse hysteresis: HYS < 0
-HYS +HYS
-HYS2
+HYS2
- Stable area
+ Stable area
[ |HYS2| ≤ I, I ≤ -|HYS2|, I > HYS, I < -HYS ]
[ |HYS2| ≤ I, I ≤ -|HYS2|, I > HYS, I < -HYS ]
+ Stable area
- Stable area
Positive
polarity
Negative
polarity
Input
(DC voltage)
(Current 1)
(Current 2)
(Current 3)
[VExSECTORM] Previous [VExSECTOR] 4-bit data
[VExMODE]
Input of the ADC
conversion result
[1] Zero-current detection
[4] Selection VDC store
register
16-bit data (The conversion result is stored in the upper 12
bits.)
<ZIEN>
0: Normal current detection
1: Zero-current detection
<VDCSEL>
0: [VExVDC]1: [VExVDCL]
TXZ/TXZ+ Family
Advanced Vector Engine Plus
[3:2] Current detection
mode
Output
Internal
[VExFMODE]
[VExMCTLF]
[VExIAADC]
[VExIBADC]
[VExICADC]
[VExIA]
[VExIB]
[VExIC]
[VExIAO]
[VExIBO]
[9] Selects to store the
previous
value(<LAVFM>)
[1:0] Low-speed flag
a-phase current
c-phase current
a-phase zero-current
b-phase zero-current
b. Current polarity determination
<IDMODE>
00: 3-shunt 01: 2 sensors 10, 11: 1-shunt
<MREGDIS>
0: Previous value is maintained.
1: Previous value is not maintained.
<LAVFM>, <LAVF>
16-bit fixed-point data (0.0 to 1.0, 15 fractional bits)
16-bit data (The result is stored in the upper 12 bits.)
32-bit fixed-point data (-1.0 to 1.0, 31 fractional bits)
16-bit data (The result is stored in the upper 12 bits.)
2021-02-24
Rev. 3.1
Page 52
52 / 107
Register name
Function
Detail
Hysteresis for current
polarity determination
[VExIB]
b-phase current
[VExIC]
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Input
Output
[VExHYS]
[VExHYS2]
[VExDTCS]
[VExMODE]
[VExIA]
[VExDTCS]
Hysteresis 2 for current
polarity determination
Dead time compensation
control/status
[15] Current polarity
determination control
a-phase current
c-phase current
Dead time compensation
control/status
16-bit fixed-point data (-1.0 to 1.0, 15 fractional bits)
Polarity determination level on reverse hysteresis ([VExHYS] < 0).
16-bit fixed-point data (0 to 1.0, 15 fractional bits)
This register is invalid when [VExHYS]≥ 0.
<ICSTS>, <IBSTS>, <IASTS>
000, 010, 100, 110: Undefined
001, 101: Positive current 011, 111: Negative current
<IPDEN>
0: Determination is disabled. 1: Determination is enabled.
32-bit fixed-point data (-1.0 to 1.0, 31 fractional bits)
<ICSTS>, <IBSTS>, <IASTS>
000, 010, 100, 110: Undefined
001, 101: Positive current 011, 111: Negative current
3.3.6.2. Input process 2 (Task 10)
Input process 2 task supports 3-shunt current detection (3-phase detection and 2-phase detection) and 2-sensor
current detection. It also supports 1-shunt current detection when PWM outputting in PWM Shift 2.
A current direction can be specified in each phase.
Note: The zero-current detection mode is not available in input process 2 task.
Note: PWM Shift 2 can only be selected in 1-shunt current detection mode.
a. Input conversion
<Equation>
[VDC fixed-point transformation/store]
if ([VExMODE]<VDCSEL> = 0) [VExVDC] = [DC voltage] >> 1
else [VExVDCL] = [DC voltage] >> 1
[Current 1 read]
if (([VExFMODE]<IDMODE[1]> = 1) & ([VExMCTLF]<[1:0]> = 01, 10, 11)) ; 1-shunt at high-speed
if ([VExFMODE]<SPWMMD> = 01) noc = [VExOUTCR]<UOC>
if ([VExFMODE]<SPWMMD> = 10) noc = [VExOUTCR]<VOC>
if ([VExFMODE]<SPWMMD> = 11) noc = [VExOUTCR]<WOC>
In input coordinate axis transformation task, the values of [VExID] and [VExIQ] are calculated from
[VExIALFA], [VExIBETA], [VExSINM], and [VExCOSM].
a. Coordinate axis transformation
<Equation>
plslfm = [VExMCTLF]<PLSLFM>
if ([VExFMODE]<MREGDIS> = 1) ; Previous value is invalid.
plslfm = [VExMCTLF]<PLSLF>
if (plslfm = 0) ; Check the small pulse flag.
[VExID] = [VExCOSM] × [VExIALPHA] + [VExSINM] × [VExIBETA] ; Calculates the value of Id.
[VExIQ] = -[VExSINM] × [VExIALPHA] + [VExCOSM] × [VExIBETA] ; Calculates the value of Iq.
Input
Output
b. ATAN calculation
When <ATANMD> = 10, ATAN task calculates the declination angle of d-axis and q-axis current.
When <ATANMD> = 11, ATAN task calculates the induced voltage of d-axis and q-axis. Then it calculates the
declination angle using motor voltage equation based on these results.
<Equation>
if ([VExMODE]<ATANMD[1]> = 1) ; Enables calculation of the
declination angle
32-bit fixed-point data (-1.0 to 1.0 and 31 fractional bits)
<ATANMD>
00, 01: Calculation is prohibited.
10: Calculates the declination angle for Id and Iq.
11: Calculates the declination angle of induced voltage of
d-axis and q-axis.
16-bit data (-180-degree to 180-degree)
0x8000 to 0x7FFF
16-bit fixed-point data (15 fractional bits)
3.3.8. Other Tasks
3.3.8.1. ATAN2 (Arctangent function 2) (Task 12)
ATAN2 task calculates the angle from the starting point based on X-axis that draws a straight line from the
starting point to the point of (X, Y) on the X-Y coordinate.
<Equation>
x = [VExTMPREG4]
y = [VExTMPREG5]
z = ATAN (|y|, |x|) ; Arctangent calculation (0-degree to 90-degree)
if (x < 0 & y ≥ 0) z = 0x00008000 - z ; The second quadrant (90-degree to 180-degree)
if (x < 0 & y < 0) z = 0xFFFF8000 + z ; The third quadrant (-90-degree to -180-degree)
if (x ≥ 0 & y < 0) z = -z ; The forth quadrant (0-degree to -90-degree)
if (x = y = 0) z = 0x00000000 ; Output on the original point (0-degree)
[VExTMPREG5] = z
Input
Output
[VExTMPREG5]
Input X
Input Y
The value of the phase
32-bit signed data
32-bit data (-180-degree to 180-degree)
0xFFFF8000 to 0x00008000
2021-02-24
Rev. 3.1
Page 59
TXZ/TXZ+ Family
59 / 107
Register name
Function
Detail
Advanced Vector Engine Plus
3.3.8.2. SQRT (Square root function) (Task 13)
SQRT task outputs the value from 0.0 to 2.0 based on the calculation of the square root function using the inputs
from 0.0 to 4.0.
<Equation>
x = [VExTMPREG5]; Input (0 to 4.0)
n = 0
if (x < 0x2000) n = 1
if (x < 0x0800) n = 2
if (x < 0x0200) n = 3
if (x < 0x0080) n = 4
if (x < 0x0020) n = 5
if (x < 0x0008) n = 6
if (x < 0x0002) n = 7
if (x < 0x8000) n = -1
x = x × 2
if (x ≥ 0x7FFF) x = 0x7FFF
z = SQRT(x) ; Calculates the square root of x,
; Output is the range of 0.5 to 1.0
if (x = 0) z = 0
z = z / 2
[VExTMPREG5] = z
2n
; Normalization (0.25 to 1.0)
n
; Inverted transformation (0 to 2.0)
[VExTMPREG5]
Input
Output
[VExTMPREG5]
Input value
The value of square root
32-bit fixed-point data (0.0 to 4.0, 15 fractional bits)
0x00000000 to 0x0001FFFF
32-bit fixed-point data (0.0 to 2.0, 15 fractional bits)
0x00000000 to 0x0000FFFF
2021-02-24
Rev. 3.1
Page 60
60 / 107
Register Name
Address (Base+)
[VExEN]
[VExCPURUNTRG]
Task Selection Register
[VExTASKAPP]
0x0008
[VExSCHTASKRUN]
[VExTMPREG0]
[VExTMPREG1]
0x0030
4. Registers
The vector engine has the VE control registers and the dedicated registers.
●VE control registers
The vector engine control registers and temporary registers.
●Dedicated registers
Computation data registers and computation control registers.
Note: Use word access (32 bits) to the registers.
4.1. List of Registers
The control registers and their addresses are shown as follows:
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Peripheral Function Channel/Unit
TYPE1 TYPE2 TYPE3
Advanced Vector Engine plus A-VE+ ch0 0x400F8000 0x400EB000 0x4008B000
Base address
Note: The Channel/Unit and Base address type are different by products. Please refer to "Product Information"
of the reference manual for the details.
VE control register
VE Operation Enable/Disable Register
CPU Start Trigger Selection Register
Operation Schedule Selection Register
Operation Schedule Repeat Number Selection Register [VExREPTIME]
Start Trigger Mode Setting Register [VExTRGMODE]
Error Interrupt Enable/Disable Setting Register
VE Forcible Termination Register
Error Detection Register
Schedule Operation Status/Ongoing Task Number Register
Temporary Register 0
Temporary Register 1
Temporary Register 2
Temporary Register 3
Temporary Register 4
Temporary Register 5
[VExACTSCH]
[VExERRINTEN]
[VExCOMPEND]
[VExERRDET]
[VExTMPREG2]
[VExTMPREG3]
[VExTMPREG4]
[VExTMPREG5]
0x0000
0x0004
0x000C
0x0010
0x0014
0x0018
0x001C
0x0020
0x0024
0x002C
0x0034
0x0038
0x003C
0x0040
2021-02-24
Rev. 3.1
Page 61
61 / 107
Register Name
Address (Base+)
[VExMCTLF]
[VExMODE]
[VExFMODE]
0x004C
[VExCIDKI]
[VExCIDKP]
[VExCIQKI]
[VExFPWMCHG]
[VExPWMOFS]
0x0090
[VExCOSM]
[VExSINM]
[VExSECTOR]
[VExSECTORM]
a-phase Zero-Current Register
[VExIAO]
0x00B8
[VExID]
[VExIQ]
[VExTADC]
U-phase PWM Duty Register
[VExCMPU]
0x017C
Dedicated registers
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Status Register
Task Control Mode Register
Flow Control Register
PWM Period Rate setting Register
Rotational Speed setting Register
Motor Phase setting Register
d-axis Current Reference setting Register
q-axis Current Reference setting Register [VExIQREF]
d-axis Voltage setting Register [VExVD]
q-axis Voltage setting Register
d-axis Current Integral Coefficient setting Register for PI control
d-axis Current Proportional Coefficient setting Register for PI control
q-axis Current Integral Coefficient setting Register for PI control
q-axis Current Proportional Coefficient setting Register for PI control [VExCIQKP]
d-axis Voltage Integral component Store Register for PI control
(Upper)
d-axis Voltage Integral component Store Register for PI control
(Lower)
q-axis Voltage Integral component Store Register for PI control
(Upper)
q-axis Voltage Integral component Store Register for PI control
(Lower)
PWM Switching Speed setting Register
PWM Shift 2 Offset Register
Minimum Pulse Width setting Register
Synchronous Trigger Correction setting Register
DC2 Supply Voltage Register
Cosine value Register of θ
Sine value Register of θ [VExSIN]
Previous Cosine value Register
Previous Sine value Register
Sector Information Register
Previous Sector Information Register
[VExTPWM]
[VExOMEGA]
[VExTHETA]
[VExIDREF]
[VExVQ]
[VExVDIH]
[VExVDILH]
[VExVQIH]
[VExVQILH]
[VExMINPLS]
[VExTRGCRC]
[VExVDCL]
[VExCOS]
0x0044
0x0048
0x0050
0x0054
0x0058
0x005C
0x0060
0x0064
0x0068
0x006C
0x0070
0x0074
0x0078
0x007C
0x0080
0x0084
0x0088
0x008C
0x0094
0x0098
0x009C
0x00A0
0x00A4
0x00A8
0x00AC
0x00B0
0x00B4
b-phase Zero-Current Register [VExIBO]
c-phase Zero-Current Register [VExICO]
ADC Conversion Result Register for a-phase Current
ADC Conversion Result Register for b-phase Current
ADC Conversion Result Register for c-phase Current
executed (an activation trigger wait is not included), "1"
error flag.
4.2.8. [VExCOMPEND] (VE Forcible Termination Register)
Bit Bit Symbol
31:1 - 0 R Read as "0"
0 VCEND 0 W
Type Function
Ongoing schedule is forcibly terminated.
0: 1: Stop
If "1" is written to this bit, this bit is cleared on next cycle. Always
read as "0"
4.2.9. [VExERRDET] (Error Detection Register)
Bit Bit Symbol
31:1 - 0 R
0 VERRD 0 R
Type Function
Read as "0"
This bit indicates the error flag.
0: An error is not detected.
1: An error is detected.
When an operation schedule is being executed (excluding a start
trigger wait), if a PW M interrupt is detected, "1" is set to this bit.
This bit is cleared upon read.
2021-02-24
Rev. 3.1
Page 67
TXZ/TXZ+ Family
67 / 107
After
Reset
After
Reset
[31:0]
Advanced Vector Engine Plus
4.2.10. [VExSCHTASKRUN] (Schedule Operation Status/Ongoing Task Number Register)
Example of [VExTMPREG0]. [VExTMPREG1] to [VExTMPREG5] have the same configuration.
Bit Bit Symbol
31:0
TMPREG0
0x00000000 R/W
Type Function
Temporary register 0
2021-02-24
Rev. 3.1
Page 68
68 / 107
After
Reset
This bit is updated when output phase transformations (Task 8 and 11)
4.3. Details of Dedicated Registers
4.3.1. [VExMCTLF] (Status Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R
15 SFT2STM 0 R/W
14 SFT2ST 0 R/W
13:12 - 00 R/W Write as "00"
11 PWMOVF 0 R/W
10 VSOVF 0 R/W
9 PIQOVF 0 R/W
Type Function
Read as "0"
Previous value of <SFT2ST>
The value is updated when output control 2 (Task 9) is executed.
A PWM carrier reverse flag of PWM Shift 2
The value is updated when output control 2 (Task 9) is executed.
0: Without PW M carrier reverse of reference phase
1: With PWM carrier reverse of reference phase
Set "1" to this bit when Shift 2 reference phase duty < 0x4000
Indicates the excess flag for PWM output limitation.
0: All 3-phase PWM outputs are [VExPWMMIN] or more, and
[VExPWMMAX] or less.
1: Any 3-phase PWM outputs are less than [VExPWMMIN], or
over [VExPWMMAX].
This bit is updated when output controls (Task 0 and Task 9) are
executed.
Indicates the excess flag for voltage scalar limitation.
0: Voltage scalar ≤[VExVSLIM]
1: Voltage scalar > [VExVSLIM]
This bit is updated when current control (Task 5) is executed.
Indicates the excess flag for q-axis output limitation on PI control.
0: |q-axis output on PI control | ≤[VExPIOLIM]
1: |q-axis output on PI control | > [VExPIOLIM]
This bit is updated when current control (Task 5) is executed.
Indicates the excess flag for d-axis output limitation on PI control.
8 PIDOVF 0 R/W
7:6 - 00 R/W Write as "00"
5 PLSLFM 0 R/W
4 PLSLF 0 R/W
3 - 0 R/W Write as "0"
2 LVTF 0 R/W
0: |d-axis output on PI control | ≤[VExPIOLIM]
1: |d-axis output on PI control | > [VExPIOLIM]
This bit is updated when current control (Task 5) is executed.
Indicates the previous value of the <PLSLF> register.
This bit is updated when output controls (Task 0 and Task 9) are
executed.
PWM duty check flag.
This bit is updated when output controls (Task 0 and Task 9) are
executed.
When output control 1(Task 0) is executed and 1-shunt current
detection is set,
0: [VExMINPLS]≤ Difference of minimum pulse width
1: [VExMINPLS] > Difference of minimum pulse width
When output control 2 (Task 9) is executed,
0: [VExMINPLS] ≤ Minimum On-width or minimum Off-width
1: [VExMINPLS] > Minimum On-width or minimum Off-width
Disables/enables current polarity determination for Task 2 and Task 10.
0: Disabled
1: Enabled
Refer to "3.3.6 Input Process".
Setting that corresponds to the dead time correction control of the PMD
when the dead time compensation for Task 0 and Task 9 is performed.
0: Dead time correction of the PMD is disabled.
1: Dead time correction of the PMD is enabled.
Refer to "3.3.4 Output Control".
13 PWMFLEN 0 R/W
12 PWMBLEN 0 R/W
11 NICEN 0 R/W
10 T5ECEN 0 R/W
9:8 AWUMD[1:0] 00 R/W
Disables/enables a duty of 100% setting when the upper-limit for Task 0
and Task 9 is set.
0: Duty of 100% setting is disabled.
1: Duty of 100% setting is enabled.
Refer to "3.3.4 Output Control".
Disables/enables a duty of 0% setting when the lower-limit for Task 0
and Task 9 is set.
0: Duty of 0% setting is disabled.
1: Duty of 0% setting is enabled.
Refer to "3.3.4 Output Control".
Disables/enables Non-interference control for Task 5.
0: Disabled
1: Enabled
Refer to "3.3.1 Current Control (Task 5)".
Disables/enables expansion control (Non-interference control and
voltage scalar limitation) for Task 5.
0: Disabled
1: Enabled
Refer to "3.3.1 Current Control (Task 5)".
Specifies anti-windup (AWU) control for Task 5 when PI control output
limitation is performed.
00: AWU control is disabled.
01: Substitutes the result from amount of limitation / 4
into the integral term.
10: Substitutes the result from amount of limitation / 2
into the integral term.
11: Substitutes the amount of limitation into the integral term.
Refer to "3.3.1 Current Control (Task 5)".
2021-02-24
Rev. 3.1
Page 70
TXZ/TXZ+ Family
70 / 107
After
Reset
Selector
[VExVDC]
[VExVDCL]
[VExMODE]
<VDCSEL>
Input process
(ADC)
Output phase transformation
(Tas k 8 and 11)
Advanced Vector Engine Plus
Bit Bit Symbol
7 CLPEN 0 R/W
6:5
4 VDCSEL 0 R/W
3:2 OCRMD[1:0] 00 R/W
ATANMD
[1:0]
00 R/W
Type Function
Disables/enables phase clipping control for Task 6 when phase
interpolation is performed.
0: Clipping is disabled.
1: Clipping is enabled.
Refer to "3.3.2 SIN/COS calculation (Task 6)".
Specifies ATAN calculation control for Task 4.
00, 01: Calculation is disabled.
10: Calculates the declination angle on d-q coordinate of
current vector.
11: Calculates the declination angle on d-q coordinate of
induced voltage vector.
Refer to "3.3.7 Input Current Transformation (Phase
Transformation/Coordinate Axis Transformation)".
Selects the supply voltage store register for Task 2 and Task 10.
0: Stored in [VExVDC].
1: Stored in [VExVDCL].
Refer to Figure 4.1.
Specifies output control for Task 0 and Task 9.
00: Output is disabled.
01: Output is enabled.
10: Short circuit brake (Outputs are OFF in the upper-phase;
outputs are ON in the lower-phase.)
11: EMG release (Outputs are OFF.)
Refer to "3.3.4 Output Control".
1 ZIEN 0 R/W
0 PVIEN 0 R/W
Note: When a power supply voltage controlled by [VExVDC] register is corrected, select [VExVDCL] register
as a storage location, and set a corrected value in [VExDVC] register.
Figure 4.1 [VExVDC]/[VExVDCL] store register
Specifies zero-current detection control for Task 2.
0: Normal current detection
1: Zero-current detection
Refer to "3.3.6 Input Process".
Disables/enables phase interpolation control for Task 6.
0: Disabled
1: Enabled
Refer to "3.3.2 SIN/COS calculation (Task 6)".
2021-02-24
Rev. 3.1
Page 71
71 / 107
After
Reset
Phase transformation cannot be disabled when space vector modulation
4.3.3. [VExFMODE] (Flow Control Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:14 SPWMMD[1:0] 00 R/W
13 CCVMD 0 R/W
12 PHCVDIS 0 R/W
11:10 VSLIMMD[1:0] 00 R/W
Type Function
Selects a PWM Shift mode.
00: Shift 1
01: Shift 2 (U-phase Center PWM)
10: Shift 2 (V-phase Center PWM)
11: Shift 2 (W-phase Center PWM)
Shift 2 cannot be selected when output control 1 (Task 0) is being
executed (invalid).
0: 2-3 phase transformation is enabled. (3-phase AC output)
1: 2-3 phase transformation is disabled. (2-phase AC output)
(Task 8) is running (invalid).
Controls voltage scalar limitation of current control (Task 5).
00: Scalar limitation is disabled.
(The limitation of each axis is enabled.)
01: Limits the voltage on the d-axis.
10: Limits the voltage on the q-axis.
11: dq proportional limitation
9 MREGDIS 0 R/W
8 CRCEN 0 R/W
7 ICPLMD 0 R/W
6 IBPLMD 0 R/W
5 IAPLMD 0 R/W
4 IDQSEL 0 R/W
Enables/Disables the use of previous value flags of MCTLF, SIN, COS,
and SECTOR registers on the input process 1, 2, and on input
coordinate transformation.
0: Enabled
1: Disabled
Disables/enables trigger correction
0: Disabled
1: Enabled
This bit is enabled when trigger generation (Task 1) is being executed;
when PWM Shift is disabled in 1-shunt current detection mode; or when
Shift 1 is selected.
Selects the current direction ([VExIC]) of input process2 (Task 10).
0: Feedback current ([VExID], [VExIQ])
1: Command current ([VExIDREF], [VExIQREF])
2021-02-24
Rev. 3.1
Page 72
TXZ/TXZ+ Family
72 / 107
After
Reset
PWM Shift 2 should be used when output control 2 (Task 9) and
input process 1 (Task 2) are available only
in Shift 1 mode. Output control 2 (Task 9) and input process 2 (Task 10)
After
Reset
After
Reset
Advanced Vector Engine Plus
Bit Bit Symbol
3:2 IDMODE[1:0] 00 R/W
1 SPWMEN 0 R/W
0 C2PEN 0 R/W
Type Function
Selects current detection mode.
00: 3-shunt (Note 1)
01: 2-sensor (Note 2)
10: 1-shunt (PMD TRG in the latter half of PWM(Note 3))
11: 1-shunt (PMD TRG in the first half of PW M(Note 3))
Note 1: 3-phase current detection is used in input process 2 (Task 10).
Note 2: 2-phase current detection is used in input process 2 (Task 10).
Note 3:
input process 2 (Task 10) is being executed.
Disables/enables PWM Shift.
0: Disabled
1: Enabled
Output control 1 (Task 0) and
are available only in Shift 2 mode.
Selects the modulation mode.
0: 3-phase modulation
1: 2-phase modulation
4.3.4. [VExTPWM] (PWM Period Rate setting Register)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 TPWM[15:0] 0x0000 R/W
Type Function
Sets the PWM period rate and the unit of integration in phase
interpolation (16-bit fixed-point data: 0.0 to 1.0).
0x0000 to 0xFFFF (PWM period[s] × Max_Hz × 216)
This indicates the ratio between PWM period and the maximum
rotational speed. (Max_Hz: Maximum rotational speed)
This bit is used for SIN/COS calculation (Task 6) when phase
interpolation is enabled.
Sets a rotational speed (16-bit fixed-point data: -1.0 to 1.0).
0x8000 to 0x7FFF: Rotational speed [Hz] / Max_Hz × 215
(Max_Hz: Maximum rotational speed)
This bit is used for SIN/COS calculation (Task 6) when phase
interpolation is enabled.
This bit is used for output control 1 (Task 0) when PWM Shift 1 is
selected for 1-shunt current detection.
This bit is used for current control (Task 5) and input coordinate axis
transformation (Task 4) in motor voltage equation.
2021-02-24
Rev. 3.1
Page 73
73 / 107
After
Reset
This bit is updated when SIN/COS calculation (Task 6) is executed
After
Reset
After
Reset
4.3.6. [VExTHETA] (Motor Phase setting Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 THETA[15:0] 0x0000 R/W
Type Function
Sets the phase (16-bit fixed-point data: 0.0 to 1.0).
0x0000 to 0xFFFF: Phase [deg] / 360 × 2
This bit is used for SIN/COS calculation (Task 6) when phase
interpolation is enabled.
while phase interpolation is enabled.
4.3.7. d-axis/q-axis Current Reference setting Registers
4.3.7.1. [VExIDREF] (d-axis Current Reference setting Register)
Bit Bit Symbol
31:16 - 0 R
15:0 IDREF[15:0] 0x0000 R/W
Type Function
Read as "0"
Sets the reference value of d-axis current (16-bit fixed-point data:
-1.0 to 1.0).
0x8000 to 0x7FFF: d-axis current reference [A] / Max_I × 215
Max_I: (The amount of phase current variation when the AD
conversion is changed by 1LSB [A]) × 211
This bit is used for current control (Task 5).
16
4.3.7.2. [VExIQREF] (q-axis Current Reference setting Register)
Bit Bit Symbol
31:16 - 0 R
15:0 IQREF[15:0] 0x0000 R/W
Type Function
Read as "0"
Sets the reference value of q-axis current (16-bit fixed-point data:
-1.0 to 1.0).
0x8000 to 0x7FFF: q-axis current reference [A] / Max_I × 2
Max_I: (The amount of phase current variation when the AD
conversion is changed by 1LSB [A]) × 2
This bit is used for current control (Task 5).
15
11
2021-02-24
Rev. 3.1
Page 74
74 / 107
After
Reset
After
Reset
After
Reset
when direction scalar
4.3.8. d-axis/q-axis Voltage setting Registers
4.3.8.1. [VExVD] (d-axis Voltage setting Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:0 VD[31:0] 0x00000000 R/W
Type Function
Sets the value of d-axis voltage (32-bit fixed-point data: -1.0 to
1.0).
0x80000000 to 0x7FFFFFFF: d-axis voltage[V] / Max_V × 2
Max_V: (The amount of supply voltage variation when the AD
conversion is changed by 1LSB [V]) × 212
This bit is updated when current control (Task 5) is executed.
This bit is used for output coordinate axis transformation (Task 7).
This bit is used for input coordinate axis transformation (Task 4) in
motor voltage equation.
4.3.8.2. [VExVQ] (q-axis Voltage setting Register)
Bit Bit Symbol
31:0 VQ[31:0] 0x00000000 R/W
Type Function
Sets the value of q-axis voltage (32-bit fixed-point data: -1.0 to
1.0).
0x80000000 to 0x7FFFFFFF: q-axis voltage[V] / Max_V × 2
Max_V: (The amount of supply voltage variation when the AD
conversion is changed by 1LSB [V]) × 212
This bit is updated when current control (Task 5) is executed.
This bit is used for output coordinate axis transformation (Task 7).
This bit is used for input coordinate axis transformation (Task 4) in
motor voltage equation.
31
31
4.3.8.3. [VExVDQ] (Voltage Scalar Register)
Bit Bit Symbol
31:16 - 0 R
15:0 VDQ[15:0] 0x0000 R/W
Type Function
Read as "0"
Sets value of voltage scalar for d-axis voltage [VExVD] and q-axis
voltage [VExVQ], or sets the limitation value of axis for d-axis
voltage [VExVD] and q-axis voltage [VExVQ]
is limited.
0x0000 to 0x7FFF: Voltage [V] / Max_V × 215
Max_V: (The amount of supply voltage variation when the AD
This bit is updated for current control (Task 5) when expansion
control is enabled.
Stores the result of AD conversion for c-phase at zero-current.
(Stores the result of AD conversion for c-phase current when the
motor is at stop.)
This bit is updated in the input process 1 (Task 2) when
zero-current detection mode is selected.
The result of AD conversion for a<ICO[15:4]> when the result of AD conversion is captured.
<ICO[3:0]> stores "0".
2021-02-24
Rev. 3.1
Page 83
TXZ/TXZ+ Family
83 / 107
After
Reset
After
Reset
After
Reset
After
Reset
Advanced Vector Engine Plus
4.3.15.4. [VExIAADC] (ADC Conversion Result Register for a-phase Current)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 IAADC[15:0] 0x0000 R/W
Type Function
Stores the result of AD conversion for a-phase current ("0x0000" to
"0xFFFF").
This bit is updated when input processes (Task 2 and Task 10) are
executed.
The result of AD conversion for a-phase is stored in <IAADC[15:4]>
when the result of AD conversion is captured. <IAADC[3:0]> stores
"0".
4.3.15.5. [VExIBADC] (ADC Conversion Result Register for b-phase Current)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 IBADC[15:0] 0x0000 R/W
Type Function
Stores the result of AD conversion for b-phase current ("0x0000" to
"0xFFFF").
This bit is updated when input processes (Task 2 and Task 10) are
executed.
The result of AD conversion for b-phase is stored in <IBADC[15:4]>
when the result of AD conversion is captured. <IBADC[3:0]> stores
"0".
4.3.15.6. [VExICADC] (ADC Conversion Result Register for c-phase Current)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 ICADC[15:0] 0x0000 R/W
Type Function
Stores the result of AD conversion for c-phase current ("0x0000" to
"0xFFFF").
This bit is updated when input processes (Task 2 and Task 10) are
executed.
The result of AD conversion for c-phase is stored in <ICADC[15:4]>
when the result of AD conversion is captured. <ICADC[3:0]> stores
"0".
4.3.15.7. [VExIA] (a-phase Current Register)
Bit Bit Symbol
31:0 IA[31:0] 0x00000000 R/W
Type Function
a-phase current (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated when input process (Task 2, Task 10) is
executed.
The value is used on input phase transformation (Task 3).
2021-02-24
Rev. 3.1
Page 84
84 / 107
After
Reset
After
Reset
4.3.15.8. [VExIB] (b-phase Current Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:0 IB[31:0] 0x00000000 R/W
Type Function
b-phase current (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated when input process (Task 2, Task 10) is
executed.
The value is used on input phase transformation (Task 3).
4.3.15.9. [VExIC] (c-phase Current Register)
Bit Bit Symbol
31:0 IC[31:0] 0x00000000 R/W
Type Function
c-phase current (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated when input process (Task 2, Task 10) is
executed.
The value is used on input phase transformation (Task 3).
2021-02-24
Rev. 3.1
Page 85
85 / 107
Bit
Bit Symbol
After Reset
Type
Function
Bit
Bit Symbol
After Reset
Type
Function
4.3.16. DC Supply Voltage Registers
4.3.16.1. [VExVDC] (DC Supply Voltage Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
31:16 - 0 R
15:0 VDC[15:0] 0x0000 R/W
Read as "0"
Sets a supply voltage (16-bit fixed-point data: 0 to 1.0).
0x0000 to 0x7FFF
The actual voltage value can be calculated as:
the value of VDC × the value of Max_V / 215
(Max_V: (The amount of supply voltage variation when AD
conversion is changed by 1LSB [V]) × 212)
This bit is updated when [VExMODE]<VDCSEL> is set to "0" and
input processes (Task 2 and Task 10) are executed.
This bit is used for output phase transformation (Tasks 8 and 11).
4.3.16.2. [VExVDCL] (DC2 Supply Voltage Register)
31:16 - 0 R
15:0 VDCL[15:0]0x0000 R/W
Read as "0"
Sets a supply voltage (16-bit fixed-point data: 0 to 1.0).
0x0000 to 0x7FFF
The actual voltage value can be calculated as:
the value of VDCL × the value of Max_V / 2
(Max_V: (The amount of supply voltage variation when AD
conversion is changed by 1LSB [V]) × 212)
This bit is updated when [VExMODE]<VDCSEL> is set to "1" and
input processes (Task 2 and Task 10) are executed.
15
2021-02-24
Rev. 3.1
Page 86
86 / 107
After
Reset
This bit is updated when input coordinate axis transformation (Task
After
Reset
This bit is updated when input coordinate axis transformation (Task
4.3.17. d-axis/q-axis Current Registers
4.3.17.1. [VExID] (d-axis Current Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:0 ID[31:0] 0x00000000 R/W
Type Function
Sets a d-axis current (32-bit fixed-point data: -1.0 to 1.0).
0x80000000 to 0x7FFFFFFF
The actual voltage value can be calculated as:
the value of ID × the value of Max_I / 2
(Max_I: (The amount of phase current variation when the AD
4) is executed. This bit is used for current control (Task 5).
4.3.17.2. [VExIQ] (q-axis Current Register)
Bit Bit Symbol
31:0 IQ[31:0] 0x00000000 R/W
Type Function
Sets a q-axis current (32-bit fixed-point data: -1.0 to 1.0).
0x80000000 to 0x7FFFFFFF
The actual voltage value can be calculated as:
the value of IQ × the value of Max_I / 2
(Max_I: (The amount of phase current variation when the AD
31
conversion is changed by 1LSB [A]) × 211)
31
conversion is changed by 1LSB [A]) × 211)
4) is executed. This bit is used for current control (Task 5).
2021-02-24
Rev. 3.1
Page 87
87 / 107
After
Reset
Conversion
Stop
AD conversion
PMD trigger
Conversion time
4.3.18. [VExTADC] (ADC Conversion Time setting Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R Read as "0".
15:0 TADC[15:0] 0x0000 R/W
Type Function
Sets an ADC conversion time (Refer to Figure 4.2).
0x0000 to 0xFFFF: ADC conversion time [s] /
Performs forward correction for a trigger timing at the PWM end
when PWM Shift 1 output (Shift 1 is enabled and a low-speed flag
is "1") is used in 1-shunt current detection mode.
This bit is used in output control 1(Task 0).
Figure 4.2 ADC conversion time
PWM clock period [s]
2021-02-24
Rev. 3.1
Page 88
88 / 107
After
Reset
After
Reset
After
Reset
4.3.19. 3-phase PWM Duty Registers
4.3.19.1. [VExCMPU] (U-phase PWM Duty Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 VCMPU[15:0] 0x0000 R/W
Type Function
Sets the U-phase PWM duty.
0x0000 to 0x8000
This bit is updated when output controls (Task 0 and Task 9) are
executed. This bit is used for trigger generation (Task 1).
Note: Setting PMD's mode select register to VE mode can control U-phase PWM duty of PMD with this
register. For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
4.3.19.2. [VExCMPV] (V-phase PWM Duty Register)
Bit Bit Symbol
31:16 - 0 R
15:0 VCMPV[15:0] 0x0000 R/W
Note: Setting PMD's mode select register to VE mode can control V-phase PWM duty of PMD with this
register. For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
Type Function
Read as "0"
Sets the V-phase PWM duty.
0x0000 to 0x8000
This bit is updated when output controls (Task 0 and Task 9) are
executed. This bit is used for trigger generation (Task 1).
4.3.19.3. [VExCMPW] (W-phase PWM Duty Register)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 VCMPW[15:0] 0x0000 R/W
Note: Setting PMD's mode select register to VE mode can control W-phase PWM duty of PMD with this
register. For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
Type Function
Sets the W-phase PWM duty.
0x0000 to 0x8000
This bit is updated when output controls (Task 0 and Task 9) are
executed. This bit is used for trigger generation (Task 1).
Sets the reference value of the minimum pulse width difference
(The minimum value of the duty difference of 3-phase PWM
([VExCMPU], [VExCMPV], [VExCMPW])) when PWM shift is
enabled in 1-shunt current detection mode.
The calculation is as follows:
Difference of duty width [s] / PWM clock period[s] × 2
When output control 2 (task 9) is executed:
Sets the reference value of the minimum pulse width (The
minimum duty of 3-phase PWM ([VExCMPU], [VExCMPV],
[VExCMPW])).
The calculation is as follows:
Duty width [s] / PW M clock period[s] × 2
This bit is used in output controls (Task 0 and Task 9).
2021-02-24
Rev. 3.1
Page 91
91 / 107
After
Reset
For details, refer to
4.3.21. [VExOUTCR] (PMD Output Control Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:9 - 0 R Read as "0"
8 WPW M 0 R/W
7 VPW M 0 R/W
6 UPW M 0 R/W
5:4 WOC[1:0] 00 R/W
3:2 VOC[1:0] 00 R/W
1:0 UOC[1:0] 00 R/W
Type Function
Select W-phase PWM.
0: ON/OFF output
1: PWM output
Selects V-phase PWM.
0: ON/OFF output
1: PWM output
Selects U-phase PWM.
0: ON/OFF output
1: PWM output
Selects W-phase output control.
The decode circuit output is controlled by the combination of this bit,
<WOC[1:0]>and <WPW M> (Refer to Table 4.3.).
"Conduction Control Circuit" of the reference manual "Advanced
Programmable Motor Control Circuit".
Selects V-phase output control.
The decode circuit output is controlled by the combination of this bit,
<VOC[1:0]>and <VPWM> (Refer to Table 4.2.). For details, refer to
"Conduction Control Circuit" of the reference manual "Advanced
Programmable Motor Control Circuit".
Selects U-phase output control.
The decode circuit output is controlled by the combination of this bit,
<UOC[1:0]>and <UPWM> (Refer to Table 4.1.). For details, refer to
"Conduction Control Circuit" of the reference manual "Advanced
Programmable Motor Control Circuit".
Note 1: Setting PMD's mode select register to VE mode can control [PMDxMDOUT] of PMD with this register.
For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
Note 2: This setting is updated when output controls (Task 0 and Task 9) are executed.
2021-02-24
Rev. 3.1
Page 92
TXZ/TXZ+ Family
92 / 107
<UPWM>
<UOC[1:0]>
UOx
XOx
PWMU inverted
output
PWMU inverted
output
Setting
Output
<VPWM>
<VOC[1:0]>
VOx
YOx
PWMV inverted
output
PWMV inverted
output
Setting
Output
<WPWM>
<WOC[1:0]>
WOx
ZOx
output
PWMW inverted
output
Advanced Vector Engine Plus
Output control of U, V and W-phase of the PMD is shown below: (This table shows only those combinations that
are used in the VE.)
Table 4.1 <UPWM>, <UOC[1:0]> PMD setting: Output control of U-phase(UOx, XOx)
Setting Output
0 00 OFF output OFF output
0 01 OFF output ON output
1 00
1 11 PWMU output
PWMU output
Table 4.2 <VPWM>, <VOC[1:0]> PMD setting: Output control of V-phase(VOx, YOx)
0 00 OFF output OFF output
0 01 OFF output ON output
1 00
1 11 PW MV output
PWMV output
Table 4.3 <WPWM>, <WOC[1:0]> PMD setting: Output control of W-phase(WOx, ZOx)
0 00 OFF output OFF output
0 01 OFF output ON output
1 00
PWMW inverted
PWMW output
1 11 PWMW output
2021-02-24
Rev. 3.1
Page 93
Advanced Vector Engine Plus
93 / 107
After
Reset
After
Reset
Specifies the trigger timing for sampling ADC in synchronization with
After
Reset
Specifies the trigger timing for sampling ADC in synchronization with
This register is invalid when the trigger output mode in PMD is set to
disabled in the 1-shunt current detection or when Shift 1 is enabled.
0x0000 to 0xFFFF: Correction time[s] / PWM period[s]
This bit is enabled only when PWM Shift is disabled in the 1-shunt
current detection or when Shift 1 is enabled. This bit is used to
backward correct the trigger timing.
Note: Setting PMD's mode select register to VE mode can control the trigger comparison 0 of PMD with this
register. For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
Type Function
Read as "0"
the PMD (PMD setting).
0x0000: Prohibited
0x0001 to 0x7FFF: Trigger timing
0x8000 to 0xFFFF: Prohibited
This bit is enabled when one of the following PMD trigger modes is
selected:
The coincidence in the first half of the PWM cycle;
The coincidence in the latter half of the PWM cycle;
The coincidence in the first and later halves of the PWM cycle
This bit is updated in trigger generation (Task 1) when PWM Shift is
disabled in the 1-shunt current detection or when Shift 1 is enabled.
Note: Setting PMD's mode select register to VE mode can control the trigger comparison 1 of PMD with this
register. For details, refer to "Advanced Programmable Motor Control Circuit" in the reference manual.
Type Function
the PMD (PMD setting).
0x0000: Prohibited
0x0001 to 0x7FFF: Trigger timing
0x8000 to 0xFFFF: Prohibited
This bit is enabled when one of the following PMD trigger modes is
selected:
The coincidence in the first half of the PWM cycle;
The coincidence in the latter half of the PWM cycle;
The coincidence in the first and later halves of the PWM cycle
the trigger selected output ([PMDxTRGMD] <TRGOUT> = 1).
This bit is updated in trigger generation (Task 1) when PWM Shift is
Sets the current declination angle on the d-q coordinate.
(-180-degree to 180-degree)
0x8000 to 0x7FFF: The declination angle: [deg] / 360 × 216
This bit is updated when ATAN calculation is enabled on coordinate
axis transformation (Task 4) or when voltage scalar limitation is
enabled in current control (Task 5).
2021-02-24
Rev. 3.1
Page 95
95 / 107
After
Reset
After
Reset
×
After
Reset
×
After
Reset
4.3.25. Motor Constant Registers
4.3.25.1. [VExCPHI] (Motor Interlinkage Magnetic Flux Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 CPHI[15:0] 0x0000 R/W
Type Function
Sets the back electromotive force constant of the motor [V/rps]
(interlinkage flux [Wb/s])
0x0000 to 0x7FFF: The value of back electromotive force constant
[V/rps] / Max_V × Max_Hz × 211 / [CPHIG
setting]
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
0x0000 to 0x7FFF: The value of inductance [H] × Max_I / Max_V
Max_Hz × 2π × 211 / [CLG setting]
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
0x0000 to 0x7FFF: The value of inductance [H] × Max_I / Max_V
Max_Hz × 2π × 211 / [CLG setting]
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
4.3.25.4. [VExCR] (Motor Resistance Register)
Bit Bit Symbol
31:16 - 0 R
15:0 CR[15:0] 0x0000 R/W
Type Function
Read as "0"
Sets the value of resistance of the motor constant.
0x0000 to 0x7FFF: The value of resistor [Ω] × Max_I / Max_V ×
211 /([VExCRG] setting)
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
2021-02-24
Rev. 3.1
Page 96
Advanced Vector Engine Plus
96 / 107
After
Reset
After
Reset
After
Reset
4.3.25.5. [VExCPHIG] (Motor Magnetic Flux Range setting Register)
TXZ/TXZ+ Family
Bit Bit Symbol
31:8 - 0 R Read as "0"
7:3 - 00000 R/W
2:0 CPHIG[2:0] 000 R/W
Type Function
Write as "00000"
Selects the range of magnetic flux of the motor constant.
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
8
16
4.3.25.6. [VExCLG] (Motor Inductance Range setting Register)
Bit Bit Symbol
31:8 - 0 R Read as "0"
7:3 - 00000 R/W
2:0 CLG[2:0] 000 R/W
Type Function
Write as "00000"
Selects the range of inductance of the motor constant.
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
4
12
16
4.3.25.7. [VExCRG] (Motor Resistance Range setting Register)
Bit Bit Symbol
31:8 - 0 R
7:3 - 00000 R/W
2:0 CRG[2:0] 000 R/W
Type Function
Read as "0"
Write as "00000"
Selects the range of the resistance of the motor constant.
This bit is used in coordinate axis transformation (Task 4) when the
declination angle of induced voltage is calculated or when
Non-interference control is enabled in current control (Task 5).
4
12
16
2021-02-24
Rev. 3.1
Page 97
Advanced Vector Engine Plus
97 / 107
After
Reset
(Max_V: (The amount of voltage variation when the AD conversion
After
Reset
(Max_V: (The amount of voltage variation when the AD conversion
After
Reset
After
Reset
4.3.26. [VExVDE] (d-axis Voltage Register for Non-interference Control)
TXZ/TXZ+ Family
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 VDE[15:0] 0x0000 R/W
Type Function
Indicates the value of d-axis calculation of non-interference (16-bit
fixed-point data: -1.0 to 1.0).
0x8000 to 0x7FFF: Voltage [V] / Max_V × 215
is changed by 1LSB [V]) × 212)
This bit is updated when Non-interference control is enabled in
current control (Task 5).
4.3.27. [VExVQE] (q-axis Voltage Register for Non-interference Control)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 VQE[15:0] 0x0000 R/W
Type Function
Indicates the value of q-axis calculation of non-interference (16-bit
fixed-point data: -1.0 to 1.0).
0x8000 to 0x7FFF: Voltage [V] / Max_V × 215
is changed by 1LSB [V]) × 212)
This bit is updated when Non-interference control is enabled in
current control (Task 5).
4.3.28. [VExDTC] (Dead Time Compensation Register)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 DTC[15:0] 0x0000 R/W
Type Function
4.3.29. [VExHYS] (Hysteresis Width Register for Current Polarity Determination)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 HYS[15:0] 0x0000 R/W
Type Function
Sets the amount of compensation on dead time control.
0x0000 to 0x7FFF: Dead time[s] / PWM period[s] × 2
This bit is used when dead time compensation is enabled in output
controls (Task 0 and Task 9).
Sets the current hysteresis width when current polarity is determined
(16-bit fixed-point data: -1.0 to 1.0).
0x8000 to 0x7FFF: Hysteresis width [A] / Max_I × 2
(Max_I: (The amount of phase current variation when the AD
conversion is changed by 1LSB [A]) × 2
This bit is used in input process (Task 2 and Task 10) when current
polarity determination is enabled.
11
)
15
15
2021-02-24
Rev. 3.1
Page 98
TXZ/TXZ+ Family
98 / 107
After
Reset
After
Reset
determination is undefined. Dead time
Advanced Vector Engine Plus
4.3.30. [VExHYS2] (Hysteresis Width Register 2 for Current Polarity Determination)
Bit Bit Symbol
31:16 - 0 R Read as "0"
15:0 HYS2[15:0] 0x0000 R/W
Type Function
Sets a current reverse hysteresis width on polarity determination.
(16-bit fixed point data: 0 to 1.0)
0x0000 to 0x7FFF: Hysteresis width [A] / Max_I × 2
(Max_I: Phase current variation when A/D conversion data is
changed for 1LSB [A]) × 2
The value is used on input process (Task2 and Task 10) when
current polarity determination is enabled.
Note: This register is invalid when [VExHYS]≥ 0.
11
)
4.3.31. [VExDTCS] (Dead Time Compensation Control/Status Register)
Bit Bit Symbol
31:16 - 0 R
15:11 - 00000 R/W
10:8 ICSTS[2:0] 000 R/W
Type Function
Read as "0"
Write as "00000"
Indicates status of the current [VExIC] polarity determination, or
selects dead time compensation control setting for [VExCMPW].
000, 010, 100, 110: Polarity
compensation is not performed.
001, 101: Positive current is determined. Adds the [VExDTC]
value when dead time compensation is performed.
011, 111: Negative current is determined. Subtracts the [VExDTC]
value when dead time compensation is performed.
This bit is updated in input process (Task 2 and Task 10) when
current polarity determination is enabled. This bit is used in output
controls (Task 0 and Task 9) when dead time compensation is
enabled.
15
7 - 0 R/W
6:4 IBSTS[2:0] 000 R/W
3 - 0 R/W Write as "0"
Write as "0"
Indicates status of the current [VExIB] polarity determination, or
selects dead time compensation control setting for [VExCMPV].
000, 010, 100, 110: Polarity determination is undefined. Dead time
001, 101: Positive current is determined. Adds the [VExDTC]
011, 111: Negative current is determined. Subtracts the [VExDTC]
This bit is updated in input process (Task 2 and Task 10) when
current polarity determination is enabled. This bit is used in output
controls (Task 0 and Task 9) when dead time compensation is
enabled.
compensation is not performed.
value when dead time compensation is performed.
value when dead time compensation is performed.
2021-02-24
Rev. 3.1
Page 99
99 / 107
Indicates status of the current [VExIA] polarity determination, or
After
Reset
when phase
Bit
Bit Symbol
After Reset
Type
Function
The value is updated when output coordinate axis transformation
After
Reset
selects dead time compensation control setting for [VExCMPU].
000, 010, 100, 110: Polarity determination is undefined. Dead time
compensation is not performed.
001, 101: Positive current is determined.
Adds the [VExDTC] value when dead time
2:0 IASTS[2:0] 000 R/W
compensation is performed.
011, 111: Negative current is determined.
Subtracts the [VExDTC] value when dead time
compensation is performed.
This bit is updated in input process (Task 2 and Task 10) when
current polarity determination is enabled. This bit is used in output
controls (Task 0 and Task 9) when dead time compensation is
enabled.
4.3.32. [VExTHTCLP] (Clipped Phase value setting Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:16 - 0 R
15:0 THTCLP[15:0] 0x0000 R/W
Type Function
Read as "0"
Sets the clipping phase of the angle of [VExTHETA]
interpolation is performed (16-bit fixed-point data: 0.0 to 1.0).
0x0000 to 0xFFFF: Phase [deg] / 360 × 216
This bit is used in SIN/COS calculation (Task 5) when phase
interpolation is enabled.
4.3.33. 2-phase Voltage Registers
4.3.33.1. [VExVALPHA] (α-phase Voltage Register)
α-phase voltage (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
To convert an actual voltage value, use the following formula:
Register value × Max_V / 2
31:0 VALPHA[31:0] 0x00000000 R/W
(Max_V: (Phase voltage variation when A/D conversion data is
changed for 1LSB [V]) × 2
(Task 7) is executed.
The value is used on output phase transformation (Task 8, Task
11).
31
11
)
4.3.33.2. [VExVBETA] (β-phase Voltage Register)
Bit Bit Symbol
31:0 VBETA[31:0] 0x00000000 R/W
Type Function
β-phase voltage (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
To convert an actual voltage value, use the following formula:
Register value × Max_V / 231
(Max_V: (Phase voltage variation when A/D conversion data is
The value is updated when output coordinate axis transformation
(Task 7) is executed.
The value is used on output phase transformation (Task 8, Task 11).
changed for 1LSB [V]) × 2
11
)
2021-02-24
Rev. 3.1
Page 100
100 / 107
After
Reset
After
Reset
After
Reset
4.3.34. 3-phase Voltage Duty Registers
4.3.34.1. [VExVDUTYA] (a-phase Voltage Duty Register)
TXZ/TXZ+ Family
Advanced Vector Engine Plus
Bit Bit Symbol
31:0 VDUTYA[31:0] 0x00000000 R/W
Type Function
a-phase voltage duty (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated on output phase transformation (Task 8,
Task 11) is executed.
The value is used on output control (Task 0, Task 9).
4.3.34.2. [VExVDUTYB] (b-phase Voltage Duty Register)
Bit Bit Symbol
31:0 VDUTYB[31:0] 0x00000000 R/W
Type Function
b-phase voltage duty (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated on output phase transformation (Task 8,
Task 11) is executed.
The value is used on output control (Task 0, Task 9).
4.3.34.3. [VExVDUTYC] (c-phase Voltage Duty Register)
Bit Bit Symbol
31:0 VDUTYC[31:0] 0x00000000 R/W
Type Function
c-phase voltage duty (32-bit fixed point data: -1.0 to 1.0)
0x80000000 to 0x7FFFFFFF
The value is updated on output phase transformation (Task 8,
Task 11) is executed.
The value is used on output control (Task 0, Task 9).
2021-02-24
Rev. 3.1
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.