R01UH0092EJ0110 Rev.1.10
Page 777 of 807
Jul 31, 2012
M16C/64C Group
32. Usage Notes
32.11 Notes on DMAC
32.11.1 Write to the DMAE Bit in the DMiCON Register (i = 0 to 3)
(Technical update number: TN-M16C-92-0306)
When both of the following conditions are met, follow steps (1) and (2) below.
Conditions
•
Write 1 (DMAi is in active state) to the DMAE bit when it is 1.
•
A DMA request may be generated simultaneously when writing to the DMAE bit.
Steps
(1) Set bits DMAE and DMAS in the DMiCON register to 1 simultaneously.
(1)
(2) Make sure the DMAi circuit is in an initialized state
(2)
by a program.
If DMAi is not in an initialized state, repeat these two steps.
Notes:
1.The DMAS bit does not change even if set to 1. However, it becomes 0 when set to 0 (DMA not
requested). Therefore, when writing to the DMiCON register to set the DMAE bit to 1, set the
value to be written to the DMAS bit to 1 to retain its state immediately before writing.
Similarly, when writing to the DMAE bit with a read-modify-write instruction, set the DMAS bit to 1
to retain the DMA request that was generated while executing the instruction.
2.Read the TCRi register to verify whether DMAi is in an initialized state.
If the read value is equal to the value that was written to the TCRi register before the DMA
transfer started, DMAi is in an initialized state. When a DMA request is generated after writing to
the DMAE bit, the read value is a value written to the TCRi register minus 1. If the read value is a
value in the middle of a transfer, DMAi is not in an initialized state.
32.11.2 Changing the DMA Request Source
When the DMS bit or any of bits from DSEL4 to DSEL0 in the DMiSL register is changed, the DMAS bit
in the DMiCON sometimes becomes 1 (DMA requested). Set the DMAS bit to 0 (DMA not requested)
after changing the DMS bit or bits DSEL4 to DSEL0 in the DMiSL register.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...