S32 SDK
edma_irq.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
3  * Copyright 2016 NXP
4  * All rights reserved.
5  *
6  * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR
7  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9  * IN NO EVENT SHALL NXP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
10  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
12  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
14  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
15  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
16  * THE POSSIBILITY OF SUCH DAMAGE.
17  */
18 
35 #include "device_registers.h"
36 
37 /*******************************************************************************
38  * Variables
39  ******************************************************************************/
40 
41 /*******************************************************************************
42  * Code
43  ******************************************************************************/
44 
45 /* External declaration of interrupt handlers, implemented in the driver c file */
46 void EDMA_DRV_IRQHandler(uint8_t channel);
47 void EDMA_DRV_ErrorIRQHandler(void);
48 
49 #ifdef FEATURE_EDMA_ORED_IRQ_LINES_16_CHN
50 
51 void DMA0_15_IRQHandler(void)
52 {
53  /* Read the status flags register */
54  uint32_t mask = 0xFFFF;
55  uint32_t flags = DMA->INT;
56  uint8_t i = 0U;
57  flags &= mask;
58  /* Check all the flags from 0 to 15 and call the handler for the appropriate channel */
59  while (flags > 0U)
60  {
61  if ((flags & 1U) > 0U)
62  {
64  }
65  i++;
66  flags >>= 1U;
67  }
68 }
69 
71 void DMA16_31_IRQHandler(void)
72 {
73  /* Read the status flags register */
74  uint32_t flags = DMA->INT;
75  uint8_t i = 16U;
76  flags >>= 16U;
77  /* Check all the flags from 16 to 31 and call the handler for the appropriate channel */
78  while (flags > 0)
79  {
80  if ((flags & 1U) > 0)
81  {
83  }
84  i++;
85  flags >>= 1;
86  }
87 }
88 #endif
89 
90 #ifdef FEATURE_EDMA_SEPARATE_IRQ_LINES_PER_CHN
91 
92 void DMA0_IRQHandler(void)
93 {
95 }
96 
98 void DMA1_IRQHandler(void)
99 {
101 }
102 
104 void DMA2_IRQHandler(void)
105 {
107 }
108 
110 void DMA3_IRQHandler(void)
111 {
113 }
114 
116 void DMA4_IRQHandler(void)
117 {
119 }
120 
122 void DMA5_IRQHandler(void)
123 {
125 }
126 
128 void DMA6_IRQHandler(void)
129 {
131 }
132 
134 void DMA7_IRQHandler(void)
135 {
137 }
138 
140 void DMA8_IRQHandler(void)
141 {
143 }
144 
146 void DMA9_IRQHandler(void)
147 {
149 }
150 
153 {
155 }
156 
159 {
161 }
162 
165 {
167 }
168 
171 {
173 }
174 
177 {
179 }
180 
183 {
185 }
186 #endif
187 
188 #ifdef FEATURE_EDMA_HAS_ERROR_IRQ
189 
191 {
193 }
194 #endif
195 
196 /*******************************************************************************
197  * EOF
198  ******************************************************************************/
199 
void DMA1_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:98
void DMA4_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:116
void DMA13_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:170
void DMA3_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:110
void DMA2_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:104
void DMA6_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:128
void DMA14_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:176
void DMA_Error_IRQHandler(void)
EDMA ERROR IRQ handler with the same name in the startup code.
Definition: edma_irq.c:190
void DMA11_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:158
void DMA9_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:146
void DMA12_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:164
void DMA5_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:122
void EDMA_DRV_IRQHandler(uint8_t channel)
Definition: edma_driver.c:428
void DMA15_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:182
#define DMA
Definition: S32K144.h:2305
void DMA10_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:152
void DMA0_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:92
void EDMA_DRV_ErrorIRQHandler(void)
Definition: edma_driver.c:448
void DMA8_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:140
void DMA7_IRQHandler(void)
EDMA IRQ handler with the same name in the startup code.
Definition: edma_irq.c:134