Peripheral DMA
UG0331 User Guide Revision 15.0
274
7.
For more information on PDMA usage, the sample projects are available and can be generated, as
shown in the following figure.
Figure 137 •
PDMA Examples
9.3.2
PDMA Use Models
9.3.2.1
Use Model 1: Peripheral to Memory or Memory to Memory
1.
Enable PDMA using the MSS configurator of Libero SoC.
2.
Initialize the PDMA using PDMA_init().
3.
Check the status of PDMA channel using PDMA_status().
4.
Clear if any interrupts are pending PDMA_clear_irq().
5.
Configure the following using PDMA_configure().
•
Transfer type
•
Selection of the peripheral and direction (if peripheral to memory transfer is selected)
•
Transfer size (data width)
•
Source and destination address increment
•
Channel priority
•
Wait states (WRITE_ADJ)
DMA transfer and control
PDMA_start()
Starts PDMA transfer
PDMA_load_next_buffer() Loads with next buffer of data
PDMA_status()
Gets the status of PDMA transfer
Interrupt control functions
PDMA_set_irq_handler()
Register PDMA channel interrupt handler functions with the
driver
PDMA_enable_irq()
Enables interrupt for Cortex-M3 processor and channel
interrupt.
PDMA_clear_irq()
Clears the Cortex-M3 processor and channel interrupts.
PDMA_disables_irq()
Disables the interrupts for specified channel
Table 176 •
MSS PDMA APIs
(continued)