|
M16C6S_09 Datasheet, PDF (76/208 Pages) Renesas Technology Corp – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER | |||
|
◁ |
M16C/6S Group
DMAC
3. DMA Enable
When a data transfer starts after setting the DMAE bit in DMiCON register (i = 0, 1) to â1â (enabled), the
DMAC operates as follows:
(1) Reload the forward address pointer with the SARi register value when the DSD bit in DMiCON register
is â1â (forward) or the DARi register value when the DAD bit of DMiCON register is â1â (forward).
(2) Reload the DMAi transfer counter with the DMAi transfer counter reload register value.
If the DMAE bit is set to â1â again while it remains set, the DMAC performs the above operation. However,
if a DMA request may occur simultaneously when the DMAE bit is being written, follow the steps below.
Step 1: Write â1â to the DMAE bit and DMAS bit in DMiCON register simultaneously.
Step 2: Make sure that the DMAi is in an initial state as described above (1) and (2) in a program.
If the DMAi is not in an initial state, the above steps should be repeated.
4. DMA Request
The DMAC can generate a DMA request as triggered by the cause of request that is selected with the
DMS and DSEL3 to DSEL0 bits of DMiSL register (i = 0, 1) on either channel. Table 1.11.4 shows the
timing at which the DMAS bit changes state.
Whenever a DMA request is generated, the DMAS bit is set to â1â (DMA requested) regardless of whether
or not the DMAE bit is set. If the DMAE bit was set to â1â (enabled) when this occurred, the DMAS bit is
set to â0â (DMA not requested) immediately before a data transfer starts. This bit cannot be set to â1â in
a program (it can only be set to â0â).
The DMAS bit may be set to â1â when the DMS or the DSEL3 to DSEL0 bits change state. Therefore,
always be sure to set the DMAS bit to â0â after changing the DMS or the DSEL3 to DSEL0 bits.
Because if the DMAE bit is â1â, a data transfer starts immediately after a DMA request is generated, the
DMAS bit in almost all cases is â0â when read in a program. Read the DMAE bit to determine whether the
DMAC is enabled.
Table 1.11.4. Timing at Which the DMAS Bit Changes State
DMA factor
DMAS bit of the DMiCON register
Timing at which the bit is set to â1â Timing at which the bit is set to â0â
Software trigger
When the DSR bit of DMiCON
register is set to â1â
⢠Immediately before a data transfer starts
⢠When set by writing â0â in a program
Peripheral function
When the interrupt control register
for the peripheral function that is
selected by the DSEL3 to DSEL0
and DMS bits of DMiCON register
has its IR bit set to â1â
Rev.5.01 Dec 10, 2009 page 76 of 201
REJ03B0014-0501
|
▷ |