VSF Documented
Data Fields
vsf_dma_channel_cfg_t Struct Reference

dma configuration More...

#include <dma.h>

Data Fields

vsf_dma_channel_mode_t mode
 
vsf_dma_isr_t isr
 
vsf_dma_irq_mask_t irq_mask
 
vsf_arch_prio_t prio
 
uint8_t src_request_idx
 
uint8_t dst_request_idx
 
uint8_t sync_reqcnt
 
uint8_t sync_signal
 

Detailed Description

dma configuration

DMA channel configuration structure for transfer setup

Note
This structure contains all configuration needed for DMA transfer operations, including transfer mode, interrupt settings, and peripheral indices.
Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

Field Documentation

◆ mode

vsf_dma_channel_mode_t vsf_dma_channel_cfg_t::mode

DMA channel mode, including transfer direction, address increment mode, data width, burst length, priority, etc. Use VSF_DMA_XXX macros to configure (e.g. VSF_DMA_MEMORY_TO_PERIPHERAL | VSF_DMA_SRC_ADDR_INCREMENT | VSF_DMA_DST_WIDTH_BYTES_4)

Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ isr

vsf_dma_isr_t vsf_dma_channel_cfg_t::isr

Interrupt service routine configuration, including handler function and target pointer

Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ irq_mask

vsf_dma_irq_mask_t vsf_dma_channel_cfg_t::irq_mask

Interrupt mask, indicating which interrupts to enable (e.g. VSF_DMA_IRQ_MASK_CPL | VSF_DMA_IRQ_MASK_ERROR) Multiple interrupt types can be combined using bitwise OR operation

Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ prio

vsf_arch_prio_t vsf_dma_channel_cfg_t::prio

Interrupt priority for this channel. Use vsf_arch_prio_invalid to use default priority from vsf_dma_cfg_t. The behavior of this field depends on hardware support:

  • For hardware supporting per-channel independent interrupt priority configuration, the field is fully effective and allows independent priority configuration for each channel.
  • For chips where multiple channels share the same interrupt, the field may be effective (driver-dependent), but modifying priority in channel_config may affect other channels sharing the same interrupt, and the behavior is implementation-defined. If priority was set during channel_acquire, this field can be used to dynamically adjust priority at runtime (only for per-channel independent interrupt scenarios). For static allocation (channels fixed to peripherals, channel_acquire() is not needed):
  • Priority can be configured via channel_config() at runtime (if hardware supports dynamic priority adjustment).
  • If priority is not configured via channel_config(), the default priority from vsf_dma_cfg_t will be used. Priority override scenarios for vsf_dma_channel_cfg_t:
  • Dynamic allocation with priority in acquire and config: config priority overrides acquire priority
  • Dynamic allocation with priority only in acquire: config with vsf_arch_prio_invalid keeps acquire priority
  • Dynamic allocation with priority only in config: uses config priority (if hardware supports per-channel interrupts)
  • Static allocation: only config priority applies (channel_acquire is not called)
Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ src_request_idx

uint8_t vsf_dma_channel_cfg_t::src_request_idx

DMA peripheral request signal index for source side This is the hardware-specific request signal ID used for DMA handshaking Only effective when source is a peripheral (ignored for memory source)

Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ dst_request_idx

uint8_t vsf_dma_channel_cfg_t::dst_request_idx

DMA peripheral request signal index for destination side This is the hardware-specific request signal ID used for DMA handshaking Only effective when destination is a peripheral (ignored for memory destination)

Examples
/github/workspace/source/hal/driver/common/template/vsf_template_dma.h.

◆ sync_reqcnt

uint8_t vsf_dma_channel_cfg_t::sync_reqcnt

◆ sync_signal

uint8_t vsf_dma_channel_cfg_t::sync_signal
Generated from commit: vsfteam/vsf@74d00df