]>
git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device/MK22F51212/MK22F51212_i2s.h
2 ** ###################################################################
3 ** Compilers: Keil ARM C/C++ Compiler
4 ** Freescale C/C++ for Embedded ARM
6 ** IAR ANSI C/C++ Compiler for ARM
8 ** Reference manual: K22P121M120SF7RM, Rev. 1, March 24, 2014
9 ** Version: rev. 2.5, 2014-05-06
13 ** Extension to the CMSIS register access layer header.
15 ** Copyright (c) 2014 Freescale Semiconductor, Inc.
16 ** All rights reserved.
18 ** Redistribution and use in source and binary forms, with or without modification,
19 ** are permitted provided that the following conditions are met:
21 ** o Redistributions of source code must retain the above copyright notice, this list
22 ** of conditions and the following disclaimer.
24 ** o Redistributions in binary form must reproduce the above copyright notice, this
25 ** list of conditions and the following disclaimer in the documentation and/or
26 ** other materials provided with the distribution.
28 ** o Neither the name of Freescale Semiconductor, Inc. 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.
32 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 ** http: www.freescale.com
44 ** mail: support@freescale.com
47 ** - rev. 1.0 (2013-07-23)
49 ** - rev. 1.1 (2013-09-17)
50 ** RM rev. 0.4 update.
51 ** - rev. 2.0 (2013-10-29)
52 ** Register accessor macros added to the memory map.
53 ** Symbols for Processor Expert memory map compatibility added to the memory map.
54 ** Startup file for gcc has been updated according to CMSIS 3.2.
55 ** System initialization updated.
56 ** - rev. 2.1 (2013-10-30)
57 ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 ** - rev. 2.2 (2013-12-20)
59 ** Update according to reference manual rev. 0.6,
60 ** - rev. 2.3 (2014-01-13)
61 ** Update according to reference manual rev. 0.61,
62 ** - rev. 2.4 (2014-02-10)
63 ** The declaration of clock configurations has been moved to separate header file system_MK22F51212.h
64 ** - rev. 2.5 (2014-05-06)
65 ** Update according to reference manual rev. 1.0,
66 ** Update of system and startup files.
67 ** Module access macro module_BASES replaced by module_BASE_PTRS.
69 ** ###################################################################
73 * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
75 * This file was generated automatically and any changes may be lost.
77 #ifndef __HW_I2S_REGISTERS_H__
78 #define __HW_I2S_REGISTERS_H__
80 #include "MK22F51212.h"
81 #include "fsl_bitaccess.h"
86 * Inter-IC Sound / Synchronous Audio Interface
88 * Registers defined in this header file:
89 * - HW_I2S_TCSR - SAI Transmit Control Register
90 * - HW_I2S_TCR1 - SAI Transmit Configuration 1 Register
91 * - HW_I2S_TCR2 - SAI Transmit Configuration 2 Register
92 * - HW_I2S_TCR3 - SAI Transmit Configuration 3 Register
93 * - HW_I2S_TCR4 - SAI Transmit Configuration 4 Register
94 * - HW_I2S_TCR5 - SAI Transmit Configuration 5 Register
95 * - HW_I2S_TDRn - SAI Transmit Data Register
96 * - HW_I2S_TFRn - SAI Transmit FIFO Register
97 * - HW_I2S_TMR - SAI Transmit Mask Register
98 * - HW_I2S_RCSR - SAI Receive Control Register
99 * - HW_I2S_RCR1 - SAI Receive Configuration 1 Register
100 * - HW_I2S_RCR2 - SAI Receive Configuration 2 Register
101 * - HW_I2S_RCR3 - SAI Receive Configuration 3 Register
102 * - HW_I2S_RCR4 - SAI Receive Configuration 4 Register
103 * - HW_I2S_RCR5 - SAI Receive Configuration 5 Register
104 * - HW_I2S_RDRn - SAI Receive Data Register
105 * - HW_I2S_RFRn - SAI Receive FIFO Register
106 * - HW_I2S_RMR - SAI Receive Mask Register
107 * - HW_I2S_MCR - SAI MCLK Control Register
108 * - HW_I2S_MDR - SAI MCLK Divide Register
110 * - hw_i2s_t - Struct containing all module registers.
113 #define HW_I2S_INSTANCE_COUNT (1U) /*!< Number of instances of the I2S module. */
115 /*******************************************************************************
116 * HW_I2S_TCSR - SAI Transmit Control Register
117 ******************************************************************************/
120 * @brief HW_I2S_TCSR - SAI Transmit Control Register (RW)
122 * Reset value: 0x00000000U
124 typedef union _hw_i2s_tcsr
127 struct _hw_i2s_tcsr_bitfields
129 uint32_t FRDE
: 1; /*!< [0] FIFO Request DMA Enable */
130 uint32_t FWDE
: 1; /*!< [1] FIFO Warning DMA Enable */
131 uint32_t RESERVED0
: 6; /*!< [7:2] */
132 uint32_t FRIE
: 1; /*!< [8] FIFO Request Interrupt Enable */
133 uint32_t FWIE
: 1; /*!< [9] FIFO Warning Interrupt Enable */
134 uint32_t FEIE
: 1; /*!< [10] FIFO Error Interrupt Enable */
135 uint32_t SEIE
: 1; /*!< [11] Sync Error Interrupt Enable */
136 uint32_t WSIE
: 1; /*!< [12] Word Start Interrupt Enable */
137 uint32_t RESERVED1
: 3; /*!< [15:13] */
138 uint32_t FRF
: 1; /*!< [16] FIFO Request Flag */
139 uint32_t FWF
: 1; /*!< [17] FIFO Warning Flag */
140 uint32_t FEF
: 1; /*!< [18] FIFO Error Flag */
141 uint32_t SEF
: 1; /*!< [19] Sync Error Flag */
142 uint32_t WSF
: 1; /*!< [20] Word Start Flag */
143 uint32_t RESERVED2
: 3; /*!< [23:21] */
144 uint32_t SR
: 1; /*!< [24] Software Reset */
145 uint32_t FR
: 1; /*!< [25] FIFO Reset */
146 uint32_t RESERVED3
: 2; /*!< [27:26] */
147 uint32_t BCE
: 1; /*!< [28] Bit Clock Enable */
148 uint32_t DBGE
: 1; /*!< [29] Debug Enable */
149 uint32_t STOPE
: 1; /*!< [30] Stop Enable */
150 uint32_t TE
: 1; /*!< [31] Transmitter Enable */
155 * @name Constants and macros for entire I2S_TCSR register
158 #define HW_I2S_TCSR_ADDR(x) ((x) + 0x0U)
160 #define HW_I2S_TCSR(x) (*(__IO hw_i2s_tcsr_t *) HW_I2S_TCSR_ADDR(x))
161 #define HW_I2S_TCSR_RD(x) (HW_I2S_TCSR(x).U)
162 #define HW_I2S_TCSR_WR(x, v) (HW_I2S_TCSR(x).U = (v))
163 #define HW_I2S_TCSR_SET(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) | (v)))
164 #define HW_I2S_TCSR_CLR(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) & ~(v)))
165 #define HW_I2S_TCSR_TOG(x, v) (HW_I2S_TCSR_WR(x, HW_I2S_TCSR_RD(x) ^ (v)))
169 * Constants & macros for individual I2S_TCSR bitfields
173 * @name Register I2S_TCSR, field FRDE[0] (RW)
175 * Enables/disables DMA requests.
178 * - 0 - Disables the DMA request.
179 * - 1 - Enables the DMA request.
182 #define BP_I2S_TCSR_FRDE (0U) /*!< Bit position for I2S_TCSR_FRDE. */
183 #define BM_I2S_TCSR_FRDE (0x00000001U) /*!< Bit mask for I2S_TCSR_FRDE. */
184 #define BS_I2S_TCSR_FRDE (1U) /*!< Bit field size in bits for I2S_TCSR_FRDE. */
186 /*! @brief Read current value of the I2S_TCSR_FRDE field. */
187 #define BR_I2S_TCSR_FRDE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRDE))
189 /*! @brief Format value for bitfield I2S_TCSR_FRDE. */
190 #define BF_I2S_TCSR_FRDE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FRDE) & BM_I2S_TCSR_FRDE)
192 /*! @brief Set the FRDE field to a new value. */
193 #define BW_I2S_TCSR_FRDE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRDE) = (v))
197 * @name Register I2S_TCSR, field FWDE[1] (RW)
199 * Enables/disables DMA requests.
202 * - 0 - Disables the DMA request.
203 * - 1 - Enables the DMA request.
206 #define BP_I2S_TCSR_FWDE (1U) /*!< Bit position for I2S_TCSR_FWDE. */
207 #define BM_I2S_TCSR_FWDE (0x00000002U) /*!< Bit mask for I2S_TCSR_FWDE. */
208 #define BS_I2S_TCSR_FWDE (1U) /*!< Bit field size in bits for I2S_TCSR_FWDE. */
210 /*! @brief Read current value of the I2S_TCSR_FWDE field. */
211 #define BR_I2S_TCSR_FWDE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWDE))
213 /*! @brief Format value for bitfield I2S_TCSR_FWDE. */
214 #define BF_I2S_TCSR_FWDE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FWDE) & BM_I2S_TCSR_FWDE)
216 /*! @brief Set the FWDE field to a new value. */
217 #define BW_I2S_TCSR_FWDE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWDE) = (v))
221 * @name Register I2S_TCSR, field FRIE[8] (RW)
223 * Enables/disables FIFO request interrupts.
226 * - 0 - Disables the interrupt.
227 * - 1 - Enables the interrupt.
230 #define BP_I2S_TCSR_FRIE (8U) /*!< Bit position for I2S_TCSR_FRIE. */
231 #define BM_I2S_TCSR_FRIE (0x00000100U) /*!< Bit mask for I2S_TCSR_FRIE. */
232 #define BS_I2S_TCSR_FRIE (1U) /*!< Bit field size in bits for I2S_TCSR_FRIE. */
234 /*! @brief Read current value of the I2S_TCSR_FRIE field. */
235 #define BR_I2S_TCSR_FRIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRIE))
237 /*! @brief Format value for bitfield I2S_TCSR_FRIE. */
238 #define BF_I2S_TCSR_FRIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FRIE) & BM_I2S_TCSR_FRIE)
240 /*! @brief Set the FRIE field to a new value. */
241 #define BW_I2S_TCSR_FRIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRIE) = (v))
245 * @name Register I2S_TCSR, field FWIE[9] (RW)
247 * Enables/disables FIFO warning interrupts.
250 * - 0 - Disables the interrupt.
251 * - 1 - Enables the interrupt.
254 #define BP_I2S_TCSR_FWIE (9U) /*!< Bit position for I2S_TCSR_FWIE. */
255 #define BM_I2S_TCSR_FWIE (0x00000200U) /*!< Bit mask for I2S_TCSR_FWIE. */
256 #define BS_I2S_TCSR_FWIE (1U) /*!< Bit field size in bits for I2S_TCSR_FWIE. */
258 /*! @brief Read current value of the I2S_TCSR_FWIE field. */
259 #define BR_I2S_TCSR_FWIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWIE))
261 /*! @brief Format value for bitfield I2S_TCSR_FWIE. */
262 #define BF_I2S_TCSR_FWIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FWIE) & BM_I2S_TCSR_FWIE)
264 /*! @brief Set the FWIE field to a new value. */
265 #define BW_I2S_TCSR_FWIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWIE) = (v))
269 * @name Register I2S_TCSR, field FEIE[10] (RW)
271 * Enables/disables FIFO error interrupts.
274 * - 0 - Disables the interrupt.
275 * - 1 - Enables the interrupt.
278 #define BP_I2S_TCSR_FEIE (10U) /*!< Bit position for I2S_TCSR_FEIE. */
279 #define BM_I2S_TCSR_FEIE (0x00000400U) /*!< Bit mask for I2S_TCSR_FEIE. */
280 #define BS_I2S_TCSR_FEIE (1U) /*!< Bit field size in bits for I2S_TCSR_FEIE. */
282 /*! @brief Read current value of the I2S_TCSR_FEIE field. */
283 #define BR_I2S_TCSR_FEIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEIE))
285 /*! @brief Format value for bitfield I2S_TCSR_FEIE. */
286 #define BF_I2S_TCSR_FEIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FEIE) & BM_I2S_TCSR_FEIE)
288 /*! @brief Set the FEIE field to a new value. */
289 #define BW_I2S_TCSR_FEIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEIE) = (v))
293 * @name Register I2S_TCSR, field SEIE[11] (RW)
295 * Enables/disables sync error interrupts.
298 * - 0 - Disables interrupt.
299 * - 1 - Enables interrupt.
302 #define BP_I2S_TCSR_SEIE (11U) /*!< Bit position for I2S_TCSR_SEIE. */
303 #define BM_I2S_TCSR_SEIE (0x00000800U) /*!< Bit mask for I2S_TCSR_SEIE. */
304 #define BS_I2S_TCSR_SEIE (1U) /*!< Bit field size in bits for I2S_TCSR_SEIE. */
306 /*! @brief Read current value of the I2S_TCSR_SEIE field. */
307 #define BR_I2S_TCSR_SEIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEIE))
309 /*! @brief Format value for bitfield I2S_TCSR_SEIE. */
310 #define BF_I2S_TCSR_SEIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_SEIE) & BM_I2S_TCSR_SEIE)
312 /*! @brief Set the SEIE field to a new value. */
313 #define BW_I2S_TCSR_SEIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEIE) = (v))
317 * @name Register I2S_TCSR, field WSIE[12] (RW)
319 * Enables/disables word start interrupts.
322 * - 0 - Disables interrupt.
323 * - 1 - Enables interrupt.
326 #define BP_I2S_TCSR_WSIE (12U) /*!< Bit position for I2S_TCSR_WSIE. */
327 #define BM_I2S_TCSR_WSIE (0x00001000U) /*!< Bit mask for I2S_TCSR_WSIE. */
328 #define BS_I2S_TCSR_WSIE (1U) /*!< Bit field size in bits for I2S_TCSR_WSIE. */
330 /*! @brief Read current value of the I2S_TCSR_WSIE field. */
331 #define BR_I2S_TCSR_WSIE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSIE))
333 /*! @brief Format value for bitfield I2S_TCSR_WSIE. */
334 #define BF_I2S_TCSR_WSIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_WSIE) & BM_I2S_TCSR_WSIE)
336 /*! @brief Set the WSIE field to a new value. */
337 #define BW_I2S_TCSR_WSIE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSIE) = (v))
341 * @name Register I2S_TCSR, field FRF[16] (RO)
343 * Indicates that the number of words in an enabled transmit channel FIFO is
344 * less than or equal to the transmit FIFO watermark.
347 * - 0 - Transmit FIFO watermark has not been reached.
348 * - 1 - Transmit FIFO watermark has been reached.
351 #define BP_I2S_TCSR_FRF (16U) /*!< Bit position for I2S_TCSR_FRF. */
352 #define BM_I2S_TCSR_FRF (0x00010000U) /*!< Bit mask for I2S_TCSR_FRF. */
353 #define BS_I2S_TCSR_FRF (1U) /*!< Bit field size in bits for I2S_TCSR_FRF. */
355 /*! @brief Read current value of the I2S_TCSR_FRF field. */
356 #define BR_I2S_TCSR_FRF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FRF))
360 * @name Register I2S_TCSR, field FWF[17] (RO)
362 * Indicates that an enabled transmit FIFO is empty.
365 * - 0 - No enabled transmit FIFO is empty.
366 * - 1 - Enabled transmit FIFO is empty.
369 #define BP_I2S_TCSR_FWF (17U) /*!< Bit position for I2S_TCSR_FWF. */
370 #define BM_I2S_TCSR_FWF (0x00020000U) /*!< Bit mask for I2S_TCSR_FWF. */
371 #define BS_I2S_TCSR_FWF (1U) /*!< Bit field size in bits for I2S_TCSR_FWF. */
373 /*! @brief Read current value of the I2S_TCSR_FWF field. */
374 #define BR_I2S_TCSR_FWF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FWF))
378 * @name Register I2S_TCSR, field FEF[18] (W1C)
380 * Indicates that an enabled transmit FIFO has underrun. Write a logic 1 to this
381 * field to clear this flag.
384 * - 0 - Transmit underrun not detected.
385 * - 1 - Transmit underrun detected.
388 #define BP_I2S_TCSR_FEF (18U) /*!< Bit position for I2S_TCSR_FEF. */
389 #define BM_I2S_TCSR_FEF (0x00040000U) /*!< Bit mask for I2S_TCSR_FEF. */
390 #define BS_I2S_TCSR_FEF (1U) /*!< Bit field size in bits for I2S_TCSR_FEF. */
392 /*! @brief Read current value of the I2S_TCSR_FEF field. */
393 #define BR_I2S_TCSR_FEF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEF))
395 /*! @brief Format value for bitfield I2S_TCSR_FEF. */
396 #define BF_I2S_TCSR_FEF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FEF) & BM_I2S_TCSR_FEF)
398 /*! @brief Set the FEF field to a new value. */
399 #define BW_I2S_TCSR_FEF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FEF) = (v))
403 * @name Register I2S_TCSR, field SEF[19] (W1C)
405 * Indicates that an error in the externally-generated frame sync has been
406 * detected. Write a logic 1 to this field to clear this flag.
409 * - 0 - Sync error not detected.
410 * - 1 - Frame sync error detected.
413 #define BP_I2S_TCSR_SEF (19U) /*!< Bit position for I2S_TCSR_SEF. */
414 #define BM_I2S_TCSR_SEF (0x00080000U) /*!< Bit mask for I2S_TCSR_SEF. */
415 #define BS_I2S_TCSR_SEF (1U) /*!< Bit field size in bits for I2S_TCSR_SEF. */
417 /*! @brief Read current value of the I2S_TCSR_SEF field. */
418 #define BR_I2S_TCSR_SEF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEF))
420 /*! @brief Format value for bitfield I2S_TCSR_SEF. */
421 #define BF_I2S_TCSR_SEF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_SEF) & BM_I2S_TCSR_SEF)
423 /*! @brief Set the SEF field to a new value. */
424 #define BW_I2S_TCSR_SEF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SEF) = (v))
428 * @name Register I2S_TCSR, field WSF[20] (W1C)
430 * Indicates that the start of the configured word has been detected. Write a
431 * logic 1 to this field to clear this flag.
434 * - 0 - Start of word not detected.
435 * - 1 - Start of word detected.
438 #define BP_I2S_TCSR_WSF (20U) /*!< Bit position for I2S_TCSR_WSF. */
439 #define BM_I2S_TCSR_WSF (0x00100000U) /*!< Bit mask for I2S_TCSR_WSF. */
440 #define BS_I2S_TCSR_WSF (1U) /*!< Bit field size in bits for I2S_TCSR_WSF. */
442 /*! @brief Read current value of the I2S_TCSR_WSF field. */
443 #define BR_I2S_TCSR_WSF(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSF))
445 /*! @brief Format value for bitfield I2S_TCSR_WSF. */
446 #define BF_I2S_TCSR_WSF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_WSF) & BM_I2S_TCSR_WSF)
448 /*! @brief Set the WSF field to a new value. */
449 #define BW_I2S_TCSR_WSF(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_WSF) = (v))
453 * @name Register I2S_TCSR, field SR[24] (RW)
455 * When set, resets the internal transmitter logic including the FIFO pointers.
456 * Software-visible registers are not affected, except for the status registers.
460 * - 1 - Software reset.
463 #define BP_I2S_TCSR_SR (24U) /*!< Bit position for I2S_TCSR_SR. */
464 #define BM_I2S_TCSR_SR (0x01000000U) /*!< Bit mask for I2S_TCSR_SR. */
465 #define BS_I2S_TCSR_SR (1U) /*!< Bit field size in bits for I2S_TCSR_SR. */
467 /*! @brief Read current value of the I2S_TCSR_SR field. */
468 #define BR_I2S_TCSR_SR(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SR))
470 /*! @brief Format value for bitfield I2S_TCSR_SR. */
471 #define BF_I2S_TCSR_SR(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_SR) & BM_I2S_TCSR_SR)
473 /*! @brief Set the SR field to a new value. */
474 #define BW_I2S_TCSR_SR(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_SR) = (v))
478 * @name Register I2S_TCSR, field FR[25] (WORZ)
480 * Resets the FIFO pointers. Reading this field will always return zero. FIFO
481 * pointers should only be reset when the transmitter is disabled or the FIFO error
489 #define BP_I2S_TCSR_FR (25U) /*!< Bit position for I2S_TCSR_FR. */
490 #define BM_I2S_TCSR_FR (0x02000000U) /*!< Bit mask for I2S_TCSR_FR. */
491 #define BS_I2S_TCSR_FR (1U) /*!< Bit field size in bits for I2S_TCSR_FR. */
493 /*! @brief Format value for bitfield I2S_TCSR_FR. */
494 #define BF_I2S_TCSR_FR(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_FR) & BM_I2S_TCSR_FR)
496 /*! @brief Set the FR field to a new value. */
497 #define BW_I2S_TCSR_FR(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_FR) = (v))
501 * @name Register I2S_TCSR, field BCE[28] (RW)
503 * Enables the transmit bit clock, separately from the TE. This field is
504 * automatically set whenever TE is set. When software clears this field, the transmit
505 * bit clock remains enabled, and this bit remains set, until the end of the
509 * - 0 - Transmit bit clock is disabled.
510 * - 1 - Transmit bit clock is enabled.
513 #define BP_I2S_TCSR_BCE (28U) /*!< Bit position for I2S_TCSR_BCE. */
514 #define BM_I2S_TCSR_BCE (0x10000000U) /*!< Bit mask for I2S_TCSR_BCE. */
515 #define BS_I2S_TCSR_BCE (1U) /*!< Bit field size in bits for I2S_TCSR_BCE. */
517 /*! @brief Read current value of the I2S_TCSR_BCE field. */
518 #define BR_I2S_TCSR_BCE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_BCE))
520 /*! @brief Format value for bitfield I2S_TCSR_BCE. */
521 #define BF_I2S_TCSR_BCE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_BCE) & BM_I2S_TCSR_BCE)
523 /*! @brief Set the BCE field to a new value. */
524 #define BW_I2S_TCSR_BCE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_BCE) = (v))
528 * @name Register I2S_TCSR, field DBGE[29] (RW)
530 * Enables/disables transmitter operation in Debug mode. The transmit bit clock
531 * is not affected by debug mode.
534 * - 0 - Transmitter is disabled in Debug mode, after completing the current
536 * - 1 - Transmitter is enabled in Debug mode.
539 #define BP_I2S_TCSR_DBGE (29U) /*!< Bit position for I2S_TCSR_DBGE. */
540 #define BM_I2S_TCSR_DBGE (0x20000000U) /*!< Bit mask for I2S_TCSR_DBGE. */
541 #define BS_I2S_TCSR_DBGE (1U) /*!< Bit field size in bits for I2S_TCSR_DBGE. */
543 /*! @brief Read current value of the I2S_TCSR_DBGE field. */
544 #define BR_I2S_TCSR_DBGE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_DBGE))
546 /*! @brief Format value for bitfield I2S_TCSR_DBGE. */
547 #define BF_I2S_TCSR_DBGE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_DBGE) & BM_I2S_TCSR_DBGE)
549 /*! @brief Set the DBGE field to a new value. */
550 #define BW_I2S_TCSR_DBGE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_DBGE) = (v))
554 * @name Register I2S_TCSR, field STOPE[30] (RW)
556 * Configures transmitter operation in Stop mode. This field is ignored and the
557 * transmitter is disabled in all low-leakage stop modes.
560 * - 0 - Transmitter disabled in Stop mode.
561 * - 1 - Transmitter enabled in Stop mode.
564 #define BP_I2S_TCSR_STOPE (30U) /*!< Bit position for I2S_TCSR_STOPE. */
565 #define BM_I2S_TCSR_STOPE (0x40000000U) /*!< Bit mask for I2S_TCSR_STOPE. */
566 #define BS_I2S_TCSR_STOPE (1U) /*!< Bit field size in bits for I2S_TCSR_STOPE. */
568 /*! @brief Read current value of the I2S_TCSR_STOPE field. */
569 #define BR_I2S_TCSR_STOPE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_STOPE))
571 /*! @brief Format value for bitfield I2S_TCSR_STOPE. */
572 #define BF_I2S_TCSR_STOPE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_STOPE) & BM_I2S_TCSR_STOPE)
574 /*! @brief Set the STOPE field to a new value. */
575 #define BW_I2S_TCSR_STOPE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_STOPE) = (v))
579 * @name Register I2S_TCSR, field TE[31] (RW)
581 * Enables/disables the transmitter. When software clears this field, the
582 * transmitter remains enabled, and this bit remains set, until the end of the current
586 * - 0 - Transmitter is disabled.
587 * - 1 - Transmitter is enabled, or transmitter has been disabled and has not
588 * yet reached end of frame.
591 #define BP_I2S_TCSR_TE (31U) /*!< Bit position for I2S_TCSR_TE. */
592 #define BM_I2S_TCSR_TE (0x80000000U) /*!< Bit mask for I2S_TCSR_TE. */
593 #define BS_I2S_TCSR_TE (1U) /*!< Bit field size in bits for I2S_TCSR_TE. */
595 /*! @brief Read current value of the I2S_TCSR_TE field. */
596 #define BR_I2S_TCSR_TE(x) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_TE))
598 /*! @brief Format value for bitfield I2S_TCSR_TE. */
599 #define BF_I2S_TCSR_TE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCSR_TE) & BM_I2S_TCSR_TE)
601 /*! @brief Set the TE field to a new value. */
602 #define BW_I2S_TCSR_TE(x, v) (BITBAND_ACCESS32(HW_I2S_TCSR_ADDR(x), BP_I2S_TCSR_TE) = (v))
605 /*******************************************************************************
606 * HW_I2S_TCR1 - SAI Transmit Configuration 1 Register
607 ******************************************************************************/
610 * @brief HW_I2S_TCR1 - SAI Transmit Configuration 1 Register (RW)
612 * Reset value: 0x00000000U
614 typedef union _hw_i2s_tcr1
617 struct _hw_i2s_tcr1_bitfields
619 uint32_t TFW
: 3; /*!< [2:0] Transmit FIFO Watermark */
620 uint32_t RESERVED0
: 29; /*!< [31:3] */
625 * @name Constants and macros for entire I2S_TCR1 register
628 #define HW_I2S_TCR1_ADDR(x) ((x) + 0x4U)
630 #define HW_I2S_TCR1(x) (*(__IO hw_i2s_tcr1_t *) HW_I2S_TCR1_ADDR(x))
631 #define HW_I2S_TCR1_RD(x) (HW_I2S_TCR1(x).U)
632 #define HW_I2S_TCR1_WR(x, v) (HW_I2S_TCR1(x).U = (v))
633 #define HW_I2S_TCR1_SET(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) | (v)))
634 #define HW_I2S_TCR1_CLR(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) & ~(v)))
635 #define HW_I2S_TCR1_TOG(x, v) (HW_I2S_TCR1_WR(x, HW_I2S_TCR1_RD(x) ^ (v)))
639 * Constants & macros for individual I2S_TCR1 bitfields
643 * @name Register I2S_TCR1, field TFW[2:0] (RW)
645 * Configures the watermark level for all enabled transmit channels.
648 #define BP_I2S_TCR1_TFW (0U) /*!< Bit position for I2S_TCR1_TFW. */
649 #define BM_I2S_TCR1_TFW (0x00000007U) /*!< Bit mask for I2S_TCR1_TFW. */
650 #define BS_I2S_TCR1_TFW (3U) /*!< Bit field size in bits for I2S_TCR1_TFW. */
652 /*! @brief Read current value of the I2S_TCR1_TFW field. */
653 #define BR_I2S_TCR1_TFW(x) (HW_I2S_TCR1(x).B.TFW)
655 /*! @brief Format value for bitfield I2S_TCR1_TFW. */
656 #define BF_I2S_TCR1_TFW(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR1_TFW) & BM_I2S_TCR1_TFW)
658 /*! @brief Set the TFW field to a new value. */
659 #define BW_I2S_TCR1_TFW(x, v) (HW_I2S_TCR1_WR(x, (HW_I2S_TCR1_RD(x) & ~BM_I2S_TCR1_TFW) | BF_I2S_TCR1_TFW(v)))
662 /*******************************************************************************
663 * HW_I2S_TCR2 - SAI Transmit Configuration 2 Register
664 ******************************************************************************/
667 * @brief HW_I2S_TCR2 - SAI Transmit Configuration 2 Register (RW)
669 * Reset value: 0x00000000U
671 * This register must not be altered when TCSR[TE] is set.
673 typedef union _hw_i2s_tcr2
676 struct _hw_i2s_tcr2_bitfields
678 uint32_t DIV
: 8; /*!< [7:0] Bit Clock Divide */
679 uint32_t RESERVED0
: 16; /*!< [23:8] */
680 uint32_t BCD
: 1; /*!< [24] Bit Clock Direction */
681 uint32_t BCP
: 1; /*!< [25] Bit Clock Polarity */
682 uint32_t MSEL
: 2; /*!< [27:26] MCLK Select */
683 uint32_t BCI
: 1; /*!< [28] Bit Clock Input */
684 uint32_t BCS
: 1; /*!< [29] Bit Clock Swap */
685 uint32_t SYNC
: 2; /*!< [31:30] Synchronous Mode */
690 * @name Constants and macros for entire I2S_TCR2 register
693 #define HW_I2S_TCR2_ADDR(x) ((x) + 0x8U)
695 #define HW_I2S_TCR2(x) (*(__IO hw_i2s_tcr2_t *) HW_I2S_TCR2_ADDR(x))
696 #define HW_I2S_TCR2_RD(x) (HW_I2S_TCR2(x).U)
697 #define HW_I2S_TCR2_WR(x, v) (HW_I2S_TCR2(x).U = (v))
698 #define HW_I2S_TCR2_SET(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) | (v)))
699 #define HW_I2S_TCR2_CLR(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) & ~(v)))
700 #define HW_I2S_TCR2_TOG(x, v) (HW_I2S_TCR2_WR(x, HW_I2S_TCR2_RD(x) ^ (v)))
704 * Constants & macros for individual I2S_TCR2 bitfields
708 * @name Register I2S_TCR2, field DIV[7:0] (RW)
710 * Divides down the audio master clock to generate the bit clock when configured
711 * for an internal bit clock. The division value is (DIV + 1) * 2.
714 #define BP_I2S_TCR2_DIV (0U) /*!< Bit position for I2S_TCR2_DIV. */
715 #define BM_I2S_TCR2_DIV (0x000000FFU) /*!< Bit mask for I2S_TCR2_DIV. */
716 #define BS_I2S_TCR2_DIV (8U) /*!< Bit field size in bits for I2S_TCR2_DIV. */
718 /*! @brief Read current value of the I2S_TCR2_DIV field. */
719 #define BR_I2S_TCR2_DIV(x) (HW_I2S_TCR2(x).B.DIV)
721 /*! @brief Format value for bitfield I2S_TCR2_DIV. */
722 #define BF_I2S_TCR2_DIV(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_DIV) & BM_I2S_TCR2_DIV)
724 /*! @brief Set the DIV field to a new value. */
725 #define BW_I2S_TCR2_DIV(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_DIV) | BF_I2S_TCR2_DIV(v)))
729 * @name Register I2S_TCR2, field BCD[24] (RW)
731 * Configures the direction of the bit clock.
734 * - 0 - Bit clock is generated externally in Slave mode.
735 * - 1 - Bit clock is generated internally in Master mode.
738 #define BP_I2S_TCR2_BCD (24U) /*!< Bit position for I2S_TCR2_BCD. */
739 #define BM_I2S_TCR2_BCD (0x01000000U) /*!< Bit mask for I2S_TCR2_BCD. */
740 #define BS_I2S_TCR2_BCD (1U) /*!< Bit field size in bits for I2S_TCR2_BCD. */
742 /*! @brief Read current value of the I2S_TCR2_BCD field. */
743 #define BR_I2S_TCR2_BCD(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCD))
745 /*! @brief Format value for bitfield I2S_TCR2_BCD. */
746 #define BF_I2S_TCR2_BCD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_BCD) & BM_I2S_TCR2_BCD)
748 /*! @brief Set the BCD field to a new value. */
749 #define BW_I2S_TCR2_BCD(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCD) = (v))
753 * @name Register I2S_TCR2, field BCP[25] (RW)
755 * Configures the polarity of the bit clock.
758 * - 0 - Bit clock is active high with drive outputs on rising edge and sample
759 * inputs on falling edge.
760 * - 1 - Bit clock is active low with drive outputs on falling edge and sample
761 * inputs on rising edge.
764 #define BP_I2S_TCR2_BCP (25U) /*!< Bit position for I2S_TCR2_BCP. */
765 #define BM_I2S_TCR2_BCP (0x02000000U) /*!< Bit mask for I2S_TCR2_BCP. */
766 #define BS_I2S_TCR2_BCP (1U) /*!< Bit field size in bits for I2S_TCR2_BCP. */
768 /*! @brief Read current value of the I2S_TCR2_BCP field. */
769 #define BR_I2S_TCR2_BCP(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCP))
771 /*! @brief Format value for bitfield I2S_TCR2_BCP. */
772 #define BF_I2S_TCR2_BCP(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_BCP) & BM_I2S_TCR2_BCP)
774 /*! @brief Set the BCP field to a new value. */
775 #define BW_I2S_TCR2_BCP(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCP) = (v))
779 * @name Register I2S_TCR2, field MSEL[27:26] (RW)
781 * Selects the audio Master Clock option used to generate an internally
782 * generated bit clock. This field has no effect when configured for an externally
783 * generated bit clock. Depending on the device, some Master Clock options might not be
784 * available. See the chip configuration details for the availability and
785 * chip-specific meaning of each option.
788 * - 00 - Bus Clock selected.
789 * - 01 - Master Clock (MCLK) 1 option selected.
790 * - 10 - Master Clock (MCLK) 2 option selected.
791 * - 11 - Master Clock (MCLK) 3 option selected.
794 #define BP_I2S_TCR2_MSEL (26U) /*!< Bit position for I2S_TCR2_MSEL. */
795 #define BM_I2S_TCR2_MSEL (0x0C000000U) /*!< Bit mask for I2S_TCR2_MSEL. */
796 #define BS_I2S_TCR2_MSEL (2U) /*!< Bit field size in bits for I2S_TCR2_MSEL. */
798 /*! @brief Read current value of the I2S_TCR2_MSEL field. */
799 #define BR_I2S_TCR2_MSEL(x) (HW_I2S_TCR2(x).B.MSEL)
801 /*! @brief Format value for bitfield I2S_TCR2_MSEL. */
802 #define BF_I2S_TCR2_MSEL(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_MSEL) & BM_I2S_TCR2_MSEL)
804 /*! @brief Set the MSEL field to a new value. */
805 #define BW_I2S_TCR2_MSEL(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_MSEL) | BF_I2S_TCR2_MSEL(v)))
809 * @name Register I2S_TCR2, field BCI[28] (RW)
811 * When this field is set and using an internally generated bit clock in either
812 * synchronous or asynchronous mode, the bit clock actually used by the
813 * transmitter is delayed by the pad output delay (the transmitter is clocked by the pad
814 * input as if the clock was externally generated). This has the effect of
815 * decreasing the data input setup time, but increasing the data output valid time. The
816 * slave mode timing from the datasheet should be used for the transmitter when
817 * this bit is set. In synchronous mode, this bit allows the transmitter to use
818 * the slave mode timing from the datasheet, while the receiver uses the master
819 * mode timing. This field has no effect when configured for an externally generated
824 * - 1 - Internal logic is clocked as if bit clock was externally generated.
827 #define BP_I2S_TCR2_BCI (28U) /*!< Bit position for I2S_TCR2_BCI. */
828 #define BM_I2S_TCR2_BCI (0x10000000U) /*!< Bit mask for I2S_TCR2_BCI. */
829 #define BS_I2S_TCR2_BCI (1U) /*!< Bit field size in bits for I2S_TCR2_BCI. */
831 /*! @brief Read current value of the I2S_TCR2_BCI field. */
832 #define BR_I2S_TCR2_BCI(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCI))
834 /*! @brief Format value for bitfield I2S_TCR2_BCI. */
835 #define BF_I2S_TCR2_BCI(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_BCI) & BM_I2S_TCR2_BCI)
837 /*! @brief Set the BCI field to a new value. */
838 #define BW_I2S_TCR2_BCI(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCI) = (v))
842 * @name Register I2S_TCR2, field BCS[29] (RW)
844 * This field swaps the bit clock used by the transmitter. When the transmitter
845 * is configured in asynchronous mode and this bit is set, the transmitter is
846 * clocked by the receiver bit clock (SAI_RX_BCLK). This allows the transmitter and
847 * receiver to share the same bit clock, but the transmitter continues to use the
848 * transmit frame sync (SAI_TX_SYNC). When the transmitter is configured in
849 * synchronous mode, the transmitter BCS field and receiver BCS field must be set to
850 * the same value. When both are set, the transmitter and receiver are both
851 * clocked by the transmitter bit clock (SAI_TX_BCLK) but use the receiver frame sync
855 * - 0 - Use the normal bit clock source.
856 * - 1 - Swap the bit clock source.
859 #define BP_I2S_TCR2_BCS (29U) /*!< Bit position for I2S_TCR2_BCS. */
860 #define BM_I2S_TCR2_BCS (0x20000000U) /*!< Bit mask for I2S_TCR2_BCS. */
861 #define BS_I2S_TCR2_BCS (1U) /*!< Bit field size in bits for I2S_TCR2_BCS. */
863 /*! @brief Read current value of the I2S_TCR2_BCS field. */
864 #define BR_I2S_TCR2_BCS(x) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCS))
866 /*! @brief Format value for bitfield I2S_TCR2_BCS. */
867 #define BF_I2S_TCR2_BCS(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_BCS) & BM_I2S_TCR2_BCS)
869 /*! @brief Set the BCS field to a new value. */
870 #define BW_I2S_TCR2_BCS(x, v) (BITBAND_ACCESS32(HW_I2S_TCR2_ADDR(x), BP_I2S_TCR2_BCS) = (v))
874 * @name Register I2S_TCR2, field SYNC[31:30] (RW)
876 * Configures between asynchronous and synchronous modes of operation. When
877 * configured for a synchronous mode of operation, the receiver must be configured
878 * for asynchronous operation.
881 * - 00 - Asynchronous mode.
882 * - 01 - Synchronous with receiver.
883 * - 10 - Synchronous with another SAI transmitter.
884 * - 11 - Synchronous with another SAI receiver.
887 #define BP_I2S_TCR2_SYNC (30U) /*!< Bit position for I2S_TCR2_SYNC. */
888 #define BM_I2S_TCR2_SYNC (0xC0000000U) /*!< Bit mask for I2S_TCR2_SYNC. */
889 #define BS_I2S_TCR2_SYNC (2U) /*!< Bit field size in bits for I2S_TCR2_SYNC. */
891 /*! @brief Read current value of the I2S_TCR2_SYNC field. */
892 #define BR_I2S_TCR2_SYNC(x) (HW_I2S_TCR2(x).B.SYNC)
894 /*! @brief Format value for bitfield I2S_TCR2_SYNC. */
895 #define BF_I2S_TCR2_SYNC(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR2_SYNC) & BM_I2S_TCR2_SYNC)
897 /*! @brief Set the SYNC field to a new value. */
898 #define BW_I2S_TCR2_SYNC(x, v) (HW_I2S_TCR2_WR(x, (HW_I2S_TCR2_RD(x) & ~BM_I2S_TCR2_SYNC) | BF_I2S_TCR2_SYNC(v)))
901 /*******************************************************************************
902 * HW_I2S_TCR3 - SAI Transmit Configuration 3 Register
903 ******************************************************************************/
906 * @brief HW_I2S_TCR3 - SAI Transmit Configuration 3 Register (RW)
908 * Reset value: 0x00000000U
910 typedef union _hw_i2s_tcr3
913 struct _hw_i2s_tcr3_bitfields
915 uint32_t WDFL
: 4; /*!< [3:0] Word Flag Configuration */
916 uint32_t RESERVED0
: 12; /*!< [15:4] */
917 uint32_t TCE
: 1; /*!< [16] Transmit Channel Enable */
918 uint32_t RESERVED1
: 15; /*!< [31:17] */
923 * @name Constants and macros for entire I2S_TCR3 register
926 #define HW_I2S_TCR3_ADDR(x) ((x) + 0xCU)
928 #define HW_I2S_TCR3(x) (*(__IO hw_i2s_tcr3_t *) HW_I2S_TCR3_ADDR(x))
929 #define HW_I2S_TCR3_RD(x) (HW_I2S_TCR3(x).U)
930 #define HW_I2S_TCR3_WR(x, v) (HW_I2S_TCR3(x).U = (v))
931 #define HW_I2S_TCR3_SET(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) | (v)))
932 #define HW_I2S_TCR3_CLR(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) & ~(v)))
933 #define HW_I2S_TCR3_TOG(x, v) (HW_I2S_TCR3_WR(x, HW_I2S_TCR3_RD(x) ^ (v)))
937 * Constants & macros for individual I2S_TCR3 bitfields
941 * @name Register I2S_TCR3, field WDFL[3:0] (RW)
943 * Configures which word sets the start of word flag. The value written must be
944 * one less than the word number. For example, writing 0 configures the first
945 * word in the frame. When configured to a value greater than TCR4[FRSZ], then the
946 * start of word flag is never set.
949 #define BP_I2S_TCR3_WDFL (0U) /*!< Bit position for I2S_TCR3_WDFL. */
950 #define BM_I2S_TCR3_WDFL (0x0000000FU) /*!< Bit mask for I2S_TCR3_WDFL. */
951 #define BS_I2S_TCR3_WDFL (4U) /*!< Bit field size in bits for I2S_TCR3_WDFL. */
953 /*! @brief Read current value of the I2S_TCR3_WDFL field. */
954 #define BR_I2S_TCR3_WDFL(x) (HW_I2S_TCR3(x).B.WDFL)
956 /*! @brief Format value for bitfield I2S_TCR3_WDFL. */
957 #define BF_I2S_TCR3_WDFL(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR3_WDFL) & BM_I2S_TCR3_WDFL)
959 /*! @brief Set the WDFL field to a new value. */
960 #define BW_I2S_TCR3_WDFL(x, v) (HW_I2S_TCR3_WR(x, (HW_I2S_TCR3_RD(x) & ~BM_I2S_TCR3_WDFL) | BF_I2S_TCR3_WDFL(v)))
964 * @name Register I2S_TCR3, field TCE[16] (RW)
966 * Enables the corresponding data channel for transmit operation. A channel must
967 * be enabled before its FIFO is accessed. Changing this field will take effect
968 * immediately for generating the FIFO request and warning flags, but at the end
969 * of each frame for transmit operation.
972 * - 0 - Transmit data channel N is disabled.
973 * - 1 - Transmit data channel N is enabled.
976 #define BP_I2S_TCR3_TCE (16U) /*!< Bit position for I2S_TCR3_TCE. */
977 #define BM_I2S_TCR3_TCE (0x00010000U) /*!< Bit mask for I2S_TCR3_TCE. */
978 #define BS_I2S_TCR3_TCE (1U) /*!< Bit field size in bits for I2S_TCR3_TCE. */
980 /*! @brief Read current value of the I2S_TCR3_TCE field. */
981 #define BR_I2S_TCR3_TCE(x) (BITBAND_ACCESS32(HW_I2S_TCR3_ADDR(x), BP_I2S_TCR3_TCE))
983 /*! @brief Format value for bitfield I2S_TCR3_TCE. */
984 #define BF_I2S_TCR3_TCE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR3_TCE) & BM_I2S_TCR3_TCE)
986 /*! @brief Set the TCE field to a new value. */
987 #define BW_I2S_TCR3_TCE(x, v) (BITBAND_ACCESS32(HW_I2S_TCR3_ADDR(x), BP_I2S_TCR3_TCE) = (v))
990 /*******************************************************************************
991 * HW_I2S_TCR4 - SAI Transmit Configuration 4 Register
992 ******************************************************************************/
995 * @brief HW_I2S_TCR4 - SAI Transmit Configuration 4 Register (RW)
997 * Reset value: 0x00000000U
999 * This register must not be altered when TCSR[TE] is set.
1001 typedef union _hw_i2s_tcr4
1004 struct _hw_i2s_tcr4_bitfields
1006 uint32_t FSD
: 1; /*!< [0] Frame Sync Direction */
1007 uint32_t FSP
: 1; /*!< [1] Frame Sync Polarity */
1008 uint32_t ONDEM
: 1; /*!< [2] On Demand Mode */
1009 uint32_t FSE
: 1; /*!< [3] Frame Sync Early */
1010 uint32_t MF
: 1; /*!< [4] MSB First */
1011 uint32_t RESERVED0
: 3; /*!< [7:5] */
1012 uint32_t SYWD
: 5; /*!< [12:8] Sync Width */
1013 uint32_t RESERVED1
: 3; /*!< [15:13] */
1014 uint32_t FRSZ
: 4; /*!< [19:16] Frame size */
1015 uint32_t RESERVED2
: 4; /*!< [23:20] */
1016 uint32_t FPACK
: 2; /*!< [25:24] FIFO Packing Mode */
1017 uint32_t RESERVED3
: 2; /*!< [27:26] */
1018 uint32_t FCONT
: 1; /*!< [28] FIFO Continue on Error */
1019 uint32_t RESERVED4
: 3; /*!< [31:29] */
1024 * @name Constants and macros for entire I2S_TCR4 register
1027 #define HW_I2S_TCR4_ADDR(x) ((x) + 0x10U)
1029 #define HW_I2S_TCR4(x) (*(__IO hw_i2s_tcr4_t *) HW_I2S_TCR4_ADDR(x))
1030 #define HW_I2S_TCR4_RD(x) (HW_I2S_TCR4(x).U)
1031 #define HW_I2S_TCR4_WR(x, v) (HW_I2S_TCR4(x).U = (v))
1032 #define HW_I2S_TCR4_SET(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) | (v)))
1033 #define HW_I2S_TCR4_CLR(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) & ~(v)))
1034 #define HW_I2S_TCR4_TOG(x, v) (HW_I2S_TCR4_WR(x, HW_I2S_TCR4_RD(x) ^ (v)))
1038 * Constants & macros for individual I2S_TCR4 bitfields
1042 * @name Register I2S_TCR4, field FSD[0] (RW)
1044 * Configures the direction of the frame sync.
1047 * - 0 - Frame sync is generated externally in Slave mode.
1048 * - 1 - Frame sync is generated internally in Master mode.
1051 #define BP_I2S_TCR4_FSD (0U) /*!< Bit position for I2S_TCR4_FSD. */
1052 #define BM_I2S_TCR4_FSD (0x00000001U) /*!< Bit mask for I2S_TCR4_FSD. */
1053 #define BS_I2S_TCR4_FSD (1U) /*!< Bit field size in bits for I2S_TCR4_FSD. */
1055 /*! @brief Read current value of the I2S_TCR4_FSD field. */
1056 #define BR_I2S_TCR4_FSD(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSD))
1058 /*! @brief Format value for bitfield I2S_TCR4_FSD. */
1059 #define BF_I2S_TCR4_FSD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FSD) & BM_I2S_TCR4_FSD)
1061 /*! @brief Set the FSD field to a new value. */
1062 #define BW_I2S_TCR4_FSD(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSD) = (v))
1066 * @name Register I2S_TCR4, field FSP[1] (RW)
1068 * Configures the polarity of the frame sync.
1071 * - 0 - Frame sync is active high.
1072 * - 1 - Frame sync is active low.
1075 #define BP_I2S_TCR4_FSP (1U) /*!< Bit position for I2S_TCR4_FSP. */
1076 #define BM_I2S_TCR4_FSP (0x00000002U) /*!< Bit mask for I2S_TCR4_FSP. */
1077 #define BS_I2S_TCR4_FSP (1U) /*!< Bit field size in bits for I2S_TCR4_FSP. */
1079 /*! @brief Read current value of the I2S_TCR4_FSP field. */
1080 #define BR_I2S_TCR4_FSP(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSP))
1082 /*! @brief Format value for bitfield I2S_TCR4_FSP. */
1083 #define BF_I2S_TCR4_FSP(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FSP) & BM_I2S_TCR4_FSP)
1085 /*! @brief Set the FSP field to a new value. */
1086 #define BW_I2S_TCR4_FSP(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSP) = (v))
1090 * @name Register I2S_TCR4, field ONDEM[2] (RW)
1092 * When set, and the frame sync is generated internally, a frame sync is only
1093 * generated when the FIFO warning flag is clear.
1096 * - 0 - Internal frame sync is generated continuously.
1097 * - 1 - Internal frame sync is generated when the FIFO warning flag is clear.
1100 #define BP_I2S_TCR4_ONDEM (2U) /*!< Bit position for I2S_TCR4_ONDEM. */
1101 #define BM_I2S_TCR4_ONDEM (0x00000004U) /*!< Bit mask for I2S_TCR4_ONDEM. */
1102 #define BS_I2S_TCR4_ONDEM (1U) /*!< Bit field size in bits for I2S_TCR4_ONDEM. */
1104 /*! @brief Read current value of the I2S_TCR4_ONDEM field. */
1105 #define BR_I2S_TCR4_ONDEM(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_ONDEM))
1107 /*! @brief Format value for bitfield I2S_TCR4_ONDEM. */
1108 #define BF_I2S_TCR4_ONDEM(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_ONDEM) & BM_I2S_TCR4_ONDEM)
1110 /*! @brief Set the ONDEM field to a new value. */
1111 #define BW_I2S_TCR4_ONDEM(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_ONDEM) = (v))
1115 * @name Register I2S_TCR4, field FSE[3] (RW)
1118 * - 0 - Frame sync asserts with the first bit of the frame.
1119 * - 1 - Frame sync asserts one bit before the first bit of the frame.
1122 #define BP_I2S_TCR4_FSE (3U) /*!< Bit position for I2S_TCR4_FSE. */
1123 #define BM_I2S_TCR4_FSE (0x00000008U) /*!< Bit mask for I2S_TCR4_FSE. */
1124 #define BS_I2S_TCR4_FSE (1U) /*!< Bit field size in bits for I2S_TCR4_FSE. */
1126 /*! @brief Read current value of the I2S_TCR4_FSE field. */
1127 #define BR_I2S_TCR4_FSE(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSE))
1129 /*! @brief Format value for bitfield I2S_TCR4_FSE. */
1130 #define BF_I2S_TCR4_FSE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FSE) & BM_I2S_TCR4_FSE)
1132 /*! @brief Set the FSE field to a new value. */
1133 #define BW_I2S_TCR4_FSE(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FSE) = (v))
1137 * @name Register I2S_TCR4, field MF[4] (RW)
1139 * Configures whether the LSB or the MSB is transmitted first.
1142 * - 0 - LSB is transmitted first.
1143 * - 1 - MSB is transmitted first.
1146 #define BP_I2S_TCR4_MF (4U) /*!< Bit position for I2S_TCR4_MF. */
1147 #define BM_I2S_TCR4_MF (0x00000010U) /*!< Bit mask for I2S_TCR4_MF. */
1148 #define BS_I2S_TCR4_MF (1U) /*!< Bit field size in bits for I2S_TCR4_MF. */
1150 /*! @brief Read current value of the I2S_TCR4_MF field. */
1151 #define BR_I2S_TCR4_MF(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_MF))
1153 /*! @brief Format value for bitfield I2S_TCR4_MF. */
1154 #define BF_I2S_TCR4_MF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_MF) & BM_I2S_TCR4_MF)
1156 /*! @brief Set the MF field to a new value. */
1157 #define BW_I2S_TCR4_MF(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_MF) = (v))
1161 * @name Register I2S_TCR4, field SYWD[12:8] (RW)
1163 * Configures the length of the frame sync in number of bit clocks. The value
1164 * written must be one less than the number of bit clocks. For example, write 0 for
1165 * the frame sync to assert for one bit clock only. The sync width cannot be
1166 * configured longer than the first word of the frame.
1169 #define BP_I2S_TCR4_SYWD (8U) /*!< Bit position for I2S_TCR4_SYWD. */
1170 #define BM_I2S_TCR4_SYWD (0x00001F00U) /*!< Bit mask for I2S_TCR4_SYWD. */
1171 #define BS_I2S_TCR4_SYWD (5U) /*!< Bit field size in bits for I2S_TCR4_SYWD. */
1173 /*! @brief Read current value of the I2S_TCR4_SYWD field. */
1174 #define BR_I2S_TCR4_SYWD(x) (HW_I2S_TCR4(x).B.SYWD)
1176 /*! @brief Format value for bitfield I2S_TCR4_SYWD. */
1177 #define BF_I2S_TCR4_SYWD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_SYWD) & BM_I2S_TCR4_SYWD)
1179 /*! @brief Set the SYWD field to a new value. */
1180 #define BW_I2S_TCR4_SYWD(x, v) (HW_I2S_TCR4_WR(x, (HW_I2S_TCR4_RD(x) & ~BM_I2S_TCR4_SYWD) | BF_I2S_TCR4_SYWD(v)))
1184 * @name Register I2S_TCR4, field FRSZ[19:16] (RW)
1186 * Configures the number of words in each frame. The value written must be one
1187 * less than the number of words in the frame. For example, write 0 for one word
1188 * per frame. The maximum supported frame size is 16 words.
1191 #define BP_I2S_TCR4_FRSZ (16U) /*!< Bit position for I2S_TCR4_FRSZ. */
1192 #define BM_I2S_TCR4_FRSZ (0x000F0000U) /*!< Bit mask for I2S_TCR4_FRSZ. */
1193 #define BS_I2S_TCR4_FRSZ (4U) /*!< Bit field size in bits for I2S_TCR4_FRSZ. */
1195 /*! @brief Read current value of the I2S_TCR4_FRSZ field. */
1196 #define BR_I2S_TCR4_FRSZ(x) (HW_I2S_TCR4(x).B.FRSZ)
1198 /*! @brief Format value for bitfield I2S_TCR4_FRSZ. */
1199 #define BF_I2S_TCR4_FRSZ(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FRSZ) & BM_I2S_TCR4_FRSZ)
1201 /*! @brief Set the FRSZ field to a new value. */
1202 #define BW_I2S_TCR4_FRSZ(x, v) (HW_I2S_TCR4_WR(x, (HW_I2S_TCR4_RD(x) & ~BM_I2S_TCR4_FRSZ) | BF_I2S_TCR4_FRSZ(v)))
1206 * @name Register I2S_TCR4, field FPACK[25:24] (RW)
1208 * Enables packing of 8-bit data or 16-bit data into each 32-bit FIFO word. If
1209 * the word size is greater than 8-bit or 16-bit then only the first 8-bit or
1210 * 16-bits are loaded from the FIFO. The first word in each frame always starts with
1211 * a new 32-bit FIFO word and the first bit shifted must be configured within the
1212 * first packed word. When FIFO packing is enabled, the FIFO write pointer will
1213 * only increment when the full 32-bit FIFO word has been written by software.
1216 * - 00 - FIFO packing is disabled
1218 * - 10 - 8-bit FIFO packing is enabled
1219 * - 11 - 16-bit FIFO packing is enabled
1222 #define BP_I2S_TCR4_FPACK (24U) /*!< Bit position for I2S_TCR4_FPACK. */
1223 #define BM_I2S_TCR4_FPACK (0x03000000U) /*!< Bit mask for I2S_TCR4_FPACK. */
1224 #define BS_I2S_TCR4_FPACK (2U) /*!< Bit field size in bits for I2S_TCR4_FPACK. */
1226 /*! @brief Read current value of the I2S_TCR4_FPACK field. */
1227 #define BR_I2S_TCR4_FPACK(x) (HW_I2S_TCR4(x).B.FPACK)
1229 /*! @brief Format value for bitfield I2S_TCR4_FPACK. */
1230 #define BF_I2S_TCR4_FPACK(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FPACK) & BM_I2S_TCR4_FPACK)
1232 /*! @brief Set the FPACK field to a new value. */
1233 #define BW_I2S_TCR4_FPACK(x, v) (HW_I2S_TCR4_WR(x, (HW_I2S_TCR4_RD(x) & ~BM_I2S_TCR4_FPACK) | BF_I2S_TCR4_FPACK(v)))
1237 * @name Register I2S_TCR4, field FCONT[28] (RW)
1239 * Configures when the SAI will continue transmitting after a FIFO error has
1243 * - 0 - On FIFO error, the SAI will continue from the start of the next frame
1244 * after the FIFO error flag has been cleared.
1245 * - 1 - On FIFO error, the SAI will continue from the same word that caused the
1246 * FIFO error to set after the FIFO warning flag has been cleared.
1249 #define BP_I2S_TCR4_FCONT (28U) /*!< Bit position for I2S_TCR4_FCONT. */
1250 #define BM_I2S_TCR4_FCONT (0x10000000U) /*!< Bit mask for I2S_TCR4_FCONT. */
1251 #define BS_I2S_TCR4_FCONT (1U) /*!< Bit field size in bits for I2S_TCR4_FCONT. */
1253 /*! @brief Read current value of the I2S_TCR4_FCONT field. */
1254 #define BR_I2S_TCR4_FCONT(x) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FCONT))
1256 /*! @brief Format value for bitfield I2S_TCR4_FCONT. */
1257 #define BF_I2S_TCR4_FCONT(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR4_FCONT) & BM_I2S_TCR4_FCONT)
1259 /*! @brief Set the FCONT field to a new value. */
1260 #define BW_I2S_TCR4_FCONT(x, v) (BITBAND_ACCESS32(HW_I2S_TCR4_ADDR(x), BP_I2S_TCR4_FCONT) = (v))
1263 /*******************************************************************************
1264 * HW_I2S_TCR5 - SAI Transmit Configuration 5 Register
1265 ******************************************************************************/
1268 * @brief HW_I2S_TCR5 - SAI Transmit Configuration 5 Register (RW)
1270 * Reset value: 0x00000000U
1272 * This register must not be altered when TCSR[TE] is set.
1274 typedef union _hw_i2s_tcr5
1277 struct _hw_i2s_tcr5_bitfields
1279 uint32_t RESERVED0
: 8; /*!< [7:0] */
1280 uint32_t FBT
: 5; /*!< [12:8] First Bit Shifted */
1281 uint32_t RESERVED1
: 3; /*!< [15:13] */
1282 uint32_t W0W
: 5; /*!< [20:16] Word 0 Width */
1283 uint32_t RESERVED2
: 3; /*!< [23:21] */
1284 uint32_t WNW
: 5; /*!< [28:24] Word N Width */
1285 uint32_t RESERVED3
: 3; /*!< [31:29] */
1290 * @name Constants and macros for entire I2S_TCR5 register
1293 #define HW_I2S_TCR5_ADDR(x) ((x) + 0x14U)
1295 #define HW_I2S_TCR5(x) (*(__IO hw_i2s_tcr5_t *) HW_I2S_TCR5_ADDR(x))
1296 #define HW_I2S_TCR5_RD(x) (HW_I2S_TCR5(x).U)
1297 #define HW_I2S_TCR5_WR(x, v) (HW_I2S_TCR5(x).U = (v))
1298 #define HW_I2S_TCR5_SET(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) | (v)))
1299 #define HW_I2S_TCR5_CLR(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) & ~(v)))
1300 #define HW_I2S_TCR5_TOG(x, v) (HW_I2S_TCR5_WR(x, HW_I2S_TCR5_RD(x) ^ (v)))
1304 * Constants & macros for individual I2S_TCR5 bitfields
1308 * @name Register I2S_TCR5, field FBT[12:8] (RW)
1310 * Configures the bit index for the first bit transmitted for each word in the
1311 * frame. If configured for MSB First, the index of the next bit transmitted is
1312 * one less than the current bit transmitted. If configured for LSB First, the
1313 * index of the next bit transmitted is one more than the current bit transmitted.
1314 * The value written must be greater than or equal to the word width when
1315 * configured for MSB First. The value written must be less than or equal to 31-word width
1316 * when configured for LSB First.
1319 #define BP_I2S_TCR5_FBT (8U) /*!< Bit position for I2S_TCR5_FBT. */
1320 #define BM_I2S_TCR5_FBT (0x00001F00U) /*!< Bit mask for I2S_TCR5_FBT. */
1321 #define BS_I2S_TCR5_FBT (5U) /*!< Bit field size in bits for I2S_TCR5_FBT. */
1323 /*! @brief Read current value of the I2S_TCR5_FBT field. */
1324 #define BR_I2S_TCR5_FBT(x) (HW_I2S_TCR5(x).B.FBT)
1326 /*! @brief Format value for bitfield I2S_TCR5_FBT. */
1327 #define BF_I2S_TCR5_FBT(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR5_FBT) & BM_I2S_TCR5_FBT)
1329 /*! @brief Set the FBT field to a new value. */
1330 #define BW_I2S_TCR5_FBT(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_FBT) | BF_I2S_TCR5_FBT(v)))
1334 * @name Register I2S_TCR5, field W0W[20:16] (RW)
1336 * Configures the number of bits in the first word in each frame. The value
1337 * written must be one less than the number of bits in the first word. Word width of
1338 * less than 8 bits is not supported if there is only one word per frame.
1341 #define BP_I2S_TCR5_W0W (16U) /*!< Bit position for I2S_TCR5_W0W. */
1342 #define BM_I2S_TCR5_W0W (0x001F0000U) /*!< Bit mask for I2S_TCR5_W0W. */
1343 #define BS_I2S_TCR5_W0W (5U) /*!< Bit field size in bits for I2S_TCR5_W0W. */
1345 /*! @brief Read current value of the I2S_TCR5_W0W field. */
1346 #define BR_I2S_TCR5_W0W(x) (HW_I2S_TCR5(x).B.W0W)
1348 /*! @brief Format value for bitfield I2S_TCR5_W0W. */
1349 #define BF_I2S_TCR5_W0W(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR5_W0W) & BM_I2S_TCR5_W0W)
1351 /*! @brief Set the W0W field to a new value. */
1352 #define BW_I2S_TCR5_W0W(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_W0W) | BF_I2S_TCR5_W0W(v)))
1356 * @name Register I2S_TCR5, field WNW[28:24] (RW)
1358 * Configures the number of bits in each word, for each word except the first in
1359 * the frame. The value written must be one less than the number of bits per
1360 * word. Word width of less than 8 bits is not supported.
1363 #define BP_I2S_TCR5_WNW (24U) /*!< Bit position for I2S_TCR5_WNW. */
1364 #define BM_I2S_TCR5_WNW (0x1F000000U) /*!< Bit mask for I2S_TCR5_WNW. */
1365 #define BS_I2S_TCR5_WNW (5U) /*!< Bit field size in bits for I2S_TCR5_WNW. */
1367 /*! @brief Read current value of the I2S_TCR5_WNW field. */
1368 #define BR_I2S_TCR5_WNW(x) (HW_I2S_TCR5(x).B.WNW)
1370 /*! @brief Format value for bitfield I2S_TCR5_WNW. */
1371 #define BF_I2S_TCR5_WNW(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TCR5_WNW) & BM_I2S_TCR5_WNW)
1373 /*! @brief Set the WNW field to a new value. */
1374 #define BW_I2S_TCR5_WNW(x, v) (HW_I2S_TCR5_WR(x, (HW_I2S_TCR5_RD(x) & ~BM_I2S_TCR5_WNW) | BF_I2S_TCR5_WNW(v)))
1377 /*******************************************************************************
1378 * HW_I2S_TDRn - SAI Transmit Data Register
1379 ******************************************************************************/
1382 * @brief HW_I2S_TDRn - SAI Transmit Data Register (WORZ)
1384 * Reset value: 0x00000000U
1386 typedef union _hw_i2s_tdrn
1389 struct _hw_i2s_tdrn_bitfields
1391 uint32_t TDR
: 32; /*!< [31:0] Transmit Data Register */
1396 * @name Constants and macros for entire I2S_TDRn register
1399 #define HW_I2S_TDRn_COUNT (1U)
1401 #define HW_I2S_TDRn_ADDR(x, n) ((x) + 0x20U + (0x4U * (n)))
1403 #define HW_I2S_TDRn(x, n) (*(__O hw_i2s_tdrn_t *) HW_I2S_TDRn_ADDR(x, n))
1404 #define HW_I2S_TDRn_RD(x, n) (HW_I2S_TDRn(x, n).U)
1405 #define HW_I2S_TDRn_WR(x, n, v) (HW_I2S_TDRn(x, n).U = (v))
1409 * Constants & macros for individual I2S_TDRn bitfields
1413 * @name Register I2S_TDRn, field TDR[31:0] (WORZ)
1415 * The corresponding TCR3[TCE] bit must be set before accessing the channel's
1416 * transmit data register. Writes to this register when the transmit FIFO is not
1417 * full will push the data written into the transmit data FIFO. Writes to this
1418 * register when the transmit FIFO is full are ignored.
1421 #define BP_I2S_TDRn_TDR (0U) /*!< Bit position for I2S_TDRn_TDR. */
1422 #define BM_I2S_TDRn_TDR (0xFFFFFFFFU) /*!< Bit mask for I2S_TDRn_TDR. */
1423 #define BS_I2S_TDRn_TDR (32U) /*!< Bit field size in bits for I2S_TDRn_TDR. */
1425 /*! @brief Format value for bitfield I2S_TDRn_TDR. */
1426 #define BF_I2S_TDRn_TDR(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TDRn_TDR) & BM_I2S_TDRn_TDR)
1428 /*! @brief Set the TDR field to a new value. */
1429 #define BW_I2S_TDRn_TDR(x, n, v) (HW_I2S_TDRn_WR(x, n, v))
1432 /*******************************************************************************
1433 * HW_I2S_TFRn - SAI Transmit FIFO Register
1434 ******************************************************************************/
1437 * @brief HW_I2S_TFRn - SAI Transmit FIFO Register (RO)
1439 * Reset value: 0x00000000U
1441 * The MSB of the read and write pointers is used to distinguish between FIFO
1442 * full and empty conditions. If the read and write pointers are identical, then
1443 * the FIFO is empty. If the read and write pointers are identical except for the
1444 * MSB, then the FIFO is full.
1446 typedef union _hw_i2s_tfrn
1449 struct _hw_i2s_tfrn_bitfields
1451 uint32_t RFP
: 4; /*!< [3:0] Read FIFO Pointer */
1452 uint32_t RESERVED0
: 12; /*!< [15:4] */
1453 uint32_t WFP
: 4; /*!< [19:16] Write FIFO Pointer */
1454 uint32_t RESERVED1
: 12; /*!< [31:20] */
1459 * @name Constants and macros for entire I2S_TFRn register
1462 #define HW_I2S_TFRn_COUNT (1U)
1464 #define HW_I2S_TFRn_ADDR(x, n) ((x) + 0x40U + (0x4U * (n)))
1466 #define HW_I2S_TFRn(x, n) (*(__I hw_i2s_tfrn_t *) HW_I2S_TFRn_ADDR(x, n))
1467 #define HW_I2S_TFRn_RD(x, n) (HW_I2S_TFRn(x, n).U)
1471 * Constants & macros for individual I2S_TFRn bitfields
1475 * @name Register I2S_TFRn, field RFP[3:0] (RO)
1477 * FIFO read pointer for transmit data channel.
1480 #define BP_I2S_TFRn_RFP (0U) /*!< Bit position for I2S_TFRn_RFP. */
1481 #define BM_I2S_TFRn_RFP (0x0000000FU) /*!< Bit mask for I2S_TFRn_RFP. */
1482 #define BS_I2S_TFRn_RFP (4U) /*!< Bit field size in bits for I2S_TFRn_RFP. */
1484 /*! @brief Read current value of the I2S_TFRn_RFP field. */
1485 #define BR_I2S_TFRn_RFP(x, n) (HW_I2S_TFRn(x, n).B.RFP)
1489 * @name Register I2S_TFRn, field WFP[19:16] (RO)
1491 * FIFO write pointer for transmit data channel.
1494 #define BP_I2S_TFRn_WFP (16U) /*!< Bit position for I2S_TFRn_WFP. */
1495 #define BM_I2S_TFRn_WFP (0x000F0000U) /*!< Bit mask for I2S_TFRn_WFP. */
1496 #define BS_I2S_TFRn_WFP (4U) /*!< Bit field size in bits for I2S_TFRn_WFP. */
1498 /*! @brief Read current value of the I2S_TFRn_WFP field. */
1499 #define BR_I2S_TFRn_WFP(x, n) (HW_I2S_TFRn(x, n).B.WFP)
1502 /*******************************************************************************
1503 * HW_I2S_TMR - SAI Transmit Mask Register
1504 ******************************************************************************/
1507 * @brief HW_I2S_TMR - SAI Transmit Mask Register (RW)
1509 * Reset value: 0x00000000U
1511 * This register is double-buffered and updates: When TCSR[TE] is first set At
1512 * the end of each frame. This allows the masked words in each frame to change
1513 * from frame to frame.
1515 typedef union _hw_i2s_tmr
1518 struct _hw_i2s_tmr_bitfields
1520 uint32_t TWM
: 16; /*!< [15:0] Transmit Word Mask */
1521 uint32_t RESERVED0
: 16; /*!< [31:16] */
1526 * @name Constants and macros for entire I2S_TMR register
1529 #define HW_I2S_TMR_ADDR(x) ((x) + 0x60U)
1531 #define HW_I2S_TMR(x) (*(__IO hw_i2s_tmr_t *) HW_I2S_TMR_ADDR(x))
1532 #define HW_I2S_TMR_RD(x) (HW_I2S_TMR(x).U)
1533 #define HW_I2S_TMR_WR(x, v) (HW_I2S_TMR(x).U = (v))
1534 #define HW_I2S_TMR_SET(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) | (v)))
1535 #define HW_I2S_TMR_CLR(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) & ~(v)))
1536 #define HW_I2S_TMR_TOG(x, v) (HW_I2S_TMR_WR(x, HW_I2S_TMR_RD(x) ^ (v)))
1540 * Constants & macros for individual I2S_TMR bitfields
1544 * @name Register I2S_TMR, field TWM[15:0] (RW)
1546 * Configures whether the transmit word is masked (transmit data pin tristated
1547 * and transmit data not read from FIFO) for the corresponding word in the frame.
1550 * - 0 - Word N is enabled.
1551 * - 1 - Word N is masked. The transmit data pins are tri-stated when masked.
1554 #define BP_I2S_TMR_TWM (0U) /*!< Bit position for I2S_TMR_TWM. */
1555 #define BM_I2S_TMR_TWM (0x0000FFFFU) /*!< Bit mask for I2S_TMR_TWM. */
1556 #define BS_I2S_TMR_TWM (16U) /*!< Bit field size in bits for I2S_TMR_TWM. */
1558 /*! @brief Read current value of the I2S_TMR_TWM field. */
1559 #define BR_I2S_TMR_TWM(x) (HW_I2S_TMR(x).B.TWM)
1561 /*! @brief Format value for bitfield I2S_TMR_TWM. */
1562 #define BF_I2S_TMR_TWM(v) ((uint32_t)((uint32_t)(v) << BP_I2S_TMR_TWM) & BM_I2S_TMR_TWM)
1564 /*! @brief Set the TWM field to a new value. */
1565 #define BW_I2S_TMR_TWM(x, v) (HW_I2S_TMR_WR(x, (HW_I2S_TMR_RD(x) & ~BM_I2S_TMR_TWM) | BF_I2S_TMR_TWM(v)))
1568 /*******************************************************************************
1569 * HW_I2S_RCSR - SAI Receive Control Register
1570 ******************************************************************************/
1573 * @brief HW_I2S_RCSR - SAI Receive Control Register (RW)
1575 * Reset value: 0x00000000U
1577 typedef union _hw_i2s_rcsr
1580 struct _hw_i2s_rcsr_bitfields
1582 uint32_t FRDE
: 1; /*!< [0] FIFO Request DMA Enable */
1583 uint32_t FWDE
: 1; /*!< [1] FIFO Warning DMA Enable */
1584 uint32_t RESERVED0
: 6; /*!< [7:2] */
1585 uint32_t FRIE
: 1; /*!< [8] FIFO Request Interrupt Enable */
1586 uint32_t FWIE
: 1; /*!< [9] FIFO Warning Interrupt Enable */
1587 uint32_t FEIE
: 1; /*!< [10] FIFO Error Interrupt Enable */
1588 uint32_t SEIE
: 1; /*!< [11] Sync Error Interrupt Enable */
1589 uint32_t WSIE
: 1; /*!< [12] Word Start Interrupt Enable */
1590 uint32_t RESERVED1
: 3; /*!< [15:13] */
1591 uint32_t FRF
: 1; /*!< [16] FIFO Request Flag */
1592 uint32_t FWF
: 1; /*!< [17] FIFO Warning Flag */
1593 uint32_t FEF
: 1; /*!< [18] FIFO Error Flag */
1594 uint32_t SEF
: 1; /*!< [19] Sync Error Flag */
1595 uint32_t WSF
: 1; /*!< [20] Word Start Flag */
1596 uint32_t RESERVED2
: 3; /*!< [23:21] */
1597 uint32_t SR
: 1; /*!< [24] Software Reset */
1598 uint32_t FR
: 1; /*!< [25] FIFO Reset */
1599 uint32_t RESERVED3
: 2; /*!< [27:26] */
1600 uint32_t BCE
: 1; /*!< [28] Bit Clock Enable */
1601 uint32_t DBGE
: 1; /*!< [29] Debug Enable */
1602 uint32_t STOPE
: 1; /*!< [30] Stop Enable */
1603 uint32_t RE
: 1; /*!< [31] Receiver Enable */
1608 * @name Constants and macros for entire I2S_RCSR register
1611 #define HW_I2S_RCSR_ADDR(x) ((x) + 0x80U)
1613 #define HW_I2S_RCSR(x) (*(__IO hw_i2s_rcsr_t *) HW_I2S_RCSR_ADDR(x))
1614 #define HW_I2S_RCSR_RD(x) (HW_I2S_RCSR(x).U)
1615 #define HW_I2S_RCSR_WR(x, v) (HW_I2S_RCSR(x).U = (v))
1616 #define HW_I2S_RCSR_SET(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) | (v)))
1617 #define HW_I2S_RCSR_CLR(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) & ~(v)))
1618 #define HW_I2S_RCSR_TOG(x, v) (HW_I2S_RCSR_WR(x, HW_I2S_RCSR_RD(x) ^ (v)))
1622 * Constants & macros for individual I2S_RCSR bitfields
1626 * @name Register I2S_RCSR, field FRDE[0] (RW)
1628 * Enables/disables DMA requests.
1631 * - 0 - Disables the DMA request.
1632 * - 1 - Enables the DMA request.
1635 #define BP_I2S_RCSR_FRDE (0U) /*!< Bit position for I2S_RCSR_FRDE. */
1636 #define BM_I2S_RCSR_FRDE (0x00000001U) /*!< Bit mask for I2S_RCSR_FRDE. */
1637 #define BS_I2S_RCSR_FRDE (1U) /*!< Bit field size in bits for I2S_RCSR_FRDE. */
1639 /*! @brief Read current value of the I2S_RCSR_FRDE field. */
1640 #define BR_I2S_RCSR_FRDE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRDE))
1642 /*! @brief Format value for bitfield I2S_RCSR_FRDE. */
1643 #define BF_I2S_RCSR_FRDE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FRDE) & BM_I2S_RCSR_FRDE)
1645 /*! @brief Set the FRDE field to a new value. */
1646 #define BW_I2S_RCSR_FRDE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRDE) = (v))
1650 * @name Register I2S_RCSR, field FWDE[1] (RW)
1652 * Enables/disables DMA requests.
1655 * - 0 - Disables the DMA request.
1656 * - 1 - Enables the DMA request.
1659 #define BP_I2S_RCSR_FWDE (1U) /*!< Bit position for I2S_RCSR_FWDE. */
1660 #define BM_I2S_RCSR_FWDE (0x00000002U) /*!< Bit mask for I2S_RCSR_FWDE. */
1661 #define BS_I2S_RCSR_FWDE (1U) /*!< Bit field size in bits for I2S_RCSR_FWDE. */
1663 /*! @brief Read current value of the I2S_RCSR_FWDE field. */
1664 #define BR_I2S_RCSR_FWDE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWDE))
1666 /*! @brief Format value for bitfield I2S_RCSR_FWDE. */
1667 #define BF_I2S_RCSR_FWDE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FWDE) & BM_I2S_RCSR_FWDE)
1669 /*! @brief Set the FWDE field to a new value. */
1670 #define BW_I2S_RCSR_FWDE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWDE) = (v))
1674 * @name Register I2S_RCSR, field FRIE[8] (RW)
1676 * Enables/disables FIFO request interrupts.
1679 * - 0 - Disables the interrupt.
1680 * - 1 - Enables the interrupt.
1683 #define BP_I2S_RCSR_FRIE (8U) /*!< Bit position for I2S_RCSR_FRIE. */
1684 #define BM_I2S_RCSR_FRIE (0x00000100U) /*!< Bit mask for I2S_RCSR_FRIE. */
1685 #define BS_I2S_RCSR_FRIE (1U) /*!< Bit field size in bits for I2S_RCSR_FRIE. */
1687 /*! @brief Read current value of the I2S_RCSR_FRIE field. */
1688 #define BR_I2S_RCSR_FRIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRIE))
1690 /*! @brief Format value for bitfield I2S_RCSR_FRIE. */
1691 #define BF_I2S_RCSR_FRIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FRIE) & BM_I2S_RCSR_FRIE)
1693 /*! @brief Set the FRIE field to a new value. */
1694 #define BW_I2S_RCSR_FRIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRIE) = (v))
1698 * @name Register I2S_RCSR, field FWIE[9] (RW)
1700 * Enables/disables FIFO warning interrupts.
1703 * - 0 - Disables the interrupt.
1704 * - 1 - Enables the interrupt.
1707 #define BP_I2S_RCSR_FWIE (9U) /*!< Bit position for I2S_RCSR_FWIE. */
1708 #define BM_I2S_RCSR_FWIE (0x00000200U) /*!< Bit mask for I2S_RCSR_FWIE. */
1709 #define BS_I2S_RCSR_FWIE (1U) /*!< Bit field size in bits for I2S_RCSR_FWIE. */
1711 /*! @brief Read current value of the I2S_RCSR_FWIE field. */
1712 #define BR_I2S_RCSR_FWIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWIE))
1714 /*! @brief Format value for bitfield I2S_RCSR_FWIE. */
1715 #define BF_I2S_RCSR_FWIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FWIE) & BM_I2S_RCSR_FWIE)
1717 /*! @brief Set the FWIE field to a new value. */
1718 #define BW_I2S_RCSR_FWIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWIE) = (v))
1722 * @name Register I2S_RCSR, field FEIE[10] (RW)
1724 * Enables/disables FIFO error interrupts.
1727 * - 0 - Disables the interrupt.
1728 * - 1 - Enables the interrupt.
1731 #define BP_I2S_RCSR_FEIE (10U) /*!< Bit position for I2S_RCSR_FEIE. */
1732 #define BM_I2S_RCSR_FEIE (0x00000400U) /*!< Bit mask for I2S_RCSR_FEIE. */
1733 #define BS_I2S_RCSR_FEIE (1U) /*!< Bit field size in bits for I2S_RCSR_FEIE. */
1735 /*! @brief Read current value of the I2S_RCSR_FEIE field. */
1736 #define BR_I2S_RCSR_FEIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEIE))
1738 /*! @brief Format value for bitfield I2S_RCSR_FEIE. */
1739 #define BF_I2S_RCSR_FEIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FEIE) & BM_I2S_RCSR_FEIE)
1741 /*! @brief Set the FEIE field to a new value. */
1742 #define BW_I2S_RCSR_FEIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEIE) = (v))
1746 * @name Register I2S_RCSR, field SEIE[11] (RW)
1748 * Enables/disables sync error interrupts.
1751 * - 0 - Disables interrupt.
1752 * - 1 - Enables interrupt.
1755 #define BP_I2S_RCSR_SEIE (11U) /*!< Bit position for I2S_RCSR_SEIE. */
1756 #define BM_I2S_RCSR_SEIE (0x00000800U) /*!< Bit mask for I2S_RCSR_SEIE. */
1757 #define BS_I2S_RCSR_SEIE (1U) /*!< Bit field size in bits for I2S_RCSR_SEIE. */
1759 /*! @brief Read current value of the I2S_RCSR_SEIE field. */
1760 #define BR_I2S_RCSR_SEIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEIE))
1762 /*! @brief Format value for bitfield I2S_RCSR_SEIE. */
1763 #define BF_I2S_RCSR_SEIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_SEIE) & BM_I2S_RCSR_SEIE)
1765 /*! @brief Set the SEIE field to a new value. */
1766 #define BW_I2S_RCSR_SEIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEIE) = (v))
1770 * @name Register I2S_RCSR, field WSIE[12] (RW)
1772 * Enables/disables word start interrupts.
1775 * - 0 - Disables interrupt.
1776 * - 1 - Enables interrupt.
1779 #define BP_I2S_RCSR_WSIE (12U) /*!< Bit position for I2S_RCSR_WSIE. */
1780 #define BM_I2S_RCSR_WSIE (0x00001000U) /*!< Bit mask for I2S_RCSR_WSIE. */
1781 #define BS_I2S_RCSR_WSIE (1U) /*!< Bit field size in bits for I2S_RCSR_WSIE. */
1783 /*! @brief Read current value of the I2S_RCSR_WSIE field. */
1784 #define BR_I2S_RCSR_WSIE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSIE))
1786 /*! @brief Format value for bitfield I2S_RCSR_WSIE. */
1787 #define BF_I2S_RCSR_WSIE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_WSIE) & BM_I2S_RCSR_WSIE)
1789 /*! @brief Set the WSIE field to a new value. */
1790 #define BW_I2S_RCSR_WSIE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSIE) = (v))
1794 * @name Register I2S_RCSR, field FRF[16] (RO)
1796 * Indicates that the number of words in an enabled receive channel FIFO is
1797 * greater than the receive FIFO watermark.
1800 * - 0 - Receive FIFO watermark not reached.
1801 * - 1 - Receive FIFO watermark has been reached.
1804 #define BP_I2S_RCSR_FRF (16U) /*!< Bit position for I2S_RCSR_FRF. */
1805 #define BM_I2S_RCSR_FRF (0x00010000U) /*!< Bit mask for I2S_RCSR_FRF. */
1806 #define BS_I2S_RCSR_FRF (1U) /*!< Bit field size in bits for I2S_RCSR_FRF. */
1808 /*! @brief Read current value of the I2S_RCSR_FRF field. */
1809 #define BR_I2S_RCSR_FRF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FRF))
1813 * @name Register I2S_RCSR, field FWF[17] (RO)
1815 * Indicates that an enabled receive FIFO is full.
1818 * - 0 - No enabled receive FIFO is full.
1819 * - 1 - Enabled receive FIFO is full.
1822 #define BP_I2S_RCSR_FWF (17U) /*!< Bit position for I2S_RCSR_FWF. */
1823 #define BM_I2S_RCSR_FWF (0x00020000U) /*!< Bit mask for I2S_RCSR_FWF. */
1824 #define BS_I2S_RCSR_FWF (1U) /*!< Bit field size in bits for I2S_RCSR_FWF. */
1826 /*! @brief Read current value of the I2S_RCSR_FWF field. */
1827 #define BR_I2S_RCSR_FWF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FWF))
1831 * @name Register I2S_RCSR, field FEF[18] (W1C)
1833 * Indicates that an enabled receive FIFO has overflowed. Write a logic 1 to
1834 * this field to clear this flag.
1837 * - 0 - Receive overflow not detected.
1838 * - 1 - Receive overflow detected.
1841 #define BP_I2S_RCSR_FEF (18U) /*!< Bit position for I2S_RCSR_FEF. */
1842 #define BM_I2S_RCSR_FEF (0x00040000U) /*!< Bit mask for I2S_RCSR_FEF. */
1843 #define BS_I2S_RCSR_FEF (1U) /*!< Bit field size in bits for I2S_RCSR_FEF. */
1845 /*! @brief Read current value of the I2S_RCSR_FEF field. */
1846 #define BR_I2S_RCSR_FEF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEF))
1848 /*! @brief Format value for bitfield I2S_RCSR_FEF. */
1849 #define BF_I2S_RCSR_FEF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FEF) & BM_I2S_RCSR_FEF)
1851 /*! @brief Set the FEF field to a new value. */
1852 #define BW_I2S_RCSR_FEF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FEF) = (v))
1856 * @name Register I2S_RCSR, field SEF[19] (W1C)
1858 * Indicates that an error in the externally-generated frame sync has been
1859 * detected. Write a logic 1 to this field to clear this flag.
1862 * - 0 - Sync error not detected.
1863 * - 1 - Frame sync error detected.
1866 #define BP_I2S_RCSR_SEF (19U) /*!< Bit position for I2S_RCSR_SEF. */
1867 #define BM_I2S_RCSR_SEF (0x00080000U) /*!< Bit mask for I2S_RCSR_SEF. */
1868 #define BS_I2S_RCSR_SEF (1U) /*!< Bit field size in bits for I2S_RCSR_SEF. */
1870 /*! @brief Read current value of the I2S_RCSR_SEF field. */
1871 #define BR_I2S_RCSR_SEF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEF))
1873 /*! @brief Format value for bitfield I2S_RCSR_SEF. */
1874 #define BF_I2S_RCSR_SEF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_SEF) & BM_I2S_RCSR_SEF)
1876 /*! @brief Set the SEF field to a new value. */
1877 #define BW_I2S_RCSR_SEF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SEF) = (v))
1881 * @name Register I2S_RCSR, field WSF[20] (W1C)
1883 * Indicates that the start of the configured word has been detected. Write a
1884 * logic 1 to this field to clear this flag.
1887 * - 0 - Start of word not detected.
1888 * - 1 - Start of word detected.
1891 #define BP_I2S_RCSR_WSF (20U) /*!< Bit position for I2S_RCSR_WSF. */
1892 #define BM_I2S_RCSR_WSF (0x00100000U) /*!< Bit mask for I2S_RCSR_WSF. */
1893 #define BS_I2S_RCSR_WSF (1U) /*!< Bit field size in bits for I2S_RCSR_WSF. */
1895 /*! @brief Read current value of the I2S_RCSR_WSF field. */
1896 #define BR_I2S_RCSR_WSF(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSF))
1898 /*! @brief Format value for bitfield I2S_RCSR_WSF. */
1899 #define BF_I2S_RCSR_WSF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_WSF) & BM_I2S_RCSR_WSF)
1901 /*! @brief Set the WSF field to a new value. */
1902 #define BW_I2S_RCSR_WSF(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_WSF) = (v))
1906 * @name Register I2S_RCSR, field SR[24] (RW)
1908 * Resets the internal receiver logic including the FIFO pointers.
1909 * Software-visible registers are not affected, except for the status registers.
1913 * - 1 - Software reset.
1916 #define BP_I2S_RCSR_SR (24U) /*!< Bit position for I2S_RCSR_SR. */
1917 #define BM_I2S_RCSR_SR (0x01000000U) /*!< Bit mask for I2S_RCSR_SR. */
1918 #define BS_I2S_RCSR_SR (1U) /*!< Bit field size in bits for I2S_RCSR_SR. */
1920 /*! @brief Read current value of the I2S_RCSR_SR field. */
1921 #define BR_I2S_RCSR_SR(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SR))
1923 /*! @brief Format value for bitfield I2S_RCSR_SR. */
1924 #define BF_I2S_RCSR_SR(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_SR) & BM_I2S_RCSR_SR)
1926 /*! @brief Set the SR field to a new value. */
1927 #define BW_I2S_RCSR_SR(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_SR) = (v))
1931 * @name Register I2S_RCSR, field FR[25] (WORZ)
1933 * Resets the FIFO pointers. Reading this field will always return zero. FIFO
1934 * pointers should only be reset when the receiver is disabled or the FIFO error
1942 #define BP_I2S_RCSR_FR (25U) /*!< Bit position for I2S_RCSR_FR. */
1943 #define BM_I2S_RCSR_FR (0x02000000U) /*!< Bit mask for I2S_RCSR_FR. */
1944 #define BS_I2S_RCSR_FR (1U) /*!< Bit field size in bits for I2S_RCSR_FR. */
1946 /*! @brief Format value for bitfield I2S_RCSR_FR. */
1947 #define BF_I2S_RCSR_FR(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_FR) & BM_I2S_RCSR_FR)
1949 /*! @brief Set the FR field to a new value. */
1950 #define BW_I2S_RCSR_FR(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_FR) = (v))
1954 * @name Register I2S_RCSR, field BCE[28] (RW)
1956 * Enables the receive bit clock, separately from RE. This field is
1957 * automatically set whenever RE is set. When software clears this field, the receive bit
1958 * clock remains enabled, and this field remains set, until the end of the current
1962 * - 0 - Receive bit clock is disabled.
1963 * - 1 - Receive bit clock is enabled.
1966 #define BP_I2S_RCSR_BCE (28U) /*!< Bit position for I2S_RCSR_BCE. */
1967 #define BM_I2S_RCSR_BCE (0x10000000U) /*!< Bit mask for I2S_RCSR_BCE. */
1968 #define BS_I2S_RCSR_BCE (1U) /*!< Bit field size in bits for I2S_RCSR_BCE. */
1970 /*! @brief Read current value of the I2S_RCSR_BCE field. */
1971 #define BR_I2S_RCSR_BCE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_BCE))
1973 /*! @brief Format value for bitfield I2S_RCSR_BCE. */
1974 #define BF_I2S_RCSR_BCE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_BCE) & BM_I2S_RCSR_BCE)
1976 /*! @brief Set the BCE field to a new value. */
1977 #define BW_I2S_RCSR_BCE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_BCE) = (v))
1981 * @name Register I2S_RCSR, field DBGE[29] (RW)
1983 * Enables/disables receiver operation in Debug mode. The receive bit clock is
1984 * not affected by Debug mode.
1987 * - 0 - Receiver is disabled in Debug mode, after completing the current frame.
1988 * - 1 - Receiver is enabled in Debug mode.
1991 #define BP_I2S_RCSR_DBGE (29U) /*!< Bit position for I2S_RCSR_DBGE. */
1992 #define BM_I2S_RCSR_DBGE (0x20000000U) /*!< Bit mask for I2S_RCSR_DBGE. */
1993 #define BS_I2S_RCSR_DBGE (1U) /*!< Bit field size in bits for I2S_RCSR_DBGE. */
1995 /*! @brief Read current value of the I2S_RCSR_DBGE field. */
1996 #define BR_I2S_RCSR_DBGE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_DBGE))
1998 /*! @brief Format value for bitfield I2S_RCSR_DBGE. */
1999 #define BF_I2S_RCSR_DBGE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_DBGE) & BM_I2S_RCSR_DBGE)
2001 /*! @brief Set the DBGE field to a new value. */
2002 #define BW_I2S_RCSR_DBGE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_DBGE) = (v))
2006 * @name Register I2S_RCSR, field STOPE[30] (RW)
2008 * Configures receiver operation in Stop mode. This bit is ignored and the
2009 * receiver is disabled in all low-leakage stop modes.
2012 * - 0 - Receiver disabled in Stop mode.
2013 * - 1 - Receiver enabled in Stop mode.
2016 #define BP_I2S_RCSR_STOPE (30U) /*!< Bit position for I2S_RCSR_STOPE. */
2017 #define BM_I2S_RCSR_STOPE (0x40000000U) /*!< Bit mask for I2S_RCSR_STOPE. */
2018 #define BS_I2S_RCSR_STOPE (1U) /*!< Bit field size in bits for I2S_RCSR_STOPE. */
2020 /*! @brief Read current value of the I2S_RCSR_STOPE field. */
2021 #define BR_I2S_RCSR_STOPE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_STOPE))
2023 /*! @brief Format value for bitfield I2S_RCSR_STOPE. */
2024 #define BF_I2S_RCSR_STOPE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_STOPE) & BM_I2S_RCSR_STOPE)
2026 /*! @brief Set the STOPE field to a new value. */
2027 #define BW_I2S_RCSR_STOPE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_STOPE) = (v))
2031 * @name Register I2S_RCSR, field RE[31] (RW)
2033 * Enables/disables the receiver. When software clears this field, the receiver
2034 * remains enabled, and this bit remains set, until the end of the current frame.
2037 * - 0 - Receiver is disabled.
2038 * - 1 - Receiver is enabled, or receiver has been disabled and has not yet
2039 * reached end of frame.
2042 #define BP_I2S_RCSR_RE (31U) /*!< Bit position for I2S_RCSR_RE. */
2043 #define BM_I2S_RCSR_RE (0x80000000U) /*!< Bit mask for I2S_RCSR_RE. */
2044 #define BS_I2S_RCSR_RE (1U) /*!< Bit field size in bits for I2S_RCSR_RE. */
2046 /*! @brief Read current value of the I2S_RCSR_RE field. */
2047 #define BR_I2S_RCSR_RE(x) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_RE))
2049 /*! @brief Format value for bitfield I2S_RCSR_RE. */
2050 #define BF_I2S_RCSR_RE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCSR_RE) & BM_I2S_RCSR_RE)
2052 /*! @brief Set the RE field to a new value. */
2053 #define BW_I2S_RCSR_RE(x, v) (BITBAND_ACCESS32(HW_I2S_RCSR_ADDR(x), BP_I2S_RCSR_RE) = (v))
2056 /*******************************************************************************
2057 * HW_I2S_RCR1 - SAI Receive Configuration 1 Register
2058 ******************************************************************************/
2061 * @brief HW_I2S_RCR1 - SAI Receive Configuration 1 Register (RW)
2063 * Reset value: 0x00000000U
2065 typedef union _hw_i2s_rcr1
2068 struct _hw_i2s_rcr1_bitfields
2070 uint32_t RFW
: 3; /*!< [2:0] Receive FIFO Watermark */
2071 uint32_t RESERVED0
: 29; /*!< [31:3] */
2076 * @name Constants and macros for entire I2S_RCR1 register
2079 #define HW_I2S_RCR1_ADDR(x) ((x) + 0x84U)
2081 #define HW_I2S_RCR1(x) (*(__IO hw_i2s_rcr1_t *) HW_I2S_RCR1_ADDR(x))
2082 #define HW_I2S_RCR1_RD(x) (HW_I2S_RCR1(x).U)
2083 #define HW_I2S_RCR1_WR(x, v) (HW_I2S_RCR1(x).U = (v))
2084 #define HW_I2S_RCR1_SET(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) | (v)))
2085 #define HW_I2S_RCR1_CLR(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) & ~(v)))
2086 #define HW_I2S_RCR1_TOG(x, v) (HW_I2S_RCR1_WR(x, HW_I2S_RCR1_RD(x) ^ (v)))
2090 * Constants & macros for individual I2S_RCR1 bitfields
2094 * @name Register I2S_RCR1, field RFW[2:0] (RW)
2096 * Configures the watermark level for all enabled receiver channels.
2099 #define BP_I2S_RCR1_RFW (0U) /*!< Bit position for I2S_RCR1_RFW. */
2100 #define BM_I2S_RCR1_RFW (0x00000007U) /*!< Bit mask for I2S_RCR1_RFW. */
2101 #define BS_I2S_RCR1_RFW (3U) /*!< Bit field size in bits for I2S_RCR1_RFW. */
2103 /*! @brief Read current value of the I2S_RCR1_RFW field. */
2104 #define BR_I2S_RCR1_RFW(x) (HW_I2S_RCR1(x).B.RFW)
2106 /*! @brief Format value for bitfield I2S_RCR1_RFW. */
2107 #define BF_I2S_RCR1_RFW(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR1_RFW) & BM_I2S_RCR1_RFW)
2109 /*! @brief Set the RFW field to a new value. */
2110 #define BW_I2S_RCR1_RFW(x, v) (HW_I2S_RCR1_WR(x, (HW_I2S_RCR1_RD(x) & ~BM_I2S_RCR1_RFW) | BF_I2S_RCR1_RFW(v)))
2113 /*******************************************************************************
2114 * HW_I2S_RCR2 - SAI Receive Configuration 2 Register
2115 ******************************************************************************/
2118 * @brief HW_I2S_RCR2 - SAI Receive Configuration 2 Register (RW)
2120 * Reset value: 0x00000000U
2122 * This register must not be altered when RCSR[RE] is set.
2124 typedef union _hw_i2s_rcr2
2127 struct _hw_i2s_rcr2_bitfields
2129 uint32_t DIV
: 8; /*!< [7:0] Bit Clock Divide */
2130 uint32_t RESERVED0
: 16; /*!< [23:8] */
2131 uint32_t BCD
: 1; /*!< [24] Bit Clock Direction */
2132 uint32_t BCP
: 1; /*!< [25] Bit Clock Polarity */
2133 uint32_t MSEL
: 2; /*!< [27:26] MCLK Select */
2134 uint32_t BCI
: 1; /*!< [28] Bit Clock Input */
2135 uint32_t BCS
: 1; /*!< [29] Bit Clock Swap */
2136 uint32_t SYNC
: 2; /*!< [31:30] Synchronous Mode */
2141 * @name Constants and macros for entire I2S_RCR2 register
2144 #define HW_I2S_RCR2_ADDR(x) ((x) + 0x88U)
2146 #define HW_I2S_RCR2(x) (*(__IO hw_i2s_rcr2_t *) HW_I2S_RCR2_ADDR(x))
2147 #define HW_I2S_RCR2_RD(x) (HW_I2S_RCR2(x).U)
2148 #define HW_I2S_RCR2_WR(x, v) (HW_I2S_RCR2(x).U = (v))
2149 #define HW_I2S_RCR2_SET(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) | (v)))
2150 #define HW_I2S_RCR2_CLR(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) & ~(v)))
2151 #define HW_I2S_RCR2_TOG(x, v) (HW_I2S_RCR2_WR(x, HW_I2S_RCR2_RD(x) ^ (v)))
2155 * Constants & macros for individual I2S_RCR2 bitfields
2159 * @name Register I2S_RCR2, field DIV[7:0] (RW)
2161 * Divides down the audio master clock to generate the bit clock when configured
2162 * for an internal bit clock. The division value is (DIV + 1) * 2.
2165 #define BP_I2S_RCR2_DIV (0U) /*!< Bit position for I2S_RCR2_DIV. */
2166 #define BM_I2S_RCR2_DIV (0x000000FFU) /*!< Bit mask for I2S_RCR2_DIV. */
2167 #define BS_I2S_RCR2_DIV (8U) /*!< Bit field size in bits for I2S_RCR2_DIV. */
2169 /*! @brief Read current value of the I2S_RCR2_DIV field. */
2170 #define BR_I2S_RCR2_DIV(x) (HW_I2S_RCR2(x).B.DIV)
2172 /*! @brief Format value for bitfield I2S_RCR2_DIV. */
2173 #define BF_I2S_RCR2_DIV(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_DIV) & BM_I2S_RCR2_DIV)
2175 /*! @brief Set the DIV field to a new value. */
2176 #define BW_I2S_RCR2_DIV(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_DIV) | BF_I2S_RCR2_DIV(v)))
2180 * @name Register I2S_RCR2, field BCD[24] (RW)
2182 * Configures the direction of the bit clock.
2185 * - 0 - Bit clock is generated externally in Slave mode.
2186 * - 1 - Bit clock is generated internally in Master mode.
2189 #define BP_I2S_RCR2_BCD (24U) /*!< Bit position for I2S_RCR2_BCD. */
2190 #define BM_I2S_RCR2_BCD (0x01000000U) /*!< Bit mask for I2S_RCR2_BCD. */
2191 #define BS_I2S_RCR2_BCD (1U) /*!< Bit field size in bits for I2S_RCR2_BCD. */
2193 /*! @brief Read current value of the I2S_RCR2_BCD field. */
2194 #define BR_I2S_RCR2_BCD(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCD))
2196 /*! @brief Format value for bitfield I2S_RCR2_BCD. */
2197 #define BF_I2S_RCR2_BCD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_BCD) & BM_I2S_RCR2_BCD)
2199 /*! @brief Set the BCD field to a new value. */
2200 #define BW_I2S_RCR2_BCD(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCD) = (v))
2204 * @name Register I2S_RCR2, field BCP[25] (RW)
2206 * Configures the polarity of the bit clock.
2209 * - 0 - Bit Clock is active high with drive outputs on rising edge and sample
2210 * inputs on falling edge.
2211 * - 1 - Bit Clock is active low with drive outputs on falling edge and sample
2212 * inputs on rising edge.
2215 #define BP_I2S_RCR2_BCP (25U) /*!< Bit position for I2S_RCR2_BCP. */
2216 #define BM_I2S_RCR2_BCP (0x02000000U) /*!< Bit mask for I2S_RCR2_BCP. */
2217 #define BS_I2S_RCR2_BCP (1U) /*!< Bit field size in bits for I2S_RCR2_BCP. */
2219 /*! @brief Read current value of the I2S_RCR2_BCP field. */
2220 #define BR_I2S_RCR2_BCP(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCP))
2222 /*! @brief Format value for bitfield I2S_RCR2_BCP. */
2223 #define BF_I2S_RCR2_BCP(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_BCP) & BM_I2S_RCR2_BCP)
2225 /*! @brief Set the BCP field to a new value. */
2226 #define BW_I2S_RCR2_BCP(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCP) = (v))
2230 * @name Register I2S_RCR2, field MSEL[27:26] (RW)
2232 * Selects the audio Master Clock option used to generate an internally
2233 * generated bit clock. This field has no effect when configured for an externally
2234 * generated bit clock. Depending on the device, some Master Clock options might not be
2235 * available. See the chip configuration details for the availability and
2236 * chip-specific meaning of each option.
2239 * - 00 - Bus Clock selected.
2240 * - 01 - Master Clock (MCLK) 1 option selected.
2241 * - 10 - Master Clock (MCLK) 2 option selected.
2242 * - 11 - Master Clock (MCLK) 3 option selected.
2245 #define BP_I2S_RCR2_MSEL (26U) /*!< Bit position for I2S_RCR2_MSEL. */
2246 #define BM_I2S_RCR2_MSEL (0x0C000000U) /*!< Bit mask for I2S_RCR2_MSEL. */
2247 #define BS_I2S_RCR2_MSEL (2U) /*!< Bit field size in bits for I2S_RCR2_MSEL. */
2249 /*! @brief Read current value of the I2S_RCR2_MSEL field. */
2250 #define BR_I2S_RCR2_MSEL(x) (HW_I2S_RCR2(x).B.MSEL)
2252 /*! @brief Format value for bitfield I2S_RCR2_MSEL. */
2253 #define BF_I2S_RCR2_MSEL(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_MSEL) & BM_I2S_RCR2_MSEL)
2255 /*! @brief Set the MSEL field to a new value. */
2256 #define BW_I2S_RCR2_MSEL(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_MSEL) | BF_I2S_RCR2_MSEL(v)))
2260 * @name Register I2S_RCR2, field BCI[28] (RW)
2262 * When this field is set and using an internally generated bit clock in either
2263 * synchronous or asynchronous mode, the bit clock actually used by the receiver
2264 * is delayed by the pad output delay (the receiver is clocked by the pad input
2265 * as if the clock was externally generated). This has the effect of decreasing
2266 * the data input setup time, but increasing the data output valid time. The slave
2267 * mode timing from the datasheet should be used for the receiver when this bit
2268 * is set. In synchronous mode, this bit allows the receiver to use the slave mode
2269 * timing from the datasheet, while the transmitter uses the master mode timing.
2270 * This field has no effect when configured for an externally generated bit
2275 * - 1 - Internal logic is clocked as if bit clock was externally generated.
2278 #define BP_I2S_RCR2_BCI (28U) /*!< Bit position for I2S_RCR2_BCI. */
2279 #define BM_I2S_RCR2_BCI (0x10000000U) /*!< Bit mask for I2S_RCR2_BCI. */
2280 #define BS_I2S_RCR2_BCI (1U) /*!< Bit field size in bits for I2S_RCR2_BCI. */
2282 /*! @brief Read current value of the I2S_RCR2_BCI field. */
2283 #define BR_I2S_RCR2_BCI(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCI))
2285 /*! @brief Format value for bitfield I2S_RCR2_BCI. */
2286 #define BF_I2S_RCR2_BCI(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_BCI) & BM_I2S_RCR2_BCI)
2288 /*! @brief Set the BCI field to a new value. */
2289 #define BW_I2S_RCR2_BCI(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCI) = (v))
2293 * @name Register I2S_RCR2, field BCS[29] (RW)
2295 * This field swaps the bit clock used by the receiver. When the receiver is
2296 * configured in asynchronous mode and this bit is set, the receiver is clocked by
2297 * the transmitter bit clock (SAI_TX_BCLK). This allows the transmitter and
2298 * receiver to share the same bit clock, but the receiver continues to use the receiver
2299 * frame sync (SAI_RX_SYNC). When the receiver is configured in synchronous
2300 * mode, the transmitter BCS field and receiver BCS field must be set to the same
2301 * value. When both are set, the transmitter and receiver are both clocked by the
2302 * receiver bit clock (SAI_RX_BCLK) but use the transmitter frame sync
2306 * - 0 - Use the normal bit clock source.
2307 * - 1 - Swap the bit clock source.
2310 #define BP_I2S_RCR2_BCS (29U) /*!< Bit position for I2S_RCR2_BCS. */
2311 #define BM_I2S_RCR2_BCS (0x20000000U) /*!< Bit mask for I2S_RCR2_BCS. */
2312 #define BS_I2S_RCR2_BCS (1U) /*!< Bit field size in bits for I2S_RCR2_BCS. */
2314 /*! @brief Read current value of the I2S_RCR2_BCS field. */
2315 #define BR_I2S_RCR2_BCS(x) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCS))
2317 /*! @brief Format value for bitfield I2S_RCR2_BCS. */
2318 #define BF_I2S_RCR2_BCS(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_BCS) & BM_I2S_RCR2_BCS)
2320 /*! @brief Set the BCS field to a new value. */
2321 #define BW_I2S_RCR2_BCS(x, v) (BITBAND_ACCESS32(HW_I2S_RCR2_ADDR(x), BP_I2S_RCR2_BCS) = (v))
2325 * @name Register I2S_RCR2, field SYNC[31:30] (RW)
2327 * Configures between asynchronous and synchronous modes of operation. When
2328 * configured for a synchronous mode of operation, the transmitter must be configured
2329 * for asynchronous operation.
2332 * - 00 - Asynchronous mode.
2333 * - 01 - Synchronous with transmitter.
2334 * - 10 - Synchronous with another SAI receiver.
2335 * - 11 - Synchronous with another SAI transmitter.
2338 #define BP_I2S_RCR2_SYNC (30U) /*!< Bit position for I2S_RCR2_SYNC. */
2339 #define BM_I2S_RCR2_SYNC (0xC0000000U) /*!< Bit mask for I2S_RCR2_SYNC. */
2340 #define BS_I2S_RCR2_SYNC (2U) /*!< Bit field size in bits for I2S_RCR2_SYNC. */
2342 /*! @brief Read current value of the I2S_RCR2_SYNC field. */
2343 #define BR_I2S_RCR2_SYNC(x) (HW_I2S_RCR2(x).B.SYNC)
2345 /*! @brief Format value for bitfield I2S_RCR2_SYNC. */
2346 #define BF_I2S_RCR2_SYNC(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR2_SYNC) & BM_I2S_RCR2_SYNC)
2348 /*! @brief Set the SYNC field to a new value. */
2349 #define BW_I2S_RCR2_SYNC(x, v) (HW_I2S_RCR2_WR(x, (HW_I2S_RCR2_RD(x) & ~BM_I2S_RCR2_SYNC) | BF_I2S_RCR2_SYNC(v)))
2352 /*******************************************************************************
2353 * HW_I2S_RCR3 - SAI Receive Configuration 3 Register
2354 ******************************************************************************/
2357 * @brief HW_I2S_RCR3 - SAI Receive Configuration 3 Register (RW)
2359 * Reset value: 0x00000000U
2361 typedef union _hw_i2s_rcr3
2364 struct _hw_i2s_rcr3_bitfields
2366 uint32_t WDFL
: 4; /*!< [3:0] Word Flag Configuration */
2367 uint32_t RESERVED0
: 12; /*!< [15:4] */
2368 uint32_t RCE
: 1; /*!< [16] Receive Channel Enable */
2369 uint32_t RESERVED1
: 15; /*!< [31:17] */
2374 * @name Constants and macros for entire I2S_RCR3 register
2377 #define HW_I2S_RCR3_ADDR(x) ((x) + 0x8CU)
2379 #define HW_I2S_RCR3(x) (*(__IO hw_i2s_rcr3_t *) HW_I2S_RCR3_ADDR(x))
2380 #define HW_I2S_RCR3_RD(x) (HW_I2S_RCR3(x).U)
2381 #define HW_I2S_RCR3_WR(x, v) (HW_I2S_RCR3(x).U = (v))
2382 #define HW_I2S_RCR3_SET(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) | (v)))
2383 #define HW_I2S_RCR3_CLR(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) & ~(v)))
2384 #define HW_I2S_RCR3_TOG(x, v) (HW_I2S_RCR3_WR(x, HW_I2S_RCR3_RD(x) ^ (v)))
2388 * Constants & macros for individual I2S_RCR3 bitfields
2392 * @name Register I2S_RCR3, field WDFL[3:0] (RW)
2394 * Configures which word the start of word flag is set. The value written should
2395 * be one less than the word number (for example, write zero to configure for
2396 * the first word in the frame). When configured to a value greater than the Frame
2397 * Size field, then the start of word flag is never set.
2400 #define BP_I2S_RCR3_WDFL (0U) /*!< Bit position for I2S_RCR3_WDFL. */
2401 #define BM_I2S_RCR3_WDFL (0x0000000FU) /*!< Bit mask for I2S_RCR3_WDFL. */
2402 #define BS_I2S_RCR3_WDFL (4U) /*!< Bit field size in bits for I2S_RCR3_WDFL. */
2404 /*! @brief Read current value of the I2S_RCR3_WDFL field. */
2405 #define BR_I2S_RCR3_WDFL(x) (HW_I2S_RCR3(x).B.WDFL)
2407 /*! @brief Format value for bitfield I2S_RCR3_WDFL. */
2408 #define BF_I2S_RCR3_WDFL(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR3_WDFL) & BM_I2S_RCR3_WDFL)
2410 /*! @brief Set the WDFL field to a new value. */
2411 #define BW_I2S_RCR3_WDFL(x, v) (HW_I2S_RCR3_WR(x, (HW_I2S_RCR3_RD(x) & ~BM_I2S_RCR3_WDFL) | BF_I2S_RCR3_WDFL(v)))
2415 * @name Register I2S_RCR3, field RCE[16] (RW)
2417 * Enables the corresponding data channel for receive operation. A channel must
2418 * be enabled before its FIFO is accessed. Changing this field will take effect
2419 * immediately for generating the FIFO request and warning flags, but at the end
2420 * of each frame for receive operation.
2423 * - 0 - Receive data channel N is disabled.
2424 * - 1 - Receive data channel N is enabled.
2427 #define BP_I2S_RCR3_RCE (16U) /*!< Bit position for I2S_RCR3_RCE. */
2428 #define BM_I2S_RCR3_RCE (0x00010000U) /*!< Bit mask for I2S_RCR3_RCE. */
2429 #define BS_I2S_RCR3_RCE (1U) /*!< Bit field size in bits for I2S_RCR3_RCE. */
2431 /*! @brief Read current value of the I2S_RCR3_RCE field. */
2432 #define BR_I2S_RCR3_RCE(x) (BITBAND_ACCESS32(HW_I2S_RCR3_ADDR(x), BP_I2S_RCR3_RCE))
2434 /*! @brief Format value for bitfield I2S_RCR3_RCE. */
2435 #define BF_I2S_RCR3_RCE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR3_RCE) & BM_I2S_RCR3_RCE)
2437 /*! @brief Set the RCE field to a new value. */
2438 #define BW_I2S_RCR3_RCE(x, v) (BITBAND_ACCESS32(HW_I2S_RCR3_ADDR(x), BP_I2S_RCR3_RCE) = (v))
2441 /*******************************************************************************
2442 * HW_I2S_RCR4 - SAI Receive Configuration 4 Register
2443 ******************************************************************************/
2446 * @brief HW_I2S_RCR4 - SAI Receive Configuration 4 Register (RW)
2448 * Reset value: 0x00000000U
2450 * This register must not be altered when RCSR[RE] is set.
2452 typedef union _hw_i2s_rcr4
2455 struct _hw_i2s_rcr4_bitfields
2457 uint32_t FSD
: 1; /*!< [0] Frame Sync Direction */
2458 uint32_t FSP
: 1; /*!< [1] Frame Sync Polarity */
2459 uint32_t ONDEM
: 1; /*!< [2] On Demand Mode */
2460 uint32_t FSE
: 1; /*!< [3] Frame Sync Early */
2461 uint32_t MF
: 1; /*!< [4] MSB First */
2462 uint32_t RESERVED0
: 3; /*!< [7:5] */
2463 uint32_t SYWD
: 5; /*!< [12:8] Sync Width */
2464 uint32_t RESERVED1
: 3; /*!< [15:13] */
2465 uint32_t FRSZ
: 4; /*!< [19:16] Frame Size */
2466 uint32_t RESERVED2
: 4; /*!< [23:20] */
2467 uint32_t FPACK
: 2; /*!< [25:24] FIFO Packing Mode */
2468 uint32_t RESERVED3
: 2; /*!< [27:26] */
2469 uint32_t FCONT
: 1; /*!< [28] FIFO Continue on Error */
2470 uint32_t RESERVED4
: 3; /*!< [31:29] */
2475 * @name Constants and macros for entire I2S_RCR4 register
2478 #define HW_I2S_RCR4_ADDR(x) ((x) + 0x90U)
2480 #define HW_I2S_RCR4(x) (*(__IO hw_i2s_rcr4_t *) HW_I2S_RCR4_ADDR(x))
2481 #define HW_I2S_RCR4_RD(x) (HW_I2S_RCR4(x).U)
2482 #define HW_I2S_RCR4_WR(x, v) (HW_I2S_RCR4(x).U = (v))
2483 #define HW_I2S_RCR4_SET(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) | (v)))
2484 #define HW_I2S_RCR4_CLR(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) & ~(v)))
2485 #define HW_I2S_RCR4_TOG(x, v) (HW_I2S_RCR4_WR(x, HW_I2S_RCR4_RD(x) ^ (v)))
2489 * Constants & macros for individual I2S_RCR4 bitfields
2493 * @name Register I2S_RCR4, field FSD[0] (RW)
2495 * Configures the direction of the frame sync.
2498 * - 0 - Frame Sync is generated externally in Slave mode.
2499 * - 1 - Frame Sync is generated internally in Master mode.
2502 #define BP_I2S_RCR4_FSD (0U) /*!< Bit position for I2S_RCR4_FSD. */
2503 #define BM_I2S_RCR4_FSD (0x00000001U) /*!< Bit mask for I2S_RCR4_FSD. */
2504 #define BS_I2S_RCR4_FSD (1U) /*!< Bit field size in bits for I2S_RCR4_FSD. */
2506 /*! @brief Read current value of the I2S_RCR4_FSD field. */
2507 #define BR_I2S_RCR4_FSD(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSD))
2509 /*! @brief Format value for bitfield I2S_RCR4_FSD. */
2510 #define BF_I2S_RCR4_FSD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FSD) & BM_I2S_RCR4_FSD)
2512 /*! @brief Set the FSD field to a new value. */
2513 #define BW_I2S_RCR4_FSD(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSD) = (v))
2517 * @name Register I2S_RCR4, field FSP[1] (RW)
2519 * Configures the polarity of the frame sync.
2522 * - 0 - Frame sync is active high.
2523 * - 1 - Frame sync is active low.
2526 #define BP_I2S_RCR4_FSP (1U) /*!< Bit position for I2S_RCR4_FSP. */
2527 #define BM_I2S_RCR4_FSP (0x00000002U) /*!< Bit mask for I2S_RCR4_FSP. */
2528 #define BS_I2S_RCR4_FSP (1U) /*!< Bit field size in bits for I2S_RCR4_FSP. */
2530 /*! @brief Read current value of the I2S_RCR4_FSP field. */
2531 #define BR_I2S_RCR4_FSP(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSP))
2533 /*! @brief Format value for bitfield I2S_RCR4_FSP. */
2534 #define BF_I2S_RCR4_FSP(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FSP) & BM_I2S_RCR4_FSP)
2536 /*! @brief Set the FSP field to a new value. */
2537 #define BW_I2S_RCR4_FSP(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSP) = (v))
2541 * @name Register I2S_RCR4, field ONDEM[2] (RW)
2543 * When set, and the frame sync is generated internally, a frame sync is only
2544 * generated when the FIFO warning flag is clear.
2547 * - 0 - Internal frame sync is generated continuously.
2548 * - 1 - Internal frame sync is generated when the FIFO warning flag is clear.
2551 #define BP_I2S_RCR4_ONDEM (2U) /*!< Bit position for I2S_RCR4_ONDEM. */
2552 #define BM_I2S_RCR4_ONDEM (0x00000004U) /*!< Bit mask for I2S_RCR4_ONDEM. */
2553 #define BS_I2S_RCR4_ONDEM (1U) /*!< Bit field size in bits for I2S_RCR4_ONDEM. */
2555 /*! @brief Read current value of the I2S_RCR4_ONDEM field. */
2556 #define BR_I2S_RCR4_ONDEM(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_ONDEM))
2558 /*! @brief Format value for bitfield I2S_RCR4_ONDEM. */
2559 #define BF_I2S_RCR4_ONDEM(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_ONDEM) & BM_I2S_RCR4_ONDEM)
2561 /*! @brief Set the ONDEM field to a new value. */
2562 #define BW_I2S_RCR4_ONDEM(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_ONDEM) = (v))
2566 * @name Register I2S_RCR4, field FSE[3] (RW)
2569 * - 0 - Frame sync asserts with the first bit of the frame.
2570 * - 1 - Frame sync asserts one bit before the first bit of the frame.
2573 #define BP_I2S_RCR4_FSE (3U) /*!< Bit position for I2S_RCR4_FSE. */
2574 #define BM_I2S_RCR4_FSE (0x00000008U) /*!< Bit mask for I2S_RCR4_FSE. */
2575 #define BS_I2S_RCR4_FSE (1U) /*!< Bit field size in bits for I2S_RCR4_FSE. */
2577 /*! @brief Read current value of the I2S_RCR4_FSE field. */
2578 #define BR_I2S_RCR4_FSE(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSE))
2580 /*! @brief Format value for bitfield I2S_RCR4_FSE. */
2581 #define BF_I2S_RCR4_FSE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FSE) & BM_I2S_RCR4_FSE)
2583 /*! @brief Set the FSE field to a new value. */
2584 #define BW_I2S_RCR4_FSE(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FSE) = (v))
2588 * @name Register I2S_RCR4, field MF[4] (RW)
2590 * Configures whether the LSB or the MSB is received first.
2593 * - 0 - LSB is received first.
2594 * - 1 - MSB is received first.
2597 #define BP_I2S_RCR4_MF (4U) /*!< Bit position for I2S_RCR4_MF. */
2598 #define BM_I2S_RCR4_MF (0x00000010U) /*!< Bit mask for I2S_RCR4_MF. */
2599 #define BS_I2S_RCR4_MF (1U) /*!< Bit field size in bits for I2S_RCR4_MF. */
2601 /*! @brief Read current value of the I2S_RCR4_MF field. */
2602 #define BR_I2S_RCR4_MF(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_MF))
2604 /*! @brief Format value for bitfield I2S_RCR4_MF. */
2605 #define BF_I2S_RCR4_MF(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_MF) & BM_I2S_RCR4_MF)
2607 /*! @brief Set the MF field to a new value. */
2608 #define BW_I2S_RCR4_MF(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_MF) = (v))
2612 * @name Register I2S_RCR4, field SYWD[12:8] (RW)
2614 * Configures the length of the frame sync in number of bit clocks. The value
2615 * written must be one less than the number of bit clocks. For example, write 0 for
2616 * the frame sync to assert for one bit clock only. The sync width cannot be
2617 * configured longer than the first word of the frame.
2620 #define BP_I2S_RCR4_SYWD (8U) /*!< Bit position for I2S_RCR4_SYWD. */
2621 #define BM_I2S_RCR4_SYWD (0x00001F00U) /*!< Bit mask for I2S_RCR4_SYWD. */
2622 #define BS_I2S_RCR4_SYWD (5U) /*!< Bit field size in bits for I2S_RCR4_SYWD. */
2624 /*! @brief Read current value of the I2S_RCR4_SYWD field. */
2625 #define BR_I2S_RCR4_SYWD(x) (HW_I2S_RCR4(x).B.SYWD)
2627 /*! @brief Format value for bitfield I2S_RCR4_SYWD. */
2628 #define BF_I2S_RCR4_SYWD(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_SYWD) & BM_I2S_RCR4_SYWD)
2630 /*! @brief Set the SYWD field to a new value. */
2631 #define BW_I2S_RCR4_SYWD(x, v) (HW_I2S_RCR4_WR(x, (HW_I2S_RCR4_RD(x) & ~BM_I2S_RCR4_SYWD) | BF_I2S_RCR4_SYWD(v)))
2635 * @name Register I2S_RCR4, field FRSZ[19:16] (RW)
2637 * Configures the number of words in each frame. The value written must be one
2638 * less than the number of words in the frame. For example, write 0 for one word
2639 * per frame. The maximum supported frame size is 16 words.
2642 #define BP_I2S_RCR4_FRSZ (16U) /*!< Bit position for I2S_RCR4_FRSZ. */
2643 #define BM_I2S_RCR4_FRSZ (0x000F0000U) /*!< Bit mask for I2S_RCR4_FRSZ. */
2644 #define BS_I2S_RCR4_FRSZ (4U) /*!< Bit field size in bits for I2S_RCR4_FRSZ. */
2646 /*! @brief Read current value of the I2S_RCR4_FRSZ field. */
2647 #define BR_I2S_RCR4_FRSZ(x) (HW_I2S_RCR4(x).B.FRSZ)
2649 /*! @brief Format value for bitfield I2S_RCR4_FRSZ. */
2650 #define BF_I2S_RCR4_FRSZ(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FRSZ) & BM_I2S_RCR4_FRSZ)
2652 /*! @brief Set the FRSZ field to a new value. */
2653 #define BW_I2S_RCR4_FRSZ(x, v) (HW_I2S_RCR4_WR(x, (HW_I2S_RCR4_RD(x) & ~BM_I2S_RCR4_FRSZ) | BF_I2S_RCR4_FRSZ(v)))
2657 * @name Register I2S_RCR4, field FPACK[25:24] (RW)
2659 * Enables packing of 8-bit data or 16-bit data into each 32-bit FIFO word. If
2660 * the word size is greater than 8-bit or 16-bit then only the first 8-bit or
2661 * 16-bits are stored to the FIFO. The first word in each frame always starts with a
2662 * new 32-bit FIFO word and the first bit shifted must be configured within the
2663 * first packed word. When FIFO packing is enabled, the FIFO read pointer will
2664 * only increment when the full 32-bit FIFO word has been read by software.
2667 * - 00 - FIFO packing is disabled
2669 * - 10 - 8-bit FIFO packing is enabled
2670 * - 11 - 16-bit FIFO packing is enabled
2673 #define BP_I2S_RCR4_FPACK (24U) /*!< Bit position for I2S_RCR4_FPACK. */
2674 #define BM_I2S_RCR4_FPACK (0x03000000U) /*!< Bit mask for I2S_RCR4_FPACK. */
2675 #define BS_I2S_RCR4_FPACK (2U) /*!< Bit field size in bits for I2S_RCR4_FPACK. */
2677 /*! @brief Read current value of the I2S_RCR4_FPACK field. */
2678 #define BR_I2S_RCR4_FPACK(x) (HW_I2S_RCR4(x).B.FPACK)
2680 /*! @brief Format value for bitfield I2S_RCR4_FPACK. */
2681 #define BF_I2S_RCR4_FPACK(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FPACK) & BM_I2S_RCR4_FPACK)
2683 /*! @brief Set the FPACK field to a new value. */
2684 #define BW_I2S_RCR4_FPACK(x, v) (HW_I2S_RCR4_WR(x, (HW_I2S_RCR4_RD(x) & ~BM_I2S_RCR4_FPACK) | BF_I2S_RCR4_FPACK(v)))
2688 * @name Register I2S_RCR4, field FCONT[28] (RW)
2690 * Configures when the SAI will continue receiving after a FIFO error has been
2694 * - 0 - On FIFO error, the SAI will continue from the start of the next frame
2695 * after the FIFO error flag has been cleared.
2696 * - 1 - On FIFO error, the SAI will continue from the same word that caused the
2697 * FIFO error to set after the FIFO warning flag has been cleared.
2700 #define BP_I2S_RCR4_FCONT (28U) /*!< Bit position for I2S_RCR4_FCONT. */
2701 #define BM_I2S_RCR4_FCONT (0x10000000U) /*!< Bit mask for I2S_RCR4_FCONT. */
2702 #define BS_I2S_RCR4_FCONT (1U) /*!< Bit field size in bits for I2S_RCR4_FCONT. */
2704 /*! @brief Read current value of the I2S_RCR4_FCONT field. */
2705 #define BR_I2S_RCR4_FCONT(x) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FCONT))
2707 /*! @brief Format value for bitfield I2S_RCR4_FCONT. */
2708 #define BF_I2S_RCR4_FCONT(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR4_FCONT) & BM_I2S_RCR4_FCONT)
2710 /*! @brief Set the FCONT field to a new value. */
2711 #define BW_I2S_RCR4_FCONT(x, v) (BITBAND_ACCESS32(HW_I2S_RCR4_ADDR(x), BP_I2S_RCR4_FCONT) = (v))
2714 /*******************************************************************************
2715 * HW_I2S_RCR5 - SAI Receive Configuration 5 Register
2716 ******************************************************************************/
2719 * @brief HW_I2S_RCR5 - SAI Receive Configuration 5 Register (RW)
2721 * Reset value: 0x00000000U
2723 * This register must not be altered when RCSR[RE] is set.
2725 typedef union _hw_i2s_rcr5
2728 struct _hw_i2s_rcr5_bitfields
2730 uint32_t RESERVED0
: 8; /*!< [7:0] */
2731 uint32_t FBT
: 5; /*!< [12:8] First Bit Shifted */
2732 uint32_t RESERVED1
: 3; /*!< [15:13] */
2733 uint32_t W0W
: 5; /*!< [20:16] Word 0 Width */
2734 uint32_t RESERVED2
: 3; /*!< [23:21] */
2735 uint32_t WNW
: 5; /*!< [28:24] Word N Width */
2736 uint32_t RESERVED3
: 3; /*!< [31:29] */
2741 * @name Constants and macros for entire I2S_RCR5 register
2744 #define HW_I2S_RCR5_ADDR(x) ((x) + 0x94U)
2746 #define HW_I2S_RCR5(x) (*(__IO hw_i2s_rcr5_t *) HW_I2S_RCR5_ADDR(x))
2747 #define HW_I2S_RCR5_RD(x) (HW_I2S_RCR5(x).U)
2748 #define HW_I2S_RCR5_WR(x, v) (HW_I2S_RCR5(x).U = (v))
2749 #define HW_I2S_RCR5_SET(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) | (v)))
2750 #define HW_I2S_RCR5_CLR(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) & ~(v)))
2751 #define HW_I2S_RCR5_TOG(x, v) (HW_I2S_RCR5_WR(x, HW_I2S_RCR5_RD(x) ^ (v)))
2755 * Constants & macros for individual I2S_RCR5 bitfields
2759 * @name Register I2S_RCR5, field FBT[12:8] (RW)
2761 * Configures the bit index for the first bit received for each word in the
2762 * frame. If configured for MSB First, the index of the next bit received is one less
2763 * than the current bit received. If configured for LSB First, the index of the
2764 * next bit received is one more than the current bit received. The value written
2765 * must be greater than or equal to the word width when configured for MSB
2766 * First. The value written must be less than or equal to 31-word width when
2767 * configured for LSB First.
2770 #define BP_I2S_RCR5_FBT (8U) /*!< Bit position for I2S_RCR5_FBT. */
2771 #define BM_I2S_RCR5_FBT (0x00001F00U) /*!< Bit mask for I2S_RCR5_FBT. */
2772 #define BS_I2S_RCR5_FBT (5U) /*!< Bit field size in bits for I2S_RCR5_FBT. */
2774 /*! @brief Read current value of the I2S_RCR5_FBT field. */
2775 #define BR_I2S_RCR5_FBT(x) (HW_I2S_RCR5(x).B.FBT)
2777 /*! @brief Format value for bitfield I2S_RCR5_FBT. */
2778 #define BF_I2S_RCR5_FBT(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR5_FBT) & BM_I2S_RCR5_FBT)
2780 /*! @brief Set the FBT field to a new value. */
2781 #define BW_I2S_RCR5_FBT(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_FBT) | BF_I2S_RCR5_FBT(v)))
2785 * @name Register I2S_RCR5, field W0W[20:16] (RW)
2787 * Configures the number of bits in the first word in each frame. The value
2788 * written must be one less than the number of bits in the first word. Word width of
2789 * less than 8 bits is not supported if there is only one word per frame.
2792 #define BP_I2S_RCR5_W0W (16U) /*!< Bit position for I2S_RCR5_W0W. */
2793 #define BM_I2S_RCR5_W0W (0x001F0000U) /*!< Bit mask for I2S_RCR5_W0W. */
2794 #define BS_I2S_RCR5_W0W (5U) /*!< Bit field size in bits for I2S_RCR5_W0W. */
2796 /*! @brief Read current value of the I2S_RCR5_W0W field. */
2797 #define BR_I2S_RCR5_W0W(x) (HW_I2S_RCR5(x).B.W0W)
2799 /*! @brief Format value for bitfield I2S_RCR5_W0W. */
2800 #define BF_I2S_RCR5_W0W(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR5_W0W) & BM_I2S_RCR5_W0W)
2802 /*! @brief Set the W0W field to a new value. */
2803 #define BW_I2S_RCR5_W0W(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_W0W) | BF_I2S_RCR5_W0W(v)))
2807 * @name Register I2S_RCR5, field WNW[28:24] (RW)
2809 * Configures the number of bits in each word, for each word except the first in
2810 * the frame. The value written must be one less than the number of bits per
2811 * word. Word width of less than 8 bits is not supported.
2814 #define BP_I2S_RCR5_WNW (24U) /*!< Bit position for I2S_RCR5_WNW. */
2815 #define BM_I2S_RCR5_WNW (0x1F000000U) /*!< Bit mask for I2S_RCR5_WNW. */
2816 #define BS_I2S_RCR5_WNW (5U) /*!< Bit field size in bits for I2S_RCR5_WNW. */
2818 /*! @brief Read current value of the I2S_RCR5_WNW field. */
2819 #define BR_I2S_RCR5_WNW(x) (HW_I2S_RCR5(x).B.WNW)
2821 /*! @brief Format value for bitfield I2S_RCR5_WNW. */
2822 #define BF_I2S_RCR5_WNW(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RCR5_WNW) & BM_I2S_RCR5_WNW)
2824 /*! @brief Set the WNW field to a new value. */
2825 #define BW_I2S_RCR5_WNW(x, v) (HW_I2S_RCR5_WR(x, (HW_I2S_RCR5_RD(x) & ~BM_I2S_RCR5_WNW) | BF_I2S_RCR5_WNW(v)))
2828 /*******************************************************************************
2829 * HW_I2S_RDRn - SAI Receive Data Register
2830 ******************************************************************************/
2833 * @brief HW_I2S_RDRn - SAI Receive Data Register (RO)
2835 * Reset value: 0x00000000U
2837 * Reading this register introduces one additional peripheral clock wait state
2840 typedef union _hw_i2s_rdrn
2843 struct _hw_i2s_rdrn_bitfields
2845 uint32_t RDR
: 32; /*!< [31:0] Receive Data Register */
2850 * @name Constants and macros for entire I2S_RDRn register
2853 #define HW_I2S_RDRn_COUNT (1U)
2855 #define HW_I2S_RDRn_ADDR(x, n) ((x) + 0xA0U + (0x4U * (n)))
2857 #define HW_I2S_RDRn(x, n) (*(__I hw_i2s_rdrn_t *) HW_I2S_RDRn_ADDR(x, n))
2858 #define HW_I2S_RDRn_RD(x, n) (HW_I2S_RDRn(x, n).U)
2862 * Constants & macros for individual I2S_RDRn bitfields
2866 * @name Register I2S_RDRn, field RDR[31:0] (RO)
2868 * The corresponding RCR3[RCE] bit must be set before accessing the channel's
2869 * receive data register. Reads from this register when the receive FIFO is not
2870 * empty will return the data from the top of the receive FIFO. Reads from this
2871 * register when the receive FIFO is empty are ignored.
2874 #define BP_I2S_RDRn_RDR (0U) /*!< Bit position for I2S_RDRn_RDR. */
2875 #define BM_I2S_RDRn_RDR (0xFFFFFFFFU) /*!< Bit mask for I2S_RDRn_RDR. */
2876 #define BS_I2S_RDRn_RDR (32U) /*!< Bit field size in bits for I2S_RDRn_RDR. */
2878 /*! @brief Read current value of the I2S_RDRn_RDR field. */
2879 #define BR_I2S_RDRn_RDR(x, n) (HW_I2S_RDRn(x, n).U)
2882 /*******************************************************************************
2883 * HW_I2S_RFRn - SAI Receive FIFO Register
2884 ******************************************************************************/
2887 * @brief HW_I2S_RFRn - SAI Receive FIFO Register (RO)
2889 * Reset value: 0x00000000U
2891 * The MSB of the read and write pointers is used to distinguish between FIFO
2892 * full and empty conditions. If the read and write pointers are identical, then
2893 * the FIFO is empty. If the read and write pointers are identical except for the
2894 * MSB, then the FIFO is full.
2896 typedef union _hw_i2s_rfrn
2899 struct _hw_i2s_rfrn_bitfields
2901 uint32_t RFP
: 4; /*!< [3:0] Read FIFO Pointer */
2902 uint32_t RESERVED0
: 12; /*!< [15:4] */
2903 uint32_t WFP
: 4; /*!< [19:16] Write FIFO Pointer */
2904 uint32_t RESERVED1
: 12; /*!< [31:20] */
2909 * @name Constants and macros for entire I2S_RFRn register
2912 #define HW_I2S_RFRn_COUNT (1U)
2914 #define HW_I2S_RFRn_ADDR(x, n) ((x) + 0xC0U + (0x4U * (n)))
2916 #define HW_I2S_RFRn(x, n) (*(__I hw_i2s_rfrn_t *) HW_I2S_RFRn_ADDR(x, n))
2917 #define HW_I2S_RFRn_RD(x, n) (HW_I2S_RFRn(x, n).U)
2921 * Constants & macros for individual I2S_RFRn bitfields
2925 * @name Register I2S_RFRn, field RFP[3:0] (RO)
2927 * FIFO read pointer for receive data channel.
2930 #define BP_I2S_RFRn_RFP (0U) /*!< Bit position for I2S_RFRn_RFP. */
2931 #define BM_I2S_RFRn_RFP (0x0000000FU) /*!< Bit mask for I2S_RFRn_RFP. */
2932 #define BS_I2S_RFRn_RFP (4U) /*!< Bit field size in bits for I2S_RFRn_RFP. */
2934 /*! @brief Read current value of the I2S_RFRn_RFP field. */
2935 #define BR_I2S_RFRn_RFP(x, n) (HW_I2S_RFRn(x, n).B.RFP)
2939 * @name Register I2S_RFRn, field WFP[19:16] (RO)
2941 * FIFO write pointer for receive data channel.
2944 #define BP_I2S_RFRn_WFP (16U) /*!< Bit position for I2S_RFRn_WFP. */
2945 #define BM_I2S_RFRn_WFP (0x000F0000U) /*!< Bit mask for I2S_RFRn_WFP. */
2946 #define BS_I2S_RFRn_WFP (4U) /*!< Bit field size in bits for I2S_RFRn_WFP. */
2948 /*! @brief Read current value of the I2S_RFRn_WFP field. */
2949 #define BR_I2S_RFRn_WFP(x, n) (HW_I2S_RFRn(x, n).B.WFP)
2952 /*******************************************************************************
2953 * HW_I2S_RMR - SAI Receive Mask Register
2954 ******************************************************************************/
2957 * @brief HW_I2S_RMR - SAI Receive Mask Register (RW)
2959 * Reset value: 0x00000000U
2961 * This register is double-buffered and updates: When RCSR[RE] is first set At
2962 * the end of each frame This allows the masked words in each frame to change from
2965 typedef union _hw_i2s_rmr
2968 struct _hw_i2s_rmr_bitfields
2970 uint32_t RWM
: 16; /*!< [15:0] Receive Word Mask */
2971 uint32_t RESERVED0
: 16; /*!< [31:16] */
2976 * @name Constants and macros for entire I2S_RMR register
2979 #define HW_I2S_RMR_ADDR(x) ((x) + 0xE0U)
2981 #define HW_I2S_RMR(x) (*(__IO hw_i2s_rmr_t *) HW_I2S_RMR_ADDR(x))
2982 #define HW_I2S_RMR_RD(x) (HW_I2S_RMR(x).U)
2983 #define HW_I2S_RMR_WR(x, v) (HW_I2S_RMR(x).U = (v))
2984 #define HW_I2S_RMR_SET(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) | (v)))
2985 #define HW_I2S_RMR_CLR(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) & ~(v)))
2986 #define HW_I2S_RMR_TOG(x, v) (HW_I2S_RMR_WR(x, HW_I2S_RMR_RD(x) ^ (v)))
2990 * Constants & macros for individual I2S_RMR bitfields
2994 * @name Register I2S_RMR, field RWM[15:0] (RW)
2996 * Configures whether the receive word is masked (received data ignored and not
2997 * written to receive FIFO) for the corresponding word in the frame.
3000 * - 0 - Word N is enabled.
3001 * - 1 - Word N is masked.
3004 #define BP_I2S_RMR_RWM (0U) /*!< Bit position for I2S_RMR_RWM. */
3005 #define BM_I2S_RMR_RWM (0x0000FFFFU) /*!< Bit mask for I2S_RMR_RWM. */
3006 #define BS_I2S_RMR_RWM (16U) /*!< Bit field size in bits for I2S_RMR_RWM. */
3008 /*! @brief Read current value of the I2S_RMR_RWM field. */
3009 #define BR_I2S_RMR_RWM(x) (HW_I2S_RMR(x).B.RWM)
3011 /*! @brief Format value for bitfield I2S_RMR_RWM. */
3012 #define BF_I2S_RMR_RWM(v) ((uint32_t)((uint32_t)(v) << BP_I2S_RMR_RWM) & BM_I2S_RMR_RWM)
3014 /*! @brief Set the RWM field to a new value. */
3015 #define BW_I2S_RMR_RWM(x, v) (HW_I2S_RMR_WR(x, (HW_I2S_RMR_RD(x) & ~BM_I2S_RMR_RWM) | BF_I2S_RMR_RWM(v)))
3018 /*******************************************************************************
3019 * HW_I2S_MCR - SAI MCLK Control Register
3020 ******************************************************************************/
3023 * @brief HW_I2S_MCR - SAI MCLK Control Register (RW)
3025 * Reset value: 0x00000000U
3027 * The MCLK Control Register (MCR) controls the clock source and direction of
3028 * the audio master clock.
3030 typedef union _hw_i2s_mcr
3033 struct _hw_i2s_mcr_bitfields
3035 uint32_t RESERVED0
: 24; /*!< [23:0] */
3036 uint32_t MICS
: 2; /*!< [25:24] MCLK Input Clock Select */
3037 uint32_t RESERVED1
: 4; /*!< [29:26] */
3038 uint32_t MOE
: 1; /*!< [30] MCLK Output Enable */
3039 uint32_t DUF
: 1; /*!< [31] Divider Update Flag */
3044 * @name Constants and macros for entire I2S_MCR register
3047 #define HW_I2S_MCR_ADDR(x) ((x) + 0x100U)
3049 #define HW_I2S_MCR(x) (*(__IO hw_i2s_mcr_t *) HW_I2S_MCR_ADDR(x))
3050 #define HW_I2S_MCR_RD(x) (HW_I2S_MCR(x).U)
3051 #define HW_I2S_MCR_WR(x, v) (HW_I2S_MCR(x).U = (v))
3052 #define HW_I2S_MCR_SET(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) | (v)))
3053 #define HW_I2S_MCR_CLR(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) & ~(v)))
3054 #define HW_I2S_MCR_TOG(x, v) (HW_I2S_MCR_WR(x, HW_I2S_MCR_RD(x) ^ (v)))
3058 * Constants & macros for individual I2S_MCR bitfields
3062 * @name Register I2S_MCR, field MICS[25:24] (RW)
3064 * Selects the clock input to the MCLK divider. This field cannot be changed
3065 * while the MCLK divider is enabled. See the chip configuration details for
3066 * information about the connections to these inputs.
3069 * - 00 - MCLK divider input clock 0 selected.
3070 * - 01 - MCLK divider input clock 1 selected.
3071 * - 10 - MCLK divider input clock 2 selected.
3072 * - 11 - MCLK divider input clock 3 selected.
3075 #define BP_I2S_MCR_MICS (24U) /*!< Bit position for I2S_MCR_MICS. */
3076 #define BM_I2S_MCR_MICS (0x03000000U) /*!< Bit mask for I2S_MCR_MICS. */
3077 #define BS_I2S_MCR_MICS (2U) /*!< Bit field size in bits for I2S_MCR_MICS. */
3079 /*! @brief Read current value of the I2S_MCR_MICS field. */
3080 #define BR_I2S_MCR_MICS(x) (HW_I2S_MCR(x).B.MICS)
3082 /*! @brief Format value for bitfield I2S_MCR_MICS. */
3083 #define BF_I2S_MCR_MICS(v) ((uint32_t)((uint32_t)(v) << BP_I2S_MCR_MICS) & BM_I2S_MCR_MICS)
3085 /*! @brief Set the MICS field to a new value. */
3086 #define BW_I2S_MCR_MICS(x, v) (HW_I2S_MCR_WR(x, (HW_I2S_MCR_RD(x) & ~BM_I2S_MCR_MICS) | BF_I2S_MCR_MICS(v)))
3090 * @name Register I2S_MCR, field MOE[30] (RW)
3092 * Enables the MCLK divider and configures the MCLK signal pin as an output.
3093 * When software clears this field, it remains set until the MCLK divider is fully
3097 * - 0 - MCLK signal pin is configured as an input that bypasses the MCLK
3099 * - 1 - MCLK signal pin is configured as an output from the MCLK divider and
3100 * the MCLK divider is enabled.
3103 #define BP_I2S_MCR_MOE (30U) /*!< Bit position for I2S_MCR_MOE. */
3104 #define BM_I2S_MCR_MOE (0x40000000U) /*!< Bit mask for I2S_MCR_MOE. */
3105 #define BS_I2S_MCR_MOE (1U) /*!< Bit field size in bits for I2S_MCR_MOE. */
3107 /*! @brief Read current value of the I2S_MCR_MOE field. */
3108 #define BR_I2S_MCR_MOE(x) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_MOE))
3110 /*! @brief Format value for bitfield I2S_MCR_MOE. */
3111 #define BF_I2S_MCR_MOE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_MCR_MOE) & BM_I2S_MCR_MOE)
3113 /*! @brief Set the MOE field to a new value. */
3114 #define BW_I2S_MCR_MOE(x, v) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_MOE) = (v))
3118 * @name Register I2S_MCR, field DUF[31] (RO)
3120 * Provides the status of on-the-fly updates to the MCLK divider ratio.
3123 * - 0 - MCLK divider ratio is not being updated currently.
3124 * - 1 - MCLK divider ratio is updating on-the-fly. Further updates to the MCLK
3125 * divider ratio are blocked while this flag remains set.
3128 #define BP_I2S_MCR_DUF (31U) /*!< Bit position for I2S_MCR_DUF. */
3129 #define BM_I2S_MCR_DUF (0x80000000U) /*!< Bit mask for I2S_MCR_DUF. */
3130 #define BS_I2S_MCR_DUF (1U) /*!< Bit field size in bits for I2S_MCR_DUF. */
3132 /*! @brief Read current value of the I2S_MCR_DUF field. */
3133 #define BR_I2S_MCR_DUF(x) (BITBAND_ACCESS32(HW_I2S_MCR_ADDR(x), BP_I2S_MCR_DUF))
3136 /*******************************************************************************
3137 * HW_I2S_MDR - SAI MCLK Divide Register
3138 ******************************************************************************/
3141 * @brief HW_I2S_MDR - SAI MCLK Divide Register (RW)
3143 * Reset value: 0x00000000U
3145 * The MCLK Divide Register (MDR) configures the MCLK divide ratio. Although the
3146 * MDR can be changed when the MCLK divider clock is enabled, additional writes
3147 * to the MDR are blocked while MCR[DUF] is set. Writes to the MDR when the MCLK
3148 * divided clock is disabled do not set MCR[DUF].
3150 typedef union _hw_i2s_mdr
3153 struct _hw_i2s_mdr_bitfields
3155 uint32_t DIVIDE
: 12; /*!< [11:0] MCLK Divide */
3156 uint32_t FRACT
: 8; /*!< [19:12] MCLK Fraction */
3157 uint32_t RESERVED0
: 12; /*!< [31:20] */
3162 * @name Constants and macros for entire I2S_MDR register
3165 #define HW_I2S_MDR_ADDR(x) ((x) + 0x104U)
3167 #define HW_I2S_MDR(x) (*(__IO hw_i2s_mdr_t *) HW_I2S_MDR_ADDR(x))
3168 #define HW_I2S_MDR_RD(x) (HW_I2S_MDR(x).U)
3169 #define HW_I2S_MDR_WR(x, v) (HW_I2S_MDR(x).U = (v))
3170 #define HW_I2S_MDR_SET(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) | (v)))
3171 #define HW_I2S_MDR_CLR(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) & ~(v)))
3172 #define HW_I2S_MDR_TOG(x, v) (HW_I2S_MDR_WR(x, HW_I2S_MDR_RD(x) ^ (v)))
3176 * Constants & macros for individual I2S_MDR bitfields
3180 * @name Register I2S_MDR, field DIVIDE[11:0] (RW)
3182 * Sets the MCLK divide ratio such that: MCLK output = MCLK input * ( (FRACT +
3183 * 1) / (DIVIDE + 1) ). FRACT must be set equal or less than the value in the
3187 #define BP_I2S_MDR_DIVIDE (0U) /*!< Bit position for I2S_MDR_DIVIDE. */
3188 #define BM_I2S_MDR_DIVIDE (0x00000FFFU) /*!< Bit mask for I2S_MDR_DIVIDE. */
3189 #define BS_I2S_MDR_DIVIDE (12U) /*!< Bit field size in bits for I2S_MDR_DIVIDE. */
3191 /*! @brief Read current value of the I2S_MDR_DIVIDE field. */
3192 #define BR_I2S_MDR_DIVIDE(x) (HW_I2S_MDR(x).B.DIVIDE)
3194 /*! @brief Format value for bitfield I2S_MDR_DIVIDE. */
3195 #define BF_I2S_MDR_DIVIDE(v) ((uint32_t)((uint32_t)(v) << BP_I2S_MDR_DIVIDE) & BM_I2S_MDR_DIVIDE)
3197 /*! @brief Set the DIVIDE field to a new value. */
3198 #define BW_I2S_MDR_DIVIDE(x, v) (HW_I2S_MDR_WR(x, (HW_I2S_MDR_RD(x) & ~BM_I2S_MDR_DIVIDE) | BF_I2S_MDR_DIVIDE(v)))
3202 * @name Register I2S_MDR, field FRACT[19:12] (RW)
3204 * Sets the MCLK divide ratio such that: MCLK output = MCLK input * ( (FRACT +
3205 * 1) / (DIVIDE + 1) ). FRACT must be set equal or less than the value in the
3209 #define BP_I2S_MDR_FRACT (12U) /*!< Bit position for I2S_MDR_FRACT. */
3210 #define BM_I2S_MDR_FRACT (0x000FF000U) /*!< Bit mask for I2S_MDR_FRACT. */
3211 #define BS_I2S_MDR_FRACT (8U) /*!< Bit field size in bits for I2S_MDR_FRACT. */
3213 /*! @brief Read current value of the I2S_MDR_FRACT field. */
3214 #define BR_I2S_MDR_FRACT(x) (HW_I2S_MDR(x).B.FRACT)
3216 /*! @brief Format value for bitfield I2S_MDR_FRACT. */
3217 #define BF_I2S_MDR_FRACT(v) ((uint32_t)((uint32_t)(v) << BP_I2S_MDR_FRACT) & BM_I2S_MDR_FRACT)
3219 /*! @brief Set the FRACT field to a new value. */
3220 #define BW_I2S_MDR_FRACT(x, v) (HW_I2S_MDR_WR(x, (HW_I2S_MDR_RD(x) & ~BM_I2S_MDR_FRACT) | BF_I2S_MDR_FRACT(v)))
3223 /*******************************************************************************
3224 * hw_i2s_t - module struct
3225 ******************************************************************************/
3227 * @brief All I2S module registers.
3230 typedef struct _hw_i2s
3232 __IO hw_i2s_tcsr_t TCSR
; /*!< [0x0] SAI Transmit Control Register */
3233 __IO hw_i2s_tcr1_t TCR1
; /*!< [0x4] SAI Transmit Configuration 1 Register */
3234 __IO hw_i2s_tcr2_t TCR2
; /*!< [0x8] SAI Transmit Configuration 2 Register */
3235 __IO hw_i2s_tcr3_t TCR3
; /*!< [0xC] SAI Transmit Configuration 3 Register */
3236 __IO hw_i2s_tcr4_t TCR4
; /*!< [0x10] SAI Transmit Configuration 4 Register */
3237 __IO hw_i2s_tcr5_t TCR5
; /*!< [0x14] SAI Transmit Configuration 5 Register */
3238 uint8_t _reserved0
[8];
3239 __O hw_i2s_tdrn_t TDRn
[1]; /*!< [0x20] SAI Transmit Data Register */
3240 uint8_t _reserved1
[28];
3241 __I hw_i2s_tfrn_t TFRn
[1]; /*!< [0x40] SAI Transmit FIFO Register */
3242 uint8_t _reserved2
[28];
3243 __IO hw_i2s_tmr_t TMR
; /*!< [0x60] SAI Transmit Mask Register */
3244 uint8_t _reserved3
[28];
3245 __IO hw_i2s_rcsr_t RCSR
; /*!< [0x80] SAI Receive Control Register */
3246 __IO hw_i2s_rcr1_t RCR1
; /*!< [0x84] SAI Receive Configuration 1 Register */
3247 __IO hw_i2s_rcr2_t RCR2
; /*!< [0x88] SAI Receive Configuration 2 Register */
3248 __IO hw_i2s_rcr3_t RCR3
; /*!< [0x8C] SAI Receive Configuration 3 Register */
3249 __IO hw_i2s_rcr4_t RCR4
; /*!< [0x90] SAI Receive Configuration 4 Register */
3250 __IO hw_i2s_rcr5_t RCR5
; /*!< [0x94] SAI Receive Configuration 5 Register */
3251 uint8_t _reserved4
[8];
3252 __I hw_i2s_rdrn_t RDRn
[1]; /*!< [0xA0] SAI Receive Data Register */
3253 uint8_t _reserved5
[28];
3254 __I hw_i2s_rfrn_t RFRn
[1]; /*!< [0xC0] SAI Receive FIFO Register */
3255 uint8_t _reserved6
[28];
3256 __IO hw_i2s_rmr_t RMR
; /*!< [0xE0] SAI Receive Mask Register */
3257 uint8_t _reserved7
[28];
3258 __IO hw_i2s_mcr_t MCR
; /*!< [0x100] SAI MCLK Control Register */
3259 __IO hw_i2s_mdr_t MDR
; /*!< [0x104] SAI MCLK Divide Register */
3263 /*! @brief Macro to access all I2S registers. */
3264 /*! @param x I2S module instance base address. */
3265 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
3266 * use the '&' operator, like <code>&HW_I2S(I2S0_BASE)</code>. */
3267 #define HW_I2S(x) (*(hw_i2s_t *)(x))
3269 #endif /* __HW_I2S_REGISTERS_H__ */