User`s manual

RX62N Group, RX621 Group 5. Usage Examples
5.7.2. Chain transfer operation
Figure 5-12 shows an example of Data Transfer Controller operation, using chain transfer of blocks.
Transfer 1 is triggered by a software interrupt and copies data from ROM into RAM.
On completion of transfer 1, transfer 2 is started.
On completion of transfer 2, transfer 3 is started.
/* Peripheral driver function prototypes */
#include "r_pdl_dtc.h"
#include "r_pdl_intc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
/* Required for this example */
#include <string.h>
/* Reserve an area for the DTC vector table */
#pragma address dtc_vector_table = 0x00015000
uint32_t dtc_vector_table[256];
/* Reserve three contiguous groups of
16 bytes (full address mode) for the transfer
data areas */
uint32_t dtc_sw_transfer_data[4 * 3];
const char source_string_1[] = "Renesas RX62N";
const char source_string_2[] = "DTC example";
const char source_string_3[] = "using chain transfer";
volatile char destination_string_1[] = ".......................";
volatile char destination_string_2[] = ".......................";
volatile char destination_string_3[] = ".......................";
volatile uint8_t transfer_complete;
void main(void)
{
uint16_t TransferCount;
/* Enable software interrupts */
R_INTC_CreateSoftwareInterrupt(
PDL_INTC_DTC_SW_TRIGGER_ENABLE,
PDL_NO_FUNC,
0
);
Renesas RX62N
DTC example
Using chain transfer
Address space
destination_string_3
destination_string_2
destination_string_1
1
2
3
R20UT0084EE0112 Rev.1.12 Page 5-25
July. 16, 2014