rusEFI
The most advanced open source ECU
Dmamux

DMAMUX Initialization and de-initialization

void DMAMUX_Init (DMAMUX_Type *base)
 Initializes the DMAMUX peripheral. More...
 
void DMAMUX_Deinit (DMAMUX_Type *base)
 Deinitializes the DMAMUX peripheral. More...
 

DMAMUX Channel Operation

static void DMAMUX_EnableChannel (DMAMUX_Type *base, uint32_t channel)
 Enables the DMAMUX channel. More...
 
static void DMAMUX_DisableChannel (DMAMUX_Type *base, uint32_t channel)
 Disables the DMAMUX channel. More...
 
static void DMAMUX_SetSource (DMAMUX_Type *base, uint32_t channel, uint32_t source)
 Configures the DMAMUX channel source. More...
 
static void DMAMUX_EnablePeriodTrigger (DMAMUX_Type *base, uint32_t channel)
 Enables the DMAMUX period trigger. More...
 
static void DMAMUX_DisablePeriodTrigger (DMAMUX_Type *base, uint32_t channel)
 Disables the DMAMUX period trigger. More...
 
static void DMAMUX_EnableAlwaysOn (DMAMUX_Type *base, uint32_t channel, bool enable)
 Enables the DMA channel to be always ON. More...
 

Detailed Description

Function Documentation

◆ DMAMUX_Deinit()

void DMAMUX_Deinit ( DMAMUX_Type *  base)

Deinitializes the DMAMUX peripheral.

This function gates the DMAMUX clock.

Parameters
baseDMAMUX peripheral base address.

brief Deinitializes the DMAMUX peripheral.

This function gates the DMAMUX clock.

param base DMAMUX peripheral base address.

Definition at line 87 of file fsl_dmamux.c.

88 {
89 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
91 #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
92 }
static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base)
Get instance number for DMAMUX.
Definition: fsl_dmamux.c:47
static const clock_ip_name_t s_dmamuxClockName[]
Array to map DMAMUX instance number to clock name.
Definition: fsl_dmamux.c:41
static void CLOCK_DisableClock(clock_ip_name_t name)
Disable the clock for specific IP.
Definition: fsl_clock.h:653
Here is the call graph for this function:

◆ DMAMUX_DisableChannel()

static void DMAMUX_DisableChannel ( DMAMUX_Type *  base,
uint32_t  channel 
)
inlinestatic

Disables the DMAMUX channel.

This function disables the DMAMUX channel.

Note
The user must disable the DMAMUX channel before configuring it.
Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.

Definition at line 92 of file fsl_dmamux.h.

93 {
94  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
95 
96  base->CHCFG[channel] &= ~DMAMUX_CHCFG_ENBL_MASK;
97 }

Referenced by uart_lld_stop().

Here is the caller graph for this function:

◆ DMAMUX_DisablePeriodTrigger()

static void DMAMUX_DisablePeriodTrigger ( DMAMUX_Type *  base,
uint32_t  channel 
)
inlinestatic

Disables the DMAMUX period trigger.

This function disables the DMAMUX period trigger.

Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.

Definition at line 137 of file fsl_dmamux.h.

138 {
139  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
140 
141  base->CHCFG[channel] &= ~DMAMUX_CHCFG_TRIG_MASK;
142 }

◆ DMAMUX_EnableAlwaysOn()

static void DMAMUX_EnableAlwaysOn ( DMAMUX_Type *  base,
uint32_t  channel,
bool  enable 
)
inlinestatic

Enables the DMA channel to be always ON.

This function enables the DMAMUX channel always ON feature.

Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.
enableSwitcher of the always ON feature. "true" means enabled, "false" means disabled.

Definition at line 155 of file fsl_dmamux.h.

156 {
157  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
158 
159  if (enable)
160  {
161  base->CHCFG[channel] |= DMAMUX_CHCFG_A_ON_MASK;
162  }
163  else
164  {
165  base->CHCFG[channel] &= ~DMAMUX_CHCFG_A_ON_MASK;
166  }
167 }
static void enable(const char *param)
Definition: settings.cpp:631
Here is the call graph for this function:

◆ DMAMUX_EnableChannel()

static void DMAMUX_EnableChannel ( DMAMUX_Type *  base,
uint32_t  channel 
)
inlinestatic

Enables the DMAMUX channel.

This function enables the DMAMUX channel.

Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.

Definition at line 76 of file fsl_dmamux.h.

77 {
78  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
79 
80  base->CHCFG[channel] |= DMAMUX_CHCFG_ENBL_MASK;
81 }

Referenced by uart_lld_start().

Here is the caller graph for this function:

◆ DMAMUX_EnablePeriodTrigger()

static void DMAMUX_EnablePeriodTrigger ( DMAMUX_Type *  base,
uint32_t  channel 
)
inlinestatic

Enables the DMAMUX period trigger.

This function enables the DMAMUX period trigger feature.

Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.

Definition at line 122 of file fsl_dmamux.h.

123 {
124  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
125 
126  base->CHCFG[channel] |= DMAMUX_CHCFG_TRIG_MASK;
127 }

◆ DMAMUX_Init()

void DMAMUX_Init ( DMAMUX_Type *  base)

Initializes the DMAMUX peripheral.

This function ungates the DMAMUX clock.

Parameters
baseDMAMUX peripheral base address.

brief Initializes the DMAMUX peripheral.

This function ungates the DMAMUX clock.

param base DMAMUX peripheral base address.

Definition at line 73 of file fsl_dmamux.c.

74 {
75 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
77 #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
78 }
static void CLOCK_EnableClock(clock_ip_name_t name)
Enable the clock for specific IP.
Definition: fsl_clock.h:641

Referenced by dmaInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DMAMUX_SetSource()

static void DMAMUX_SetSource ( DMAMUX_Type *  base,
uint32_t  channel,
uint32_t  source 
)
inlinestatic

Configures the DMAMUX channel source.

Parameters
baseDMAMUX peripheral base address.
channelDMAMUX channel number.
sourceChannel source, which is used to trigger the DMA transfer.

Definition at line 106 of file fsl_dmamux.h.

107 {
108  assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
109 
110  base->CHCFG[channel] = ((base->CHCFG[channel] & ~DMAMUX_CHCFG_SOURCE_MASK) | DMAMUX_CHCFG_SOURCE(source));
111 }

Referenced by uart_lld_start().

Here is the caller graph for this function: