
Rev.1.00 May 22 2012
REJ09B0566
4
4.2.6 37BDMA Controller R_DMAC_Create
4.2.6. DMA Controller
Note: The current RPDL demo sample code does not include RPDL API for DMAC.
1) R_DMAC_Create
Synopsis
Configure the DMA controller.
Prototype bool R_DMAC_Create(
uint8_t data1, // Channel selection
uint32_t data2, // Configuration selection
uint32_t data3, // Configuration selection
uint16_t data4, // Trigger selection
void * data5, // Source start address
void * data6, // Destination start address
uint32_t data7, // Transfer byte count
void * data8, // Source reload address
void * data9, // Destination reload address
uint32_t data10, // Transfer byte count reload value
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 15).
[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 system selection
PDL_DMAC_SINGLE_REQUEST or
PDL_DMAC_CONSECUTIVE_REQUEST
Single-operand,
consecutive-operand
• Transfer Bus Mode
PDL_DMAC_CYCLE_STEAL_MODE or
PDL_DMAC_BURST_MODE
Bus operates in cycle steal mode,
Bus operates in burst mode
• Address addition direction selection
PDL_DMAC_SOURCE_ADDRESS_FIXED or Leave the address unchanged.
PDL_DMAC_SOURCE_ADDRESS_PLUS or Increment the address by the data size.
PDL_DMAC_SOURCE_ADDRESS_MINUS or Decrement the address by the data size.
PDL_DMAC_DESTINATION_ADDRESS_FIXED or Leave the address unchanged.
PDL_DMAC_DESTINATION_ADDRESS_PLUS or Increment the address by the data size.
PDL_DMAC_DESTINATION_ADDRESS_MINUS or Decrement the address by the data size.
• Transfer data size
PDL_DMAC_SIZE_8 or
PDL_DMAC_SIZE_16 or
PDL_DMAC_SIZE_32 or
PDL_DMAC_SIZE_32
Select 8, 16, 32 or 64 bits for the data to be transferred.
• Half End Interrupt control
PDL_DMAC_HALF_END_INTERRUPT_DISABLE or
PDL_DMAC_HALF_END_INTERRUPT_ENABLE
Disable or enable generation of interrupt
on transfer of half of total data.
• end-of-transfer reload control
PDL_DMAC_SOURCE_ADDRESS_RELOAD_DISABLE or
PDL_DMAC_SOURCE_ADDRESS_RELOAD_ENABLE
Disable or enable reloading
of source address.
Comentários a estes Manuais