1 //*****************************************************************************
2 //
3 //! @file am_reg.h
4 //!
5 //! @brief Apollo4P register macros
6 //!
7 //! @addtogroup reg_macros_4p Apollo4P Register Macros
8 //! @ingroup apollo4p_hal
9 //! @{
10 //
11 //*****************************************************************************
12 
13 //*****************************************************************************
14 //
15 // Copyright (c) 2023, Ambiq Micro, Inc.
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are met:
20 //
21 // 1. Redistributions of source code must retain the above copyright notice,
22 // this list of conditions and the following disclaimer.
23 //
24 // 2. Redistributions in binary form must reproduce the above copyright
25 // notice, this list of conditions and the following disclaimer in the
26 // documentation and/or other materials provided with the distribution.
27 //
28 // 3. Neither the name of the copyright holder nor the names of its
29 // contributors may be used to endorse or promote products derived from this
30 // software without specific prior written permission.
31 //
32 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
36 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 // POSSIBILITY OF SUCH DAMAGE.
43 //
44 // This is part of revision release_sdk_4_4_0-3c5977e664 of the AmbiqSuite Development Package.
45 //
46 //*****************************************************************************
47 #ifndef AM_REG_H
48 #define AM_REG_H
49 
50 //*****************************************************************************
51 //
52 //! @brief APBDMA
53 //! Instance finder. (1 instance(s) available)
54 //
55 //*****************************************************************************
56 #define AM_REG_APBDMA_NUM_MODULES                    1
57 #define AM_REG_APBDMAn(n) \
58     (REG_APBDMA_BASEADDR + 0x00001000 * n)
59 
60 //*****************************************************************************
61 //
62 //! @brief CLKGEN
63 //! Instance finder. (1 instance(s) available)
64 //
65 //*****************************************************************************
66 #define AM_REG_CLKGEN_NUM_MODULES                    1
67 #define AM_REG_CLKGENn(n) \
68     (REG_CLKGEN_BASEADDR + 0x00000000 * n)
69 
70 //*****************************************************************************
71 //
72 //! @brief CRYPTO
73 //! Instance finder. (1 instance(s) available)
74 //
75 //*****************************************************************************
76 #define AM_REG_CRYPTO_NUM_MODULES                    1
77 #define AM_REG_CRYPTOn(n) \
78     (REG_CRYPTO_BASEADDR + 0x00000000 * n)
79 
80 //*****************************************************************************
81 //
82 //! @brief RSTGEN
83 //! Instance finder. (1 instance(s) available)
84 //
85 //*****************************************************************************
86 #define AM_REG_RSTGEN_NUM_MODULES                    1
87 #define AM_REG_RSTGENn(n) \
88     (REG_RSTGEN_BASEADDR + 0x00000000 * n)
89 
90 //*****************************************************************************
91 //
92 //! @brief RTC
93 //! Instance finder. (1 instance(s) available)
94 //
95 //*****************************************************************************
96 #define AM_REG_RTC_NUM_MODULES                       1
97 #define AM_REG_RTCn(n) \
98     (REG_RTC_BASEADDR + 0x00000000 * n)
99 
100 //*****************************************************************************
101 //
102 //! @brief SECURITY
103 //! Instance finder. (1 instance(s) available)
104 //
105 //*****************************************************************************
106 #define AM_REG_SECURITY_NUM_MODULES                  1
107 #define AM_REG_SECURITYn(n) \
108     (REG_SECURITY_BASEADDR + 0x00001000 * n)
109 
110 //*****************************************************************************
111 //
112 //! @brief WDT
113 //! Instance finder. (1 instance(s) available)
114 //
115 //*****************************************************************************
116 #define AM_REG_WDT_NUM_MODULES                       1
117 #define AM_REG_WDTn(n) \
118     (REG_WDT_BASEADDR + 0x00000000 * n)
119 
120 //*****************************************************************************
121 //
122 //! @brief I2S
123 //! Instance finder. (2 instance(s) available)
124 //
125 //*****************************************************************************
126 #define AM_REG_I2S_NUM_MODULES                       2
127 #define AM_REG_I2Sn(n) \
128     (REG_I2S_BASEADDR + 0x00001000 * n)
129 
130 //*****************************************************************************
131 //
132 //! @brief PDM
133 //! Instance finder. (4 instance(s) available)
134 //
135 //*****************************************************************************
136 #define AM_REG_PDM_NUM_MODULES                       4
137 #define AM_REG_PDMn(n) \
138     (REG_PDM_BASEADDR + 0x00001000 * n)
139 
140 //*****************************************************************************
141 //
142 //! @brief ADC
143 //! Instance finder. (1 instance(s) available)
144 //
145 //*****************************************************************************
146 #define AM_REG_ADC_NUM_MODULES                       1
147 #define AM_REG_ADCn(n) \
148     (REG_ADC_BASEADDR + 0x00000000 * n)
149 
150 //*****************************************************************************
151 //
152 //! @brief AUDADC
153 //! Instance finder. (1 instance(s) available)
154 //
155 //*****************************************************************************
156 #define AM_REG_AUDADC_NUM_MODULES                    1
157 #define AM_REG_AUDADCn(n) \
158     (REG_AUDADC_BASEADDR + 0x00000000 * n)
159 
160 //*****************************************************************************
161 //
162 //! @brief CPU
163 //! Instance finder. (1 instance(s) available)
164 //
165 //*****************************************************************************
166 #define AM_REG_CPU_NUM_MODULES                       1
167 #define AM_REG_CPUn(n) \
168     (REG_CPU_BASEADDR + 0x00001000 * n)
169 
170 //*****************************************************************************
171 //
172 //! @brief DC
173 //! Instance finder. (1 instance(s) available)
174 //
175 //*****************************************************************************
176 #define AM_REG_DC_NUM_MODULES                        1
177 #define AM_REG_DCn(n) \
178     (REG_DC_BASEADDR + 0x00000000 * n)
179 
180 //*****************************************************************************
181 //
182 //! @brief DSI
183 //! Instance finder. (1 instance(s) available)
184 //
185 //*****************************************************************************
186 #define AM_REG_DSI_NUM_MODULES                       1
187 #define AM_REG_DSIn(n) \
188     (REG_DSI_BASEADDR + 0x00000000 * n)
189 
190 //*****************************************************************************
191 //
192 //! @brief FPIO
193 //! Instance finder. (1 instance(s) available)
194 //
195 //*****************************************************************************
196 #define AM_REG_FPIO_NUM_MODULES                      1
197 #define AM_REG_FPIOn(n) \
198     (REG_FPIO_BASEADDR + 0x00000000 * n)
199 
200 //*****************************************************************************
201 //
202 //! @brief GPIO
203 //! Instance finder. (1 instance(s) available)
204 //
205 //*****************************************************************************
206 #define AM_REG_GPIO_NUM_MODULES                      1
207 #define AM_REG_GPIOn(n) \
208     (REG_GPIO_BASEADDR + 0x00000004 * n)
209 
210 //*****************************************************************************
211 //
212 //! @brief GPU
213 //! Instance finder. (1 instance(s) available)
214 //
215 //*****************************************************************************
216 #define AM_REG_GPU_NUM_MODULES                       1
217 #define AM_REG_GPUn(n) \
218     (REG_GPU_BASEADDR + 0x00000000 * n)
219 
220 //*****************************************************************************
221 //
222 //! @brief IOM
223 //! Instance finder. (8 instance(s) available)
224 //
225 //*****************************************************************************
226 #define AM_REG_IOM_NUM_MODULES                       8
227 #define AM_REG_IOMn(n) \
228     (REG_IOM_BASEADDR + 0x00001000 * n)
229 
230 //*****************************************************************************
231 //
232 //! @brief IOSLAVE
233 //! Instance finder. (1 instance(s) available)
234 //
235 //*****************************************************************************
236 #define AM_REG_IOSLAVE_NUM_MODULES                   1
237 #define AM_REG_IOSLAVEn(n) \
238     (REG_IOSLAVE_BASEADDR + 0x00000000 * n)
239 
240 //*****************************************************************************
241 //
242 //! @brief MCUCTRL
243 //! Instance finder. (1 instance(s) available)
244 //
245 //*****************************************************************************
246 #define AM_REG_MCUCTRL_NUM_MODULES                   1
247 #define AM_REG_MCUCTRLn(n) \
248     (REG_MCUCTRL_BASEADDR + 0x00000000 * n)
249 
250 //*****************************************************************************
251 //
252 //! @brief MSPI
253 //! Instance finder. (3 instance(s) available)
254 //
255 //*****************************************************************************
256 #define AM_REG_MSPI_NUM_MODULES                      3
257 #define AM_REG_MSPIn(n) \
258     (REG_MSPI_BASEADDR + 0x00001000 * n)
259 
260 //*****************************************************************************
261 //
262 //! @brief PWRCTRL
263 //! Instance finder. (1 instance(s) available)
264 //
265 //*****************************************************************************
266 #define AM_REG_PWRCTRL_NUM_MODULES                   1
267 #define AM_REG_PWRCTRLn(n) \
268     (REG_PWRCTRL_BASEADDR + 0x00000000 * n)
269 
270 //*****************************************************************************
271 //
272 //! @brief SDIO
273 //! Instance finder. (1 instance(s) available)
274 //
275 //*****************************************************************************
276 #define AM_REG_SDIO_NUM_MODULES                      1
277 #define AM_REG_SDIOn(n) \
278     (REG_SDIO_BASEADDR + 0x00000000 * n)
279 
280 //*****************************************************************************
281 //
282 //! @brief STIMER
283 //! Instance finder. (1 instance(s) available)
284 //
285 //*****************************************************************************
286 #define AM_REG_STIMER_NUM_MODULES                    1
287 #define AM_REG_STIMERn(n) \
288     (REG_STIMER_BASEADDR + 0x00000000 * n)
289 
290 //*****************************************************************************
291 //
292 //! @brief TIMER
293 //! Instance finder. (1 instance(s) available)
294 //
295 //*****************************************************************************
296 #define AM_REG_TIMER_NUM_MODULES                     1
297 #define AM_REG_TIMERn(n) \
298     (REG_TIMER_BASEADDR + 0x00000020 * n)
299 
300 //*****************************************************************************
301 //
302 //! @brief UART
303 //! Instance finder. (4 instance(s) available)
304 //
305 //*****************************************************************************
306 #define AM_REG_UART_NUM_MODULES                      4
307 #define AM_REG_UARTn(n) \
308     (REG_UART_BASEADDR + 0x00001000 * n)
309 
310 //*****************************************************************************
311 //
312 //! @brief USB
313 //! Instance finder. (1 instance(s) available)
314 //
315 //*****************************************************************************
316 #define AM_REG_USB_NUM_MODULES                       1
317 #define AM_REG_USBn(n) \
318     (REG_USB_BASEADDR + 0x00000004 * n)
319 
320 //*****************************************************************************
321 //
322 //! @brief USBPHY
323 //! Instance finder. (1 instance(s) available)
324 //
325 //*****************************************************************************
326 #define AM_REG_USBPHY_NUM_MODULES                    1
327 #define AM_REG_USBPHYn(n) \
328     (REG_USBPHY_BASEADDR + 0x00000004 * n)
329 
330 //*****************************************************************************
331 //
332 //! @brief VCOMP
333 //! Instance finder. (1 instance(s) available)
334 //
335 //*****************************************************************************
336 #define AM_REG_VCOMP_NUM_MODULES                     1
337 #define AM_REG_VCOMPn(n) \
338     (REG_VCOMP_BASEADDR + 0x00000000 * n)
339 
340 #endif // AM_REG_H
341 
342 //*****************************************************************************
343 //
344 // End Doxygen group.
345 //! @}
346 //
347 //*****************************************************************************
348