uDMA Controller
There are additional functions that can be used to query the status of a channel, either from an
interrupt handler or in polling fashion. The function ROM_uDMAChannelSizeGet() is used to find
the amount of data remaining to transfer on a channel. This will be zero when a transfer is complete.
The function ROM_uDMAChannelModeGet() can be used to find the transfer mode of a uDMA
channel. This is usually used to see if the mode indicates stopped which means that a transfer has
completed on a channel that was previously running. The function ROM_uDMAChannelIsEnabled()
can be used to determine if a particular channel is enabled.
The uDMA interrupt handler is only for software initiated transfers or errors. uDMA interrupts for
a peripheral occur on the peripheral’s dedicated interrupt channel, and should be handled by the
peripheral interrupt handler. It is not necessary to acknowledge or clear uDMA interrupt sources.
They are cleared automatically when they are serviced.
The uDMA interrupt handler should use the function ROM_uDMAErrorStatusGet() to test if a uDMA
error occurred. If so, the interrupt must be cleared by calling ROM_uDMAErrorStatusClear().
Note:
Many of the API functions take a channel parameter that includes the logical OR of one of
the values UDMA_PRI_SELECT or UDMA_ALT_SELECT to choose the primary or alternate
control structure. For Basic and Auto transfer modes, only the primary control structure is
needed. The alternate control structure is only needed for complex transfer modes of Ping-
pong or Scatter/gather. Refer to the device data sheet for detailed information about transfer
modes.
23.2 Functions
Functions
void ROM_uDMAChannelAssign (uint32_t ui32Mapping)
void ROM_uDMAChannelAttributeDisable (uint32_t ui32ChannelNum, uint32_t ui32Attr)
void ROM_uDMAChannelAttributeEnable (uint32_t ui32ChannelNum, uint32_t ui32Attr)
uint32_t ROM_uDMAChannelAttributeGet (uint32_t ui32ChannelNum)
void ROM_uDMAChannelControlSet (uint32_t ui32ChannelStructIndex, uint32_t ui32Control)
void ROM_uDMAChannelDisable (uint32_t ui32ChannelNum)
void ROM_uDMAChannelEnable (uint32_t ui32ChannelNum)
bool ROM_uDMAChannelIsEnabled (uint32_t ui32ChannelNum)
uint32_t ROM_uDMAChannelModeGet (uint32_t ui32ChannelStructIndex)
void ROM_uDMAChannelRequest (uint32_t ui32ChannelNum)
void ROM_uDMAChannelScatterGatherSet (uint32_t ui32ChannelNum, uint32_t
ui32TaskCount, void ∗pvTaskList, uint32_t ui32IsPeriphSG)
void ROM_uDMAChannelSelectDefault (uint32_t ui32DefPeriphs)
void ROM_uDMAChannelSelectSecondary (uint32_t ui32SecPeriphs)
uint32_t ROM_uDMAChannelSizeGet (uint32_t ui32ChannelStructIndex)
void ROM_uDMAChannelTransferSet (uint32_t ui32ChannelStructIndex, uint32_t ui32Mode,
void ∗pvSrcAddr, void ∗pvDstAddr, uint32_t ui32TransferSize)
void ∗ ROM_uDMAControlAlternateBaseGet (void)
void ∗ ROM_uDMAControlBaseGet (void)
void ROM_uDMAControlBaseSet (void ∗pControlTable)
April 8, 2013 273