libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
g4/dmamux.h
Go to the documentation of this file.
1/** @defgroup dmamux_defines DMAMUX Defines
2
3@ingroup STM32G4xx_defines
4
5@brief Defined Constants and Types for the STM32G4xx DMAMUX
6
7@version 1.0.0
8
9LGPL License Terms @ref lgpl_license
10 */
11
12/*
13 * This file is part of the libopencm3 project.
14 *
15 * This library is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public License
26 * along with this library. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31/**@{*/
32
34
35 /** @defgroup dmamux_reg_base DMAMUX register base addresses
36 * @{
37 */
38#define DMAMUX1 DMAMUX_BASE
39/**@}*/
40
41/* --- DMAMUX_CxCR values ------------------------------------ */
42
43/** @defgroup dmamux_cxcr_sync_id SYNCID Synchronization input selected
44@{*/
45#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE0 0
46#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE1 1
47#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE2 2
48#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE3 3
49#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE4 4
50#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE5 5
51#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE6 6
52#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE7 7
53#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE8 8
54#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE9 9
55#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE10 10
56#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE11 11
57#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE12 12
58#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE13 13
59#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE14 14
60#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE15 15
61#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH0_EVT 16
62#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH1_EVT 17
63#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH2_EVT 18
64#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH3_EVT 19
65#define DMAMUX_CxCR_SYNC_ID_LPTIM1_OUT 20
66/**@}*/
67
68
69/** @defgroup dmamux_cxcr_dmareq_id DMAREQID DMA request line selected
70@{*/
71#define DMAMUX_CxCR_DMAREQ_ID_DMAMUX_REQ_GEN0 1
72#define DMAMUX_CxCR_DMAREQ_ID_DMAMUX_REQ_GEN1 2
73#define DMAMUX_CxCR_DMAREQ_ID_DMAMUX_REQ_GEN2 3
74#define DMAMUX_CxCR_DMAREQ_ID_DMAMUX_REQ_GEN3 4
75#define DMAMUX_CxCR_DMAREQ_ID_ADC1 5
76#define DMAMUX_CxCR_DMAREQ_ID_DAC1_CH1 6
77#define DMAMUX_CxCR_DMAREQ_ID_DAC1_CH2 7
78#define DMAMUX_CxCR_DMAREQ_ID_TIM6_UP 8
79#define DMAMUX_CxCR_DMAREQ_ID_TIM7_UP 9
80#define DMAMUX_CxCR_DMAREQ_ID_SPI1_RX 10
81#define DMAMUX_CxCR_DMAREQ_ID_SPI1_TX 11
82#define DMAMUX_CxCR_DMAREQ_ID_SPI2_RX 12
83#define DMAMUX_CxCR_DMAREQ_ID_SPI2_TX 13
84#define DMAMUX_CxCR_DMAREQ_ID_SPI3_RX 14
85#define DMAMUX_CxCR_DMAREQ_ID_SPI3_TX 15
86#define DMAMUX_CxCR_DMAREQ_ID_I2C1_RX 16
87#define DMAMUX_CxCR_DMAREQ_ID_I2C1_TX 17
88#define DMAMUX_CxCR_DMAREQ_ID_I2C2_RX 18
89#define DMAMUX_CxCR_DMAREQ_ID_I2C2_TX 19
90#define DMAMUX_CxCR_DMAREQ_ID_I2C3_RX 20
91#define DMAMUX_CxCR_DMAREQ_ID_I2C3_TX 21
92#define DMAMUX_CxCR_DMAREQ_ID_I2C4_RX 22
93#define DMAMUX_CxCR_DMAREQ_ID_I2C4_TX 23
94#define DMAMUX_CxCR_DMAREQ_ID_UART1_RX 24
95#define DMAMUX_CxCR_DMAREQ_ID_UART1_TX 25
96#define DMAMUX_CxCR_DMAREQ_ID_UART2_RX 26
97#define DMAMUX_CxCR_DMAREQ_ID_UART2_TX 27
98#define DMAMUX_CxCR_DMAREQ_ID_UART3_RX 28
99#define DMAMUX_CxCR_DMAREQ_ID_UART3_TX 29
100#define DMAMUX_CxCR_DMAREQ_ID_UART4_RX 30
101#define DMAMUX_CxCR_DMAREQ_ID_UART4_TX 31
102#define DMAMUX_CxCR_DMAREQ_ID_UART5_RX 32
103#define DMAMUX_CxCR_DMAREQ_ID_UART5_TX 33
104#define DMAMUX_CxCR_DMAREQ_ID_LPUART1_RX 34
105#define DMAMUX_CxCR_DMAREQ_ID_LPUART1_TX 35
106#define DMAMUX_CxCR_DMAREQ_ID_ADC2 36
107#define DMAMUX_CxCR_DMAREQ_ID_ADC3 37
108#define DMAMUX_CxCR_DMAREQ_ID_ADC4 38
109#define DMAMUX_CxCR_DMAREQ_ID_ADC5 39
110#define DMAMUX_CxCR_DMAREQ_ID_QUADSPI 40
111#define DMAMUX_CxCR_DMAREQ_ID_DAC2_CH1 41
112#define DMAMUX_CxCR_DMAREQ_ID_TIM1_CH1 42
113#define DMAMUX_CxCR_DMAREQ_ID_TIM1_CH2 43
114#define DMAMUX_CxCR_DMAREQ_ID_TIM1_CH3 44
115#define DMAMUX_CxCR_DMAREQ_ID_TIM1_CH4 45
116#define DMAMUX_CxCR_DMAREQ_ID_TIM1_UP 46
117#define DMAMUX_CxCR_DMAREQ_ID_TIM1_TRIG 47
118#define DMAMUX_CxCR_DMAREQ_ID_TIM1_COM 48
119#define DMAMUX_CxCR_DMAREQ_ID_TIM8_CH1 49
120#define DMAMUX_CxCR_DMAREQ_ID_TIM8_CH2 50
121#define DMAMUX_CxCR_DMAREQ_ID_TIM8_CH3 51
122#define DMAMUX_CxCR_DMAREQ_ID_TIM8_CH4 52
123#define DMAMUX_CxCR_DMAREQ_ID_TIM8_UP 53
124#define DMAMUX_CxCR_DMAREQ_ID_TIM8_TRIG 54
125#define DMAMUX_CxCR_DMAREQ_ID_TIM8_COM 55
126#define DMAMUX_CxCR_DMAREQ_ID_TIM2_CH1 56
127#define DMAMUX_CxCR_DMAREQ_ID_TIM2_CH2 57
128#define DMAMUX_CxCR_DMAREQ_ID_TIM2_CH3 58
129#define DMAMUX_CxCR_DMAREQ_ID_TIM2_CH4 59
130#define DMAMUX_CxCR_DMAREQ_ID_TIM2_UP 60
131#define DMAMUX_CxCR_DMAREQ_ID_TIM3_CH1 61
132#define DMAMUX_CxCR_DMAREQ_ID_TIM3_CH2 62
133#define DMAMUX_CxCR_DMAREQ_ID_TIM3_CH3 63
134#define DMAMUX_CxCR_DMAREQ_ID_TIM3_CH4 64
135#define DMAMUX_CxCR_DMAREQ_ID_TIM3_UP 65
136#define DMAMUX_CxCR_DMAREQ_ID_TIM3_TRIG 66
137#define DMAMUX_CxCR_DMAREQ_ID_TIM4_CH1 67
138#define DMAMUX_CxCR_DMAREQ_ID_TIM4_CH2 68
139#define DMAMUX_CxCR_DMAREQ_ID_TIM4_CH3 69
140#define DMAMUX_CxCR_DMAREQ_ID_TIM4_CH4 70
141#define DMAMUX_CxCR_DMAREQ_ID_TIM4_UP 71
142#define DMAMUX_CxCR_DMAREQ_ID_TIM5_CH1 72
143#define DMAMUX_CxCR_DMAREQ_ID_TIM5_CH2 73
144#define DMAMUX_CxCR_DMAREQ_ID_TIM5_CH3 74
145#define DMAMUX_CxCR_DMAREQ_ID_TIM5_CH4 75
146#define DMAMUX_CxCR_DMAREQ_ID_TIM5_UP 76
147#define DMAMUX_CxCR_DMAREQ_ID_TIM5_TRIG 77
148#define DMAMUX_CxCR_DMAREQ_ID_TIM15_CH1 78
149#define DMAMUX_CxCR_DMAREQ_ID_TIM15_UP 79
150#define DMAMUX_CxCR_DMAREQ_ID_TIM15_TRIG 80
151#define DMAMUX_CxCR_DMAREQ_ID_TIM15_COM 81
152#define DMAMUX_CxCR_DMAREQ_ID_TIM16_CH1 82
153#define DMAMUX_CxCR_DMAREQ_ID_TIM16_UP 83
154#define DMAMUX_CxCR_DMAREQ_ID_TIM17_CH1 84
155#define DMAMUX_CxCR_DMAREQ_ID_TIM17_UP 85
156#define DMAMUX_CxCR_DMAREQ_ID_TIM20_CH1 86
157#define DMAMUX_CxCR_DMAREQ_ID_TIM20_CH2 87
158#define DMAMUX_CxCR_DMAREQ_ID_TIM20_CH3 88
159#define DMAMUX_CxCR_DMAREQ_ID_TIM20_CH4 89
160#define DMAMUX_CxCR_DMAREQ_ID_TIM20_UP 90
161#define DMAMUX_CxCR_DMAREQ_ID_AES_IN 91
162#define DMAMUX_CxCR_DMAREQ_ID_AES_OUT 92
163#define DMAMUX_CxCR_DMAREQ_ID_TIM20_TRIG 93
164#define DMAMUX_CxCR_DMAREQ_ID_TIM20_COM 94
165#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_MASTER 95
166#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIMA 96
167#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIMB 97
168#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIMC 98
169#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIMD 99
170#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIME 100
171#define DMAMUX_CxCR_DMAREQ_ID_HRTIM_TIMF 101
172#define DMAMUX_CxCR_DMAREQ_ID_DAC3_CH1 102
173#define DMAMUX_CxCR_DMAREQ_ID_DAC3_CH2 103
174#define DMAMUX_CxCR_DMAREQ_ID_DAC4_CH1 104
175#define DMAMUX_CxCR_DMAREQ_ID_DAC4_CH2 105
176#define DMAMUX_CxCR_DMAREQ_ID_SPI4_RX 106
177#define DMAMUX_CxCR_DMAREQ_ID_SPI4_TX 107
178#define DMAMUX_CxCR_DMAREQ_ID_SAI1_A 108
179#define DMAMUX_CxCR_DMAREQ_ID_SAI1_B 109
180#define DMAMUX_CxCR_DMAREQ_ID_FMAC_READ 110
181#define DMAMUX_CxCR_DMAREQ_ID_FMAC_WRITE 111
182#define DMAMUX_CxCR_DMAREQ_ID_CORDIC_READ 112
183#define DMAMUX_CxCR_DMAREQ_ID_CORDIC_WRITE 113
184#define DMAMUX_CxCR_DMAREQ_ID_UCPD1_RX 114
185#define DMAMUX_CxCR_DMAREQ_ID_UCPD1_TX 115
186
187/**@}*/
188
189/* --- DMAMUX_RGxCR values ----------------------------------- */
190
191/** @defgroup dmamux_rgxcr_sig_id SIGID DMA request trigger input selected
192@{*/
193#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE0 0
194#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE1 1
195#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE2 2
196#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE3 3
197#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE4 4
198#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE5 5
199#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE6 6
200#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE7 7
201#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE8 8
202#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE9 9
203#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE10 10
204#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE11 11
205#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE12 12
206#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE13 13
207#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE14 14
208#define DMAMUX_CxCR_SYNC_ID_EXTI_LINE15 15
209#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH0_EVT 16
210#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH1_EVT 17
211#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH2_EVT 18
212#define DMAMUX_CxCR_SYNC_ID_DMAMUX_CH3_EVT 19
213#define DMAMUX_CxCR_SYNC_ID_LPTIM1_OUT 20
214/**@}*/
215
216/**@}*/