Download Print this page

Renesas M16C/50 Series User Manual page 812

Advertisement

M16C/5L Group, M16C/56 Group
28.10 Notes on DMAC
28.10.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.
(2) Make sure the DMAi circuit is in an initialized state
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.
28.10.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.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
(1)
(2)
by a program.
28. Usage Notes
Page 775 of 803

Advertisement

loading