![]() |
RZA Flexible Software Package Documentation
Release v1.1.0
|
|
Functions | |
fsp_err_t | R_DMAC_Open (transfer_ctrl_t *const p_api_ctrl, transfer_cfg_t const *const p_cfg) |
fsp_err_t | R_DMAC_Reconfigure (transfer_ctrl_t *const p_api_ctrl, transfer_info_t *p_info) |
fsp_err_t | R_DMAC_Reset (transfer_ctrl_t *const p_api_ctrl, void const *volatile p_src, void *volatile p_dest, uint16_t const num_transfers) |
fsp_err_t | R_DMAC_SoftwareStart (transfer_ctrl_t *const p_api_ctrl, transfer_start_mode_t mode) |
fsp_err_t | R_DMAC_SoftwareStop (transfer_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_DMAC_Enable (transfer_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_DMAC_Disable (transfer_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_DMAC_InfoGet (transfer_ctrl_t *const p_api_ctrl, transfer_properties_t *const p_info) |
fsp_err_t | R_DMAC_Close (transfer_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_DMAC_Reload (transfer_ctrl_t *const p_api_ctrl, void const *p_src, void *p_dest, uint32_t const num_transfers) |
Driver for the DMAC peripheral on RZ MPUs. This module implements the Transfer Interface.
The Direct Memory Access Controller (DMAC) transfers data from one memory location to another without using the CPU.
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_transfer0 | Module name. |
Channel | Must be a valid integer between 0 and 15. | 0 | Specify the hardware channel. |
Mode |
| Normal | Select the transfer mode. |
Transfer Source Size |
| 2 Bytes | Select the transfer source size. |
Transfer Destination Size |
| 2 Bytes | Select the transfer destination size. |
Destination Address Mode |
| Fixed | Select the address mode for the destination. |
Source Address Mode |
| Fixed | Select the address mode for the source. |
Activation Source | Refer to the RZA Configuration tool for available options. | SOFTWARE_TRIGGER | Select the DMAC transfer start event. |
DMA Activation Request Source Select |
| Requested by a transfer source module | DMA Activation Request Source Select. |
DMAC Mode | Register Mode | Register Mode | Select DMAC Mode. |
Callback | Name must be a valid C symbol | NULL | A user callback that is called at the end of the transfer. |
Context | Manual Entry | NULL | Pointer to the context structure passed through the callback argument. |
Transfer End Interrupt Enable | MCU Specific Options | Enable the transfer end interrupt. | |
Transfer End Interrupt Priority | Value must be an integer between 0 and 31 | 24 | Select the transfer end interrupt priority. |
Transfer Interval | Value must be a non-negative integer | 0 | Transfer interval |
Channel Priority |
| module.driver.transfer_on_dmac.channel_priority.fixed | Channel Priority |
Transfer Continuation |
| DMA transfer only once | When Next0 Register Set Transfer completes, Next1 Register Set Transfer occurs |
Setting 1 Destination Pointer | Manual Entry | NULL | Specify the transfer destination pointer. |
Setting 1 Source Pointer | Manual Entry | NULL | Specify the transfer source pointer. |
Setting 1 Number of Transfers | Value must be a non-negative integer | 1 | Specify the bytes of transfers. |
Setting 2 Destination Pointer | Manual Entry | NULL | Specify the transfer destination pointer.(Use only when Transfer with Setting 1 and Setting 2 horizontally is selected in Transfer Continuatuion.) |
Setting 2 Source Pointer | Manual Entry | NULL | Specify the transfer source pointer.(Use only when Transfer with Setting 1 and Setting 2 horizontally is selected in Transfer Continuatuion.) |
Setting 2 Number of Transfers | Value must be a non-negative integer | 1 | Specify the bytes of transfers.(Use only when Transfer with Setting 1 and Setting 2 horizontally is selected in Transfer Continuatuion.) |
The DMAC peripheral module uses ICLK as the clock source. The ICLK frequency is set by using the Clocks tab of the FSP Configuration editor prior to a build, or by using the CGC module at run-time.
This module does not use I/O pins.
The DMAC Module supports two modes of operation.
Data Structures | |
struct | dmac_callback_args_t |
struct | dmac_next1_register_setting_t |
struct | dmac_instance_ctrl_t |
struct | dmac_extended_cfg_t |
struct | dmac_extended_info_t |
Macros | |
#define | DMAC_MAX_NORMAL_TRANSFER_LENGTH |
#define | DMAC_MAX_BLOCK_TRANSFER_LENGTH |
Enumerations | |
enum | dmac_event_t |
enum | dmac_transfer_size_t |
enum | dmac_ack_mode_t |
enum | dmac_detection_t |
enum | dmac_request_direction_t |
enum | dmac_continuous_setting_t |
enum | dmac_channel_scheduling_t |
enum | dmac_mode_select_t |
struct dmac_callback_args_t |
Callback function parameter data.
Data Fields | ||
---|---|---|
dmac_event_t | event | Event code. |
void const * | p_context | Placeholder for user data. Set in r_transfer_t::open function in transfer_cfg_t. |
struct dmac_next1_register_setting_t |
struct dmac_instance_ctrl_t |
Control block used by driver. DO NOT INITIALIZE - this structure will be initialized in transfer_api_t::open.
struct dmac_extended_cfg_t |
DMAC transfer configuration extension. This extension is required.
Data Fields | |
uint8_t | channel |
Channel number. | |
IRQn_Type | dmac_int_irq |
DMAC interrupt number. | |
uint8_t | dmac_int_ipl |
DMAC interrupt priority. | |
uint32_t | dmac_int_irq_detect_type |
DMAC interrupt detection type. | |
dmac_trigger_event_t | activation_source |
IRQn_Type | activation_irq_number |
dmac_ack_mode_t | ack_mode |
DACK output mode. | |
dmac_detection_t | detection_mode |
DMAC request detection method. | |
dmac_request_direction_t | activation_request_source_select |
DMAC activation request source. | |
dmac_mode_select_t | dmac_mode |
DMAC Mode. | |
dmac_continuous_setting_t | continuous_setting |
Next register operation settings. | |
uint16_t | transfer_interval |
DMA transfer interval. | |
dmac_channel_scheduling_t | channel_scheduling |
DMA channel scheduling. | |
void(* | p_callback )(dmac_callback_args_t *cb_data) |
void const * | p_context |
void(* | p_peripheral_module_handler )(IRQn_Type irq) |
dmac_trigger_event_t dmac_extended_cfg_t::activation_source |
Select which event will trigger the transfer.
IRQn_Type dmac_extended_cfg_t::activation_irq_number |
The interrupt ID number that corresponds to the Activation Source.
void(* dmac_extended_cfg_t::p_callback) (dmac_callback_args_t *cb_data) |
Callback for transfer end interrupt.
void const* dmac_extended_cfg_t::p_context |
Placeholder for user data. Passed to the user p_callback in dmac_callback_args_t.
void(* dmac_extended_cfg_t::p_peripheral_module_handler) (IRQn_Type irq) |
Communication module handler that is called when a transfer end interrupt.
struct dmac_extended_info_t |
DMAC transfer configuration extension. This extension is required.
Data Fields | ||
---|---|---|
dmac_transfer_size_t | src_size |
Select number of source bytes to transfer at once. |
dmac_transfer_size_t | dest_size |
Select number of destnination bytes to transfer at once. |
dmac_next1_register_setting_t * | p_next1_register_setting |
Next1 Register set settings |
#define DMAC_MAX_NORMAL_TRANSFER_LENGTH |
Max configurable number of transfers in TRANSFER_MODE_NORMAL.
#define DMAC_MAX_BLOCK_TRANSFER_LENGTH |
Max number of transfers per block in TRANSFER_MODE_BLOCK
enum dmac_event_t |
enum dmac_transfer_size_t |
Transfer size specifies the size of each individual transfer.
enum dmac_ack_mode_t |
enum dmac_detection_t |
Detection method of the DMA request signal. See RZ/T2M hardware manual Table 14.19 DMA Transfer Request Detection Operation Setting Table.
DMA activation request source select. See RZ/T2M hardware manual Table 14.19 DMA Transfer Request Detection Operation Setting Table.
Enumerator | |
---|---|
DMAC_REQUEST_DIRECTION_SOURCE_MODULE | Requested by a transfer source module. |
DMAC_REQUEST_DIRECTION_DESTINATION_MODULE | Requested by a transfer destination module. |
Select the Next register set to be executed next.
enum dmac_mode_select_t |
fsp_err_t R_DMAC_Open | ( | transfer_ctrl_t *const | p_api_ctrl, |
transfer_cfg_t const *const | p_cfg | ||
) |
Configure a DMAC channel.
FSP_SUCCESS | Successful open. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_IP_CHANNEL_NOT_PRESENT | The configured channel is invalid. |
FSP_ERR_IRQ_BSP_DISABLED | The IRQ associated with the activation source is not enabled in the BSP. |
FSP_ERR_ALREADY_OPEN | The control structure is already opened. |
fsp_err_t R_DMAC_Reconfigure | ( | transfer_ctrl_t *const | p_api_ctrl, |
transfer_info_t * | p_info | ||
) |
Reconfigure the transfer with new transfer info.
FSP_SUCCESS | Transfer is configured and will start when trigger occurs. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_ENABLED | DMAC is not enabled. The current configuration must not be valid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_Reset | ( | transfer_ctrl_t *const | p_api_ctrl, |
void const *volatile | p_src, | ||
void *volatile | p_dest, | ||
uint16_t const | num_transfers | ||
) |
Reset transfer source, destination, and number of transfers.
FSP_ERR_UNSUPPORTED | API not supported. |
fsp_err_t R_DMAC_SoftwareStart | ( | transfer_ctrl_t *const | p_api_ctrl, |
transfer_start_mode_t | mode | ||
) |
If the mode is TRANSFER_START_MODE_SINGLE initiate a single transfer with software. If the mode is TRANSFER_START_MODE_REPEAT continue triggering transfers until all of the transfers are completed.
FSP_SUCCESS | Transfer started written successfully. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_SoftwareStop | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Stop software transfers if they were started with TRANSFER_START_MODE_REPEAT.
FSP_SUCCESS | Transfer stopped written successfully. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_Enable | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Enable transfers for the configured activation source.
FSP_SUCCESS | Counter value written successfully. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_Disable | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Disable transfers so that they are no longer triggered by the activation source.
FSP_SUCCESS | Counter value written successfully. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_InfoGet | ( | transfer_ctrl_t *const | p_api_ctrl, |
transfer_properties_t *const | p_info | ||
) |
Set driver specific information in provided pointer.
FSP_SUCCESS | Information has been written to p_info. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
fsp_err_t R_DMAC_Close | ( | transfer_ctrl_t *const | p_api_ctrl | ) |
Disable transfer and clean up internal data. Implements transfer_api_t::close.
FSP_SUCCESS | Successful close. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |
fsp_err_t R_DMAC_Reload | ( | transfer_ctrl_t *const | p_api_ctrl, |
void const *volatile | p_src, | ||
void *volatile | p_dest, | ||
uint32_t const | num_transfers | ||
) |
Make the following transfer settings to continue the transfer. Implements transfer_api_t::reload.
FSP_SUCCESS | Successful continuous transfer settings. |
FSP_ERR_ASSERTION | An input parameter is invalid. |
FSP_ERR_NOT_OPEN | Handle is not initialized. Call R_DMAC_Open to initialize the control block. |