User`s manual
RX62N Group, RX621 Group 4. Library Reference
4.2.9. DMA Controller
1) R_DMAC_Create
Synopsis
Configure the DMA controller.
Prototype
bool R_DMAC_Create(
uint8_t data1,
// Channel selection
uint32_t data2,
// Configuration selection
uint8_t data3,
// Trigger selection
void * data4,
// Source start address
void * data5,
// Destination start address
uint16_t data6,
// Transfer count
uint16_t data7,
// Repeat or Block size
int32_t data8,
// Address offset
uint32_t data9,
// Source address extended repeat area
uint32_t data10,
// Destination address extended repeat area
void * func,
// Callback function
uint8_t data11
// Interrupt priority level
);
Description (1/3)
Set up a DMA channel.
[data1]
The channel number n (where n = 0 to 3).
[data2]
Configure the operation of channel DMAn.
If multiple selections are required, use "|" to separate each selection.
The default settings are shown in bold.
•
Transfer mode selection
PDL_DMAC_NORMAL or
PDL_DMAC_REPEAT or
PDL_DMAC_BLOCK
Normal or
Repeat or
Block mode.
PDL_DMAC_SOURCE or
PDL_DMAC_DESTINATION
If Repeat or Block mode is selected, the source or destination
side can be selected as the Repeat or Block area.
This selection is optional.
•
Address direction selection
PDL_DMAC_SOURCE_ADDRESS_FIXED or
PDL_DMAC_SOURCE_ADDRESS_PLUS or
PDL_DMAC_SOURCE_ADDRESS_MINUS or
PDL_DMAC_SOURCE_ADDRESS_OFFSET
Leave the source address unchanged,
increment it, decrement it or modify it by the
value specified in parameter data8.
Address offset is valid only for n = 0.
PDL_DMAC_DESTINATION_ADDRESS_FIXED or
PDL_DMAC_DESTINATION_ADDRESS_PLUS or
PDL_DMAC_DESTINATION_ADDRESS_MINUS or
PDL_DMAC_DESTINATION_ADDRESS_OFFSET
Leave the destination address
unchanged, increment it, decrement it
or modify it by the value specified in
parameter data8.
Address offset is valid only for n = 0.
•
Transfer data size
PDL_DMAC_SIZE_8 or
PDL_DMAC_SIZE_16 or
PDL_DMAC_SIZE_32
Select 8, 16 or 32 bits for the data to be transferred.
•
Interrupt generation (optional).
PDL_DMAC_IRQ_END
Transfer completion.
PDL_DMAC_IRQ_ESCAPE_END
Escape end.
PDL_DMAC_IRQ_REPEAT_SIZE_END
1-repeat size or 1-block data transfer completion.
PDL_DMAC_IRQ_EXT_SOURCE
Extended repeat area overflow on the source.
PDL_DMAC_IRQ_EXT_DESTINATION
Extended repeat area overflow on the destination.
R20UT0084EE0112 Rev.1.12 Page 4-64
July. 16, 2014