Rev. 1.00
16�
��ne ��� �01�
Rev. 1.00
169
��ne ��� �01�
HT66FM5440
Brushless DC Motor A/D Flash MCU
HT66FM5440
Brushless DC Motor A/D Flash MCU
16-bit MDU1 Operation
F
or this MDU the multiplication or division operation is carried out in a specific way and is
determined by the write access sequence of the six MDU1 data registers, MDU1R0~MDU1R5.
T
he
low byte data, regardless of the dividend, multiplicand, divisor or multiplier, must first be written
into the corresponding MDU1 data register followed by the high byte data. All MDU1 operations
will be executed after the MDU1R5 register is write-accessed together with the correct specific
write access sequence of the MDU1Rn. Note that it is not necessary to consecutively write data
into the MDU1 data registers but must be in a correct write access sequence.
T
herefore, a non-write
MDU1Rn instruction or an interrupt, etc., can be inserted into the correct write access sequence
without destroying the write operation.
T
he relationship between the write access sequence and the
MDU1 operation is shown in the following.
• 32-b
it/16-bit division operation: Write data sequentially into the six MDU1 data registers from MDU1R0
to MDU1R5.
• 16-bit/16-bit division operation: Write data sequentially into the specific four MDU1 data registers
in a sequence of MDU1R0, MDU1R1, MDU1R4 and MDU1R5 with no write access to MDU1R2
and MDU1R3.
• 16-bit×16-bit multiplication operation: Write data sequentially into the specific four MDU1 data
registers in a sequence of MDU1R0, MDU1R4, MDU1R1 and MDU1R5 with no write access to
MDU1R2 and MDU1R3.
After the specific write access sequence is determined, the MDU1 will start to perform the
corresponding operation. The calculation time necessary for these MDU1 operations are different.
During the calculation time any read/write access to the six MDU1 data registers is forbidden. After
the completion of each operation, it is necessary to check the operation status in the MDU1CTRL
register to make sure that whether the operation is correct or not. Then the operation result can
be read out from the corresponding MDU1 data registers in a specific read access sequence if the
operation is correctly finished. The necessary calculation time for different MDU1 operations is
listed in the following.
• 32-bit/16-bit division operation: 17 × t
SYS
.
• 16-bit/16-bit division operation: 9 × t
SYS
.
• 16-bit×16-bit multiplication operation: 11 × t
SYS
.
The operation results will be stored in the corresponding MDU1 data registers and should be read
out from the MDU1 data registers in a specific read access sequence after the operation is completed.
Noe that it is not necessary to consecutively read data out from the MDU1 data registers but must
be in a correct read access sequence. Therefore, a non-read MDU1Rn instruction or an interrupt,
etc., can be inserted into the correct read access sequence without destroying the read operation. The
relationship between the operation result read access sequence and the MDU1 operation is shown in
the following.
• 32-bit/16-bit division operation: Read the quotient from MDU1R0 to MDU1R3 and remainder
from MDU1R4 and MDU1R5 sequentially.
• 16-bit/16-bit division operation: Read the quotient from MDU1R0 and MDU1R1 and remainder
from MDU1R4 and MDU1R5 sequentially.
• 16-bit×16-bit multiplication operation: Read the product sequentially from MDU1R0 to MDU1R3.
The overall important points for the MDU1 read/write access sequence and calculation time are
summarised in the following table.