Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Enum

This section describes the enumeration definition in DMA device driver. More...

Overview

This section describes the enumeration definition in DMA device driver.

These enumerations include data transfer direction, DMA channel type, and DMA parameters type.
If users want to set the value for the above variables, please refer to Enumerations.

Enumerations

enum  dma_dir {
  MEM_2_PERI = 0,
  PERI_2_MEM = 1
}
 DMA data transfer direction definition. More...
 
enum  dma_type {
  DMA_TYPE_FULLSIZE = 0,
  DMA_TYPE_HALFSIZE = 1,
  DMA_TYPE_VFF = 2
}
 DMA channel type definition. More...
 
enum  dma_param {
  DMA_PARAM_RLCT = 0,
  DMA_PARAM_FIX_ADDR = 1,
  DMX_PARAM_PROG_ADDR = 2,
  DMA_PARAM_VFF_FIFO_SIZE = 3,
  DMA_PARAM_VFF_FIFO_CNT = 4,
  DMA_PARAM_VFF_HWPTR = 5,
  DMA_PARAM_VFF_SWPTR = 6
}
 DMA parameter-type definition. More...
 
enum  dma_status {
  DMA_STATUS_INTERRUPT = 1U << 0,
  DMA_STATUS_RUNNING = 1U << 1,
  DMA_STATUS_PAUSE = 1U << 2
}
 DMA dma_status definition. More...
 
enum  dma_transize {
  DMA_SIZE_BYTE = 0,
  DMA_SIZE_SHORT,
  DMA_SIZE_LONG
}
 DMA dma_transize definition. More...
 
enum  dma_burst_type {
  DMA_BURST_TYPE_SINGLE = 0x0,
  DMA_BURST_TYPE_4BEAT = 0x2,
  DMA_BURST_TYPE_8BEAT = 0x4,
  DMA_BURST_TYPE_16BEAT = 0x6
}
 DMA dma_burst_type definition. More...
 

Enumeration Type Documentation

enum dma_dir

DMA data transfer direction definition.

This definition is only for HALF-SIZE DMA and VFF DMA, and users should set the data direction value before starting DMA hardware.

Enumerator
MEM_2_PERI 

move data from memory to peripheral

PERI_2_MEM 

move data from peripheral to memory

enum dma_type

DMA channel type definition.

DMA hardware has multiple channels and every channel can work separately. According to hardware features, DMA hardware has three different channels: FULL-SIZE DMA, HALF-SIZE DMA and Virtual FIFO DMA.

Enumerator
DMA_TYPE_FULLSIZE 

FULL-SIZE DMA.

DMA_TYPE_HALFSIZE 

HALF-SIZE DMA.

DMA_TYPE_VFF 

Virtual FIFO DMA.

enum dma_param

DMA parameter-type definition.

Sometimes users want to set or get some parameters of DMA channel for interaction with DMA channel during data transfer.

Enumerator
DMA_PARAM_RLCT 

remaining length of current transfer, only for FULL-SIZE DMA and HALF-SIZE DMA.

DMA_PARAM_FIX_ADDR 

fix_addr specifies the address for peripheral; must be 4-Byte alignment; only for HALF-SIZE DMA and VFF DMA.

DMX_PARAM_PROG_ADDR 

prog_addr specifies the memory space address; only for HALF-SIZE DMA and VFF DMA.

DMA_PARAM_VFF_FIFO_SIZE 

FIFO size, only for VFF DMA.

DMA_PARAM_VFF_FIFO_CNT 

Data count of FIFO, only for VFF DMA.

DMA_PARAM_VFF_HWPTR 

Hardware pointer, only for VFF DMA.

DMA_PARAM_VFF_SWPTR 

Software pointer, only for VFF DMA.

enum dma_status

DMA dma_status definition.

DMA device has registers to check the status of every DMA channel, including interrupt flag, running flag and pause flag.

Enumerator
DMA_STATUS_INTERRUPT 

The interrupt of DMA channel is pending and waitting for service.

DMA_STATUS_RUNNING 

The DMA channel is currently running.

DMA_STATUS_PAUSE 

The DMA channel is paused.

DMA dma_transize definition.

The transaction size indicate transfer data bytes in one bus cycle.

Enumerator
DMA_SIZE_BYTE 

Select DMA transaction size as Byte (1-byte)

DMA_SIZE_SHORT 

Select DMA transaction size as Short (2-byte)

DMA_SIZE_LONG 

Select DMA transaction size as Long (4-byte)

DMA dma_burst_type definition.

The burst type indicate the number of continuous data transfer in a burst. Note that burst transfer does not stop until all of the beats in a burst are completed or transfer length is reached.
If burst type is not DMA_BURST_TYPE_SINGLE, the FIFO threshold of peripherals must be configured carefully.
The selection of burst type is restricted by the dma_transize.

Enumerator
DMA_BURST_TYPE_SINGLE 

Select DMA burst type as single-beat.

DMA_BURST_TYPE_4BEAT 

Select DMA burst type as 4-beat.

DMA_BURST_TYPE_8BEAT 

Select DMA burst type as 8-beat.

DMA_BURST_TYPE_16BEAT 

Select DMA burst type as 16-beat.