Datasheet
V850ES/JG3 APPENDIX E LIST OF CAUTIONS
R01UH0015EJ0300 Rev.3.00 Page 859 of 870
Sep 30, 2010
(26/36)
Chapter
Classification
Function Details of
Function
Cautions Page
Caution for
DMA transfer
executed on
internal RAM
When executing the following instructions located in the internal RAM, do not
execute a DMA transfer that transfers data to/from the internal RAM (transfer
source/destination), because the CPU may not operate correctly afterward.
• Bit manipulation instruction located in internal RAM (SET1, CLR1, or NOT1)
• Data access instruction to misaligned address located in internal RAM
Conversely, when executing a DMA transfer to transfer data to/from the internal
RAM (transfer source/destination), do not execute the above two instructions.
p. 630
Caution for
reading
DCHCn.TCn bit
The TCn bit is cleared to 0 when it is read, but it is not automatically cleared even
if it is read at a specific timing. To accurately clear the TCn bit, add the following
processing.
(a) When waiting for completion of DMA transfer by polling TCn bit
Confirm that the TCn bit has been set to 1 (after TCn bit = 1 is read), and then
read the TCn bit three more times.
(b) When reading TCn bit in interrupt servicing routine
Execute reading the TCn bit three times.
p. 630
Even if the INITn bit is set to 1 when the channel executing DMA transfer is to be
initialized, the channel may not be initialized. To accurately initialize the channel,
execute either of the following two procedures.
(a) Temporarily stop transfer of all DMA channels
Initialize the channel executing DMA transfer using the procedure in <1> to
<7> below.
Note, however, that TCn bit is cleared to 0 when step <5> is executed. Make
sure that the other processing programs do not expect that the TCn bit is 1.
<1> Disable interrupts (DI).
<2> Read the DCHCn.Enn bit of DMA channels other than the one to be
forcibly terminated, and transfer the value to a general-purpose register.
<3> Clear the Enn bit of the DMA channels used (including the channel to be
forcibly terminated) to 0. To clear the Enn bit of the last DMA channel,
execute the clear instruction twice. If the target of DMA transfer (transfer
source/destination) is the internal RAM, execute the instruction three
times.
Example: Execute instructions in the following order if channels 0, 1, and
2 are used (if the target of transfer is not the internal RAM).
• Clear DCHC0.E00 bit to 0.
• Clear DCHC1.E11 bit to 0.
• Clear DCHC2.E22 bit to 0.
• Clear DCHC2.E22 bit to 0 again.
<4> Set the INITn bit of the channel to be forcibly terminated to 1.
<5> Read the TCn bit of each channel not to be forcibly terminated. If both the
TCn bit and the Enn bit read in <2> are 1 (logical product (AND) is 1),
clear the saved Enn bit to 0.
<6> After the operation in <5>, write the Enn bit value to the DCHCn register.
<7> Enable interrupts (EI).
p. 631
Be sure to execute step <5> above to prevent illegal setting of the Enn bit of the
channels whose DMA transfer has been normally completed between <2> and
<3>.
p. 631
Chapter 18
Soft
DMA
function
(DMA
controller)
DMA transfer
initialization
procedure
(setting
DCHCn.INITn
bit to 1)
(b) Repeatedly execute setting INITn bit until transfer is forcibly terminated
correctly
<1> Suppress a request from the DMA request source of the channel to be
forcibly terminated (stop operation of the on-chip peripheral I/O).
<2> Check that the DMA transfer request of the channel to be forcibly
terminated is not held pending, by using the DTFRn.DFn bit. If a DMA
transfer request is held pending, wait until execution of the pending
request is completed.
<3> When it has been confirmed that the DMA request of the channel to be
forcibly terminated is not held pending, clear the Enn bit to 0.
p. 632