跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

Different data is transferred when DTC is used in repeat mode

Last Updated:01/16/2018

Question:

We have set the A/D converter to operate with 8-bit resolution in sequential conversion mode, and the DTC is set to transfer the conversion results to a buffer area in repeat mode. The transfer of the results succeeded at first, but this configuration did not function well after that. What is the problem?

Answer:

The DTC was set as follows: 
DTCBAR : 0xFDU (base address)
DTCCR0 : 0x09 (repeat mode, 8-bit transfer, the transfer source address is fixed, and the transfer destination address is in a repeat area) 
DTBLS0 : 0x01 (1 block = 1-byte transfer)
DTCCT0 : 0x0A (transfer: 10 times)
DTRLD0 : 0x0A (Reloads the value specified to DTCCT0.)
DTSAR0 : &ADCRH (the upper 8-bit address of an AD conversion result) 
DTDAR0 : Address of a globally-defined array (0xffab0)
 
As stated in the caution for the figure illustrating "Data Transfer in Repeat Mode" in the relevant User's Manuals, the lower 8 bits of the initial value for the repeat area address (DTDAR0) must be 00H when repeat mode is selected. Since the above DTC settings do not meet this criteria, the transfer destination address changed to 0xffa00 from 0xffab0 upon completion of the first 10 transfers, which accordingly resulted in a failure of the subsequent transfer. 

When using the DTC in repeat mode, be sure to set a transfer area that has a lower 8-bit address of 00H.

Suitable Products
RL78/G14
RL78/F13
RL78/F14
RL78/F15