Astra MCU SDK Peripheral Driver Library
 
Loading...
Searching...
No Matches
dma_auto_restart_config_t Struct Reference

DMA auto-restart configuration. More...

#include <dma.h>

Data Fields

bool enable_auto_restart
 
bool infinite_restart
 
uint16_t restart_count
 

Detailed Description

DMA auto-restart configuration.

Controls automatic restart behavior when a DMA command completes. Works in conjunction with register reload settings to enable continuous operation without CPU intervention.

Auto-restart sequence:

  1. DMA command completes
  2. Register reload occurs (if enabled via reg_reload_type)
  3. Command automatically restarts (if auto-restart enabled):
    • If link_addr = 0: Restart the SAME command
    • If link_addr != 0: Jump to the LINKED command
  4. Process repeats until count reached or manually stopped

Use cases:

  • Continuous circular buffer operations
  • Repeated transfers with same or reloaded parameters
  • Periodic data movement without CPU intervention
  • Multi-buffer ping-pong operations

Note: Auto-restart interacts with:

  • Register reload settings (determines what gets restored)
  • Command linking (link_addr determines restart target)
  • CLEARCMD behavior (affects reloaded register values)

Auto-restart behavior:

  • link_addr = 0: Restart same command (circular operation)
  • link_addr != 0: Restart at linked command (chain operation)

Field Documentation

◆ enable_auto_restart

bool dma_auto_restart_config_t::enable_auto_restart

Enable automatic restart after command completion

◆ infinite_restart

bool dma_auto_restart_config_t::infinite_restart

true = restart infinitely, false = use restart_count

◆ restart_count

uint16_t dma_auto_restart_config_t::restart_count

Number of restarts (when infinite_restart = false)