See Quickstart guide for SAM PDCA driver.
The Peripheral DMA Controller (PDC) transfers data between on-chip serial peripherals and the on- and/or off-chip memories. The link between the PDC and a serial peripheral is operated by the AHB to ABP bridge.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the Peripheral DMA Controller (PDC). | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the Peripheral DMA Controller (PDC). | |
Functions | |
void | PDCA_0_Handler (void) |
Interrupt handler for PDCA channel 0. More... | |
void | PDCA_10_Handler (void) |
Interrupt handler for PDCA channel 10. More... | |
void | PDCA_11_Handler (void) |
Interrupt handler for PDCA channel 11. More... | |
void | PDCA_12_Handler (void) |
Interrupt handler for PDCA channel 12. More... | |
void | PDCA_13_Handler (void) |
Interrupt handler for PDCA channel 13. More... | |
void | PDCA_14_Handler (void) |
Interrupt handler for PDCA channel 14. More... | |
void | PDCA_15_Handler (void) |
Interrupt handler for PDCA channel 15. More... | |
void | PDCA_1_Handler (void) |
Interrupt handler for PDCA channel 1. More... | |
void | PDCA_2_Handler (void) |
Interrupt handler for PDCA channel 2. More... | |
void | PDCA_3_Handler (void) |
Interrupt handler for PDCA channel 3. More... | |
void | PDCA_4_Handler (void) |
Interrupt handler for PDCA channel 4. More... | |
void | PDCA_5_Handler (void) |
Interrupt handler for PDCA channel 5. More... | |
void | PDCA_6_Handler (void) |
Interrupt handler for PDCA channel 6. More... | |
void | PDCA_7_Handler (void) |
Interrupt handler for PDCA channel 7. More... | |
void | PDCA_8_Handler (void) |
Interrupt handler for PDCA channel 8. More... | |
void | PDCA_9_Handler (void) |
Interrupt handler for PDCA channel 9. More... | |
void | pdca_channel_clear_error (pdca_channel_num_t pdca_ch_number) |
Clear transfer error for the given channel. More... | |
void | pdca_channel_disable (pdca_channel_num_t pdca_ch_number) |
Disable the PDCA for the given channel. More... | |
void | pdca_channel_disable_interrupt (pdca_channel_num_t pdca_ch_number, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Disable PDCA interrupt. More... | |
void | pdca_channel_enable (pdca_channel_num_t pdca_ch_number) |
Enable the PDCA for the given channel. More... | |
void | pdca_channel_enable_interrupt (pdca_channel_num_t pdca_ch_number, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Enable PDCA transfer error interrupt. More... | |
volatile PdcaChannel * | pdca_channel_get_handler (pdca_channel_num_t pdca_ch_number) |
Get PDCA channel handler. More... | |
pdca_channel_interrupt_mask_t | pdca_channel_get_interrupt_mask (pdca_channel_num_t pdca_ch_number) |
Get PDCA interrupt mask. More... | |
static void | pdca_channel_interrupt (const pdca_channel_num_t pdca_ch_number) |
Common PDCA channel interrupt handler. More... | |
bool | pdca_channel_is_enabled (pdca_channel_num_t pdca_ch_number) |
Check if PDCA channel is enabled. More... | |
uint32_t | pdca_channel_read_load_size (pdca_channel_num_t pdca_ch_number) |
Read PDCA channel load values from hardware. More... | |
uint32_t | pdca_channel_read_reload_size (pdca_channel_num_t pdca_ch_number) |
Read PDCA channel reload values from hardware. More... | |
void | pdca_channel_set_callback (pdca_channel_num_t pdca_ch_number, pdca_callback_t callback, uint8_t irq_line, uint8_t irq_level, const pdca_channel_interrupt_mask_t pdca_channel_interrupt_mask) |
Set callback for given PDCA channel. More... | |
void | pdca_channel_set_config (pdca_channel_num_t pdca_ch_number, const pdca_channel_config_t *cfg) |
Write PDCA channel configuration to hardware. More... | |
void | pdca_channel_write_load (pdca_channel_num_t pdca_ch_number, volatile void *addr, uint32_t size) |
Write PDCA channel load values to hardware. More... | |
void | pdca_channel_write_reload (pdca_channel_num_t pdca_ch_number, volatile void *addr, uint32_t size) |
Write PDCA channel reload values to hardware. More... | |
void | pdca_disable (Pdca *pdca) |
Disable the PDCA module. More... | |
void | pdca_enable (Pdca *pdca) |
Disable the PDCA module. More... | |
enum pdca_channel_status | pdca_get_channel_status (pdca_channel_num_t pdca_ch_number) |
Get the PDCA channel transfer enable status. More... | |
Variables | |
pdca_callback_t | pdca_callback_pointer [PDCA_NUMBER_OF_CHANNELS] |
PDCA private data for each channel. More... | |
void PDCA_0_Handler | ( | void | ) |
Interrupt handler for PDCA channel 0.
References pdca_channel_interrupt().
void PDCA_10_Handler | ( | void | ) |
Interrupt handler for PDCA channel 10.
References pdca_channel_interrupt().
void PDCA_11_Handler | ( | void | ) |
Interrupt handler for PDCA channel 11.
References pdca_channel_interrupt().
void PDCA_12_Handler | ( | void | ) |
Interrupt handler for PDCA channel 12.
References pdca_channel_interrupt().
void PDCA_13_Handler | ( | void | ) |
Interrupt handler for PDCA channel 13.
References pdca_channel_interrupt().
void PDCA_14_Handler | ( | void | ) |
Interrupt handler for PDCA channel 14.
References pdca_channel_interrupt().
void PDCA_15_Handler | ( | void | ) |
Interrupt handler for PDCA channel 15.
References pdca_channel_interrupt().
void PDCA_1_Handler | ( | void | ) |
Interrupt handler for PDCA channel 1.
References pdca_channel_interrupt().
void PDCA_2_Handler | ( | void | ) |
Interrupt handler for PDCA channel 2.
References pdca_channel_interrupt().
void PDCA_3_Handler | ( | void | ) |
Interrupt handler for PDCA channel 3.
References pdca_channel_interrupt().
void PDCA_4_Handler | ( | void | ) |
Interrupt handler for PDCA channel 4.
References pdca_channel_interrupt().
void PDCA_5_Handler | ( | void | ) |
Interrupt handler for PDCA channel 5.
References pdca_channel_interrupt().
void PDCA_6_Handler | ( | void | ) |
Interrupt handler for PDCA channel 6.
References pdca_channel_interrupt().
void PDCA_7_Handler | ( | void | ) |
Interrupt handler for PDCA channel 7.
References pdca_channel_interrupt().
void PDCA_8_Handler | ( | void | ) |
Interrupt handler for PDCA channel 8.
References pdca_channel_interrupt().
void PDCA_9_Handler | ( | void | ) |
Interrupt handler for PDCA channel 9.
References pdca_channel_interrupt().
void pdca_channel_clear_error | ( | pdca_channel_num_t | pdca_ch_number | ) |
Clear transfer error for the given channel.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
void pdca_channel_disable | ( | pdca_channel_num_t | pdca_ch_number | ) |
Disable the PDCA for the given channel.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
Referenced by ecb_mode_test_pdca(), lcdca_automated_char_stop(), pdca_parc_callback(), run_ecb_mode_test_pdca(), and run_iis_test().
void pdca_channel_disable_interrupt | ( | pdca_channel_num_t | pdca_ch_number, |
const pdca_channel_interrupt_mask_t | pdca_channel_interrupt_mask | ||
) |
Disable PDCA interrupt.
pdca_ch_number | PDCA channel |
pdca_channel_interrupt_mask | Interrupts to be disabled. |
References pdca_channel_get_handler().
Referenced by pdca_parc_callback(), PDCA_RX_Handler(), pdca_transfer_done(), PDCA_TX_Handler(), and start_adc().
void pdca_channel_enable | ( | pdca_channel_num_t | pdca_ch_number | ) |
Enable the PDCA for the given channel.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
Referenced by adc_pdca_set_config(), aes_callback_pdca(), ecb_mode_test_pdca(), init_pdca(), lcdca_automated_char_start(), main(), read_test_pdca(), run_ecb_mode_test_pdca(), run_iis_test(), run_pdca_loopback_test(), and write_test_pdca().
void pdca_channel_enable_interrupt | ( | pdca_channel_num_t | pdca_ch_number, |
const pdca_channel_interrupt_mask_t | pdca_channel_interrupt_mask | ||
) |
Enable PDCA transfer error interrupt.
pdca_ch_number | PDCA channel |
pdca_channel_interrupt_mask | Interrupts to be enabled. |
References pdca_channel_get_handler().
Referenced by pdca_channel_set_callback().
volatile PdcaChannel* pdca_channel_get_handler | ( | pdca_channel_num_t | pdca_ch_number | ) |
Get PDCA channel handler.
pdca_ch_number | PDCA channel |
Referenced by pdca_channel_clear_error(), pdca_channel_disable(), pdca_channel_disable_interrupt(), pdca_channel_enable(), pdca_channel_enable_interrupt(), pdca_channel_get_interrupt_mask(), pdca_channel_is_enabled(), pdca_channel_read_load_size(), pdca_channel_read_reload_size(), pdca_channel_set_config(), pdca_channel_write_load(), pdca_channel_write_reload(), and pdca_get_channel_status().
pdca_channel_interrupt_mask_t pdca_channel_get_interrupt_mask | ( | pdca_channel_num_t | pdca_ch_number | ) |
Get PDCA interrupt mask.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
|
static |
Common PDCA channel interrupt handler.
Calls the channel callback with the channel status code. The following status codes are possible:
The optional callback used by the interrupt handler is set by the pdca_channel_set_callback() function.
pdca_ch_number | PDCA channel number to handle interrupt for |
References Assert, pdca_get_channel_status(), and status.
Referenced by PDCA_0_Handler(), PDCA_10_Handler(), PDCA_11_Handler(), PDCA_12_Handler(), PDCA_13_Handler(), PDCA_14_Handler(), PDCA_15_Handler(), PDCA_1_Handler(), PDCA_2_Handler(), PDCA_3_Handler(), PDCA_4_Handler(), PDCA_5_Handler(), PDCA_6_Handler(), PDCA_7_Handler(), PDCA_8_Handler(), and PDCA_9_Handler().
bool pdca_channel_is_enabled | ( | pdca_channel_num_t | pdca_ch_number | ) |
Check if PDCA channel is enabled.
pdca_ch_number | PDCA channel number to query |
true | PDCA channel is enabled |
false | PDCA channel is disabled |
References pdca_channel_get_handler(), and status.
uint32_t pdca_channel_read_load_size | ( | pdca_channel_num_t | pdca_ch_number | ) |
Read PDCA channel load values from hardware.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
Referenced by TC00_Handler().
uint32_t pdca_channel_read_reload_size | ( | pdca_channel_num_t | pdca_ch_number | ) |
Read PDCA channel reload values from hardware.
pdca_ch_number | PDCA channel |
References pdca_channel_get_handler().
Referenced by TC00_Handler().
void pdca_channel_set_callback | ( | pdca_channel_num_t | pdca_ch_number, |
pdca_callback_t | callback, | ||
uint8_t | irq_line, | ||
uint8_t | irq_level, | ||
const pdca_channel_interrupt_mask_t | pdca_channel_interrupt_mask | ||
) |
Set callback for given PDCA channel.
pdca_ch_number | PDCA channel number |
callback | callback function pointer |
irq_line | interrupt line. |
irq_level | interrupt level. |
pdca_channel_interrupt_mask | Interrupts to be enabled. |
References callback, irq_register_handler, and pdca_channel_enable_interrupt().
Referenced by init_pdca(), main(), run_adcife_multichannel_test(), and start_adc().
void pdca_channel_set_config | ( | pdca_channel_num_t | pdca_ch_number, |
const pdca_channel_config_t * | cfg | ||
) |
Write PDCA channel configuration to hardware.
pdca_ch_number | PDCA channel |
cfg | Pointer to a PDCA channel config |
References pdca_channel_config_t::addr, pdca_channel_config_t::etrig, pdca_channel_get_handler(), pdca_channel_config_t::pid, pdca_channel_config_t::r_addr, pdca_channel_config_t::r_size, pdca_channel_config_t::ring, pdca_channel_config_t::size, and pdca_channel_config_t::transfer_size.
Referenced by adc_pdca_set_config(), ecb_mode_test_pdca(), init_pdca(), lcdca_automated_char_start(), main(), read_test_pdca(), run_ecb_mode_test_pdca(), run_iis_test(), run_pdca_loopback_test(), and write_test_pdca().
void pdca_channel_write_load | ( | pdca_channel_num_t | pdca_ch_number, |
volatile void * | addr, | ||
uint32_t | size | ||
) |
Write PDCA channel load values to hardware.
pdca_ch_number | PDCA channel |
addr | address where data to load are stored |
size | size of the data block to load |
References pdca_channel_get_handler().
Referenced by main(), pdca_transfer_done(), run_iis_test(), TC00_Handler(), and USART_Handler().
void pdca_channel_write_reload | ( | pdca_channel_num_t | pdca_ch_number, |
volatile void * | addr, | ||
uint32_t | size | ||
) |
Write PDCA channel reload values to hardware.
pdca_ch_number | PDCA channel |
addr | address where data to load are stored |
size | size of the data block to load |
References pdca_channel_get_handler().
Referenced by lcdca_automated_char_reload(), main(), pdca_tranfer_done(), TC00_Handler(), and USART_Handler().
void pdca_disable | ( | Pdca * | pdca | ) |
Disable the PDCA module.
pdca | Base address of the PDCA module |
References SLEEPMGR_BACKUP, sleepmgr_unlock_mode(), and sysclk_disable_peripheral_clock().
Referenced by ecb_mode_test_pdca(), run_ecb_mode_test_pdca(), and run_iis_test().
void pdca_enable | ( | Pdca * | pdca | ) |
Disable the PDCA module.
pdca | Base address of the PDCA module |
References SLEEPMGR_BACKUP, sleepmgr_lock_mode(), and sysclk_enable_peripheral_clock().
Referenced by adc_pdca_set_config(), ecb_mode_test_pdca(), init_pdca(), lcdca_automated_char_start(), main(), run_ecb_mode_test_pdca(), run_iis_test(), and run_pdca_loopback_test().
enum pdca_channel_status pdca_get_channel_status | ( | pdca_channel_num_t | pdca_ch_number | ) |
Get the PDCA channel transfer enable status.
pdca_ch_number | PDCA channel |
References intflag, PDCA_CH_BUSY, PDCA_CH_COUNTER_RELOAD_IS_ZERO, PDCA_CH_FREE, PDCA_CH_TRANSFER_COMPLETED, PDCA_CH_TRANSFER_ERROR, pdca_channel_get_handler(), and status.
Referenced by aes_callback_pdca(), main(), pdca_channel_interrupt(), read_test_pdca(), run_iis_test(), and write_test_pdca().
pdca_callback_t pdca_callback_pointer[PDCA_NUMBER_OF_CHANNELS] |
PDCA private data for each channel.