1 /***************************************************************************//** 2 * \file cyip_i2s_v2.h 3 * 4 * \brief 5 * I2S IP definitions 6 * 7 ******************************************************************************** 8 * \copyright 9 * (c) (2016-2023), Cypress Semiconductor Corporation (an Infineon company) or 10 * an affiliate of Cypress Semiconductor Corporation. 11 * 12 * SPDX-License-Identifier: Apache-2.0 13 * 14 * Licensed under the Apache License, Version 2.0 (the "License"); 15 * you may not use this file except in compliance with the License. 16 * You may obtain a copy of the License at 17 * 18 * http://www.apache.org/licenses/LICENSE-2.0 19 * 20 * Unless required by applicable law or agreed to in writing, software 21 * distributed under the License is distributed on an "AS IS" BASIS, 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 * See the License for the specific language governing permissions and 24 * limitations under the License. 25 *******************************************************************************/ 26 27 #ifndef _CYIP_I2S_V2_H_ 28 #define _CYIP_I2S_V2_H_ 29 30 #include "cyip_headers.h" 31 32 /******************************************************************************* 33 * I2S 34 *******************************************************************************/ 35 36 #define I2S_SECTION_SIZE 0x00001000UL 37 38 /** 39 * \brief I2S registers (I2S) 40 */ 41 typedef struct { 42 __IOM uint32_t CTL; /*!< 0x00000000 Control */ 43 __IM uint32_t RESERVED[3]; 44 __IOM uint32_t CLOCK_CTL; /*!< 0x00000010 Clock control */ 45 __IM uint32_t CLOCK_STAT; /*!< 0x00000014 Clock Status */ 46 __IM uint32_t RESERVED1[2]; 47 __IOM uint32_t CMD; /*!< 0x00000020 Command */ 48 __IM uint32_t RESERVED2[7]; 49 __IOM uint32_t TR_CTL; /*!< 0x00000040 Trigger control */ 50 __IM uint32_t RESERVED3[15]; 51 __IOM uint32_t TX_CTL; /*!< 0x00000080 Transmitter control */ 52 __IOM uint32_t TX_WATCHDOG; /*!< 0x00000084 Transmitter watchdog */ 53 __IM uint32_t RESERVED4[6]; 54 __IOM uint32_t RX_CTL; /*!< 0x000000A0 Receiver control */ 55 __IOM uint32_t RX_WATCHDOG; /*!< 0x000000A4 Receiver watchdog */ 56 __IM uint32_t RESERVED5[86]; 57 __IOM uint32_t TX_FIFO_CTL; /*!< 0x00000200 TX FIFO control */ 58 __IM uint32_t TX_FIFO_STATUS; /*!< 0x00000204 TX FIFO status */ 59 __OM uint32_t TX_FIFO_WR; /*!< 0x00000208 TX FIFO write */ 60 __IM uint32_t RESERVED6[61]; 61 __IOM uint32_t RX_FIFO_CTL; /*!< 0x00000300 RX FIFO control */ 62 __IM uint32_t RX_FIFO_STATUS; /*!< 0x00000304 RX FIFO status */ 63 __IM uint32_t RX_FIFO_RD; /*!< 0x00000308 RX FIFO read */ 64 __IM uint32_t RX_FIFO_RD_SILENT; /*!< 0x0000030C RX FIFO silent read */ 65 __IM uint32_t RESERVED7[764]; 66 __IOM uint32_t INTR; /*!< 0x00000F00 Interrupt register */ 67 __IOM uint32_t INTR_SET; /*!< 0x00000F04 Interrupt set register */ 68 __IOM uint32_t INTR_MASK; /*!< 0x00000F08 Interrupt mask register */ 69 __IM uint32_t INTR_MASKED; /*!< 0x00000F0C Interrupt masked register */ 70 } I2S_Type; /*!< Size = 3856 (0xF10) */ 71 72 73 /* I2S.CTL */ 74 #define I2S_CTL_TX_ENABLED_Pos 30UL 75 #define I2S_CTL_TX_ENABLED_Msk 0x40000000UL 76 #define I2S_CTL_RX_ENABLED_Pos 31UL 77 #define I2S_CTL_RX_ENABLED_Msk 0x80000000UL 78 /* I2S.CLOCK_CTL */ 79 #define I2S_CLOCK_CTL_CLOCK_DIV_Pos 0UL 80 #define I2S_CLOCK_CTL_CLOCK_DIV_Msk 0x3FUL 81 #define I2S_CLOCK_CTL_CLOCK_SEL_Pos 8UL 82 #define I2S_CLOCK_CTL_CLOCK_SEL_Msk 0x100UL 83 #define I2S_CLOCK_CTL_MCLK_DIV_Pos 12UL 84 #define I2S_CLOCK_CTL_MCLK_DIV_Msk 0x3000UL 85 #define I2S_CLOCK_CTL_MCLK_EN_Pos 16UL 86 #define I2S_CLOCK_CTL_MCLK_EN_Msk 0x10000UL 87 /* I2S.CLOCK_STAT */ 88 #define I2S_CLOCK_STAT_MCLK_DIV_OFF_Pos 0UL 89 #define I2S_CLOCK_STAT_MCLK_DIV_OFF_Msk 0x1UL 90 /* I2S.CMD */ 91 #define I2S_CMD_TX_START_Pos 0UL 92 #define I2S_CMD_TX_START_Msk 0x1UL 93 #define I2S_CMD_TX_PAUSE_Pos 8UL 94 #define I2S_CMD_TX_PAUSE_Msk 0x100UL 95 #define I2S_CMD_RX_START_Pos 16UL 96 #define I2S_CMD_RX_START_Msk 0x10000UL 97 /* I2S.TR_CTL */ 98 #define I2S_TR_CTL_TX_REQ_EN_Pos 0UL 99 #define I2S_TR_CTL_TX_REQ_EN_Msk 0x1UL 100 #define I2S_TR_CTL_RX_REQ_EN_Pos 16UL 101 #define I2S_TR_CTL_RX_REQ_EN_Msk 0x10000UL 102 /* I2S.TX_CTL */ 103 #define I2S_TX_CTL_B_CLOCK_INV_Pos 3UL 104 #define I2S_TX_CTL_B_CLOCK_INV_Msk 0x8UL 105 #define I2S_TX_CTL_CH_NR_Pos 4UL 106 #define I2S_TX_CTL_CH_NR_Msk 0x70UL 107 #define I2S_TX_CTL_MS_Pos 7UL 108 #define I2S_TX_CTL_MS_Msk 0x80UL 109 #define I2S_TX_CTL_I2S_MODE_Pos 8UL 110 #define I2S_TX_CTL_I2S_MODE_Msk 0x300UL 111 #define I2S_TX_CTL_WS_PULSE_Pos 10UL 112 #define I2S_TX_CTL_WS_PULSE_Msk 0x400UL 113 #define I2S_TX_CTL_OVHDATA_Pos 12UL 114 #define I2S_TX_CTL_OVHDATA_Msk 0x1000UL 115 #define I2S_TX_CTL_WD_EN_Pos 13UL 116 #define I2S_TX_CTL_WD_EN_Msk 0x2000UL 117 #define I2S_TX_CTL_CH_LEN_Pos 16UL 118 #define I2S_TX_CTL_CH_LEN_Msk 0x70000UL 119 #define I2S_TX_CTL_WORD_LEN_Pos 20UL 120 #define I2S_TX_CTL_WORD_LEN_Msk 0x700000UL 121 #define I2S_TX_CTL_SCKO_POL_Pos 24UL 122 #define I2S_TX_CTL_SCKO_POL_Msk 0x1000000UL 123 #define I2S_TX_CTL_SCKI_POL_Pos 25UL 124 #define I2S_TX_CTL_SCKI_POL_Msk 0x2000000UL 125 /* I2S.TX_WATCHDOG */ 126 #define I2S_TX_WATCHDOG_WD_COUNTER_Pos 0UL 127 #define I2S_TX_WATCHDOG_WD_COUNTER_Msk 0xFFFFFFFFUL 128 /* I2S.RX_CTL */ 129 #define I2S_RX_CTL_B_CLOCK_INV_Pos 3UL 130 #define I2S_RX_CTL_B_CLOCK_INV_Msk 0x8UL 131 #define I2S_RX_CTL_CH_NR_Pos 4UL 132 #define I2S_RX_CTL_CH_NR_Msk 0x70UL 133 #define I2S_RX_CTL_MS_Pos 7UL 134 #define I2S_RX_CTL_MS_Msk 0x80UL 135 #define I2S_RX_CTL_I2S_MODE_Pos 8UL 136 #define I2S_RX_CTL_I2S_MODE_Msk 0x300UL 137 #define I2S_RX_CTL_WS_PULSE_Pos 10UL 138 #define I2S_RX_CTL_WS_PULSE_Msk 0x400UL 139 #define I2S_RX_CTL_WD_EN_Pos 13UL 140 #define I2S_RX_CTL_WD_EN_Msk 0x2000UL 141 #define I2S_RX_CTL_CH_LEN_Pos 16UL 142 #define I2S_RX_CTL_CH_LEN_Msk 0x70000UL 143 #define I2S_RX_CTL_WORD_LEN_Pos 20UL 144 #define I2S_RX_CTL_WORD_LEN_Msk 0x700000UL 145 #define I2S_RX_CTL_BIT_EXTENSION_Pos 23UL 146 #define I2S_RX_CTL_BIT_EXTENSION_Msk 0x800000UL 147 #define I2S_RX_CTL_SCKO_POL_Pos 24UL 148 #define I2S_RX_CTL_SCKO_POL_Msk 0x1000000UL 149 #define I2S_RX_CTL_SCKI_POL_Pos 25UL 150 #define I2S_RX_CTL_SCKI_POL_Msk 0x2000000UL 151 /* I2S.RX_WATCHDOG */ 152 #define I2S_RX_WATCHDOG_WD_COUNTER_Pos 0UL 153 #define I2S_RX_WATCHDOG_WD_COUNTER_Msk 0xFFFFFFFFUL 154 /* I2S.TX_FIFO_CTL */ 155 #define I2S_TX_FIFO_CTL_TRIGGER_LEVEL_Pos 0UL 156 #define I2S_TX_FIFO_CTL_TRIGGER_LEVEL_Msk 0xFFUL 157 #define I2S_TX_FIFO_CTL_CLEAR_Pos 16UL 158 #define I2S_TX_FIFO_CTL_CLEAR_Msk 0x10000UL 159 #define I2S_TX_FIFO_CTL_FREEZE_Pos 17UL 160 #define I2S_TX_FIFO_CTL_FREEZE_Msk 0x20000UL 161 /* I2S.TX_FIFO_STATUS */ 162 #define I2S_TX_FIFO_STATUS_USED_Pos 0UL 163 #define I2S_TX_FIFO_STATUS_USED_Msk 0x1FFUL 164 #define I2S_TX_FIFO_STATUS_RD_PTR_Pos 16UL 165 #define I2S_TX_FIFO_STATUS_RD_PTR_Msk 0xFF0000UL 166 #define I2S_TX_FIFO_STATUS_WR_PTR_Pos 24UL 167 #define I2S_TX_FIFO_STATUS_WR_PTR_Msk 0xFF000000UL 168 /* I2S.TX_FIFO_WR */ 169 #define I2S_TX_FIFO_WR_DATA_Pos 0UL 170 #define I2S_TX_FIFO_WR_DATA_Msk 0xFFFFFFFFUL 171 /* I2S.RX_FIFO_CTL */ 172 #define I2S_RX_FIFO_CTL_TRIGGER_LEVEL_Pos 0UL 173 #define I2S_RX_FIFO_CTL_TRIGGER_LEVEL_Msk 0xFFUL 174 #define I2S_RX_FIFO_CTL_CLEAR_Pos 16UL 175 #define I2S_RX_FIFO_CTL_CLEAR_Msk 0x10000UL 176 #define I2S_RX_FIFO_CTL_FREEZE_Pos 17UL 177 #define I2S_RX_FIFO_CTL_FREEZE_Msk 0x20000UL 178 /* I2S.RX_FIFO_STATUS */ 179 #define I2S_RX_FIFO_STATUS_USED_Pos 0UL 180 #define I2S_RX_FIFO_STATUS_USED_Msk 0x1FFUL 181 #define I2S_RX_FIFO_STATUS_RD_PTR_Pos 16UL 182 #define I2S_RX_FIFO_STATUS_RD_PTR_Msk 0xFF0000UL 183 #define I2S_RX_FIFO_STATUS_WR_PTR_Pos 24UL 184 #define I2S_RX_FIFO_STATUS_WR_PTR_Msk 0xFF000000UL 185 /* I2S.RX_FIFO_RD */ 186 #define I2S_RX_FIFO_RD_DATA_Pos 0UL 187 #define I2S_RX_FIFO_RD_DATA_Msk 0xFFFFFFFFUL 188 /* I2S.RX_FIFO_RD_SILENT */ 189 #define I2S_RX_FIFO_RD_SILENT_DATA_Pos 0UL 190 #define I2S_RX_FIFO_RD_SILENT_DATA_Msk 0xFFFFFFFFUL 191 /* I2S.INTR */ 192 #define I2S_INTR_TX_TRIGGER_Pos 0UL 193 #define I2S_INTR_TX_TRIGGER_Msk 0x1UL 194 #define I2S_INTR_TX_NOT_FULL_Pos 1UL 195 #define I2S_INTR_TX_NOT_FULL_Msk 0x2UL 196 #define I2S_INTR_TX_EMPTY_Pos 4UL 197 #define I2S_INTR_TX_EMPTY_Msk 0x10UL 198 #define I2S_INTR_TX_OVERFLOW_Pos 5UL 199 #define I2S_INTR_TX_OVERFLOW_Msk 0x20UL 200 #define I2S_INTR_TX_UNDERFLOW_Pos 6UL 201 #define I2S_INTR_TX_UNDERFLOW_Msk 0x40UL 202 #define I2S_INTR_TX_WD_Pos 8UL 203 #define I2S_INTR_TX_WD_Msk 0x100UL 204 #define I2S_INTR_RX_TRIGGER_Pos 16UL 205 #define I2S_INTR_RX_TRIGGER_Msk 0x10000UL 206 #define I2S_INTR_RX_NOT_EMPTY_Pos 18UL 207 #define I2S_INTR_RX_NOT_EMPTY_Msk 0x40000UL 208 #define I2S_INTR_RX_FULL_Pos 19UL 209 #define I2S_INTR_RX_FULL_Msk 0x80000UL 210 #define I2S_INTR_RX_OVERFLOW_Pos 21UL 211 #define I2S_INTR_RX_OVERFLOW_Msk 0x200000UL 212 #define I2S_INTR_RX_UNDERFLOW_Pos 22UL 213 #define I2S_INTR_RX_UNDERFLOW_Msk 0x400000UL 214 #define I2S_INTR_RX_WD_Pos 24UL 215 #define I2S_INTR_RX_WD_Msk 0x1000000UL 216 /* I2S.INTR_SET */ 217 #define I2S_INTR_SET_TX_TRIGGER_Pos 0UL 218 #define I2S_INTR_SET_TX_TRIGGER_Msk 0x1UL 219 #define I2S_INTR_SET_TX_NOT_FULL_Pos 1UL 220 #define I2S_INTR_SET_TX_NOT_FULL_Msk 0x2UL 221 #define I2S_INTR_SET_TX_EMPTY_Pos 4UL 222 #define I2S_INTR_SET_TX_EMPTY_Msk 0x10UL 223 #define I2S_INTR_SET_TX_OVERFLOW_Pos 5UL 224 #define I2S_INTR_SET_TX_OVERFLOW_Msk 0x20UL 225 #define I2S_INTR_SET_TX_UNDERFLOW_Pos 6UL 226 #define I2S_INTR_SET_TX_UNDERFLOW_Msk 0x40UL 227 #define I2S_INTR_SET_TX_WD_Pos 8UL 228 #define I2S_INTR_SET_TX_WD_Msk 0x100UL 229 #define I2S_INTR_SET_RX_TRIGGER_Pos 16UL 230 #define I2S_INTR_SET_RX_TRIGGER_Msk 0x10000UL 231 #define I2S_INTR_SET_RX_NOT_EMPTY_Pos 18UL 232 #define I2S_INTR_SET_RX_NOT_EMPTY_Msk 0x40000UL 233 #define I2S_INTR_SET_RX_FULL_Pos 19UL 234 #define I2S_INTR_SET_RX_FULL_Msk 0x80000UL 235 #define I2S_INTR_SET_RX_OVERFLOW_Pos 21UL 236 #define I2S_INTR_SET_RX_OVERFLOW_Msk 0x200000UL 237 #define I2S_INTR_SET_RX_UNDERFLOW_Pos 22UL 238 #define I2S_INTR_SET_RX_UNDERFLOW_Msk 0x400000UL 239 #define I2S_INTR_SET_RX_WD_Pos 24UL 240 #define I2S_INTR_SET_RX_WD_Msk 0x1000000UL 241 /* I2S.INTR_MASK */ 242 #define I2S_INTR_MASK_TX_TRIGGER_Pos 0UL 243 #define I2S_INTR_MASK_TX_TRIGGER_Msk 0x1UL 244 #define I2S_INTR_MASK_TX_NOT_FULL_Pos 1UL 245 #define I2S_INTR_MASK_TX_NOT_FULL_Msk 0x2UL 246 #define I2S_INTR_MASK_TX_EMPTY_Pos 4UL 247 #define I2S_INTR_MASK_TX_EMPTY_Msk 0x10UL 248 #define I2S_INTR_MASK_TX_OVERFLOW_Pos 5UL 249 #define I2S_INTR_MASK_TX_OVERFLOW_Msk 0x20UL 250 #define I2S_INTR_MASK_TX_UNDERFLOW_Pos 6UL 251 #define I2S_INTR_MASK_TX_UNDERFLOW_Msk 0x40UL 252 #define I2S_INTR_MASK_TX_WD_Pos 8UL 253 #define I2S_INTR_MASK_TX_WD_Msk 0x100UL 254 #define I2S_INTR_MASK_RX_TRIGGER_Pos 16UL 255 #define I2S_INTR_MASK_RX_TRIGGER_Msk 0x10000UL 256 #define I2S_INTR_MASK_RX_NOT_EMPTY_Pos 18UL 257 #define I2S_INTR_MASK_RX_NOT_EMPTY_Msk 0x40000UL 258 #define I2S_INTR_MASK_RX_FULL_Pos 19UL 259 #define I2S_INTR_MASK_RX_FULL_Msk 0x80000UL 260 #define I2S_INTR_MASK_RX_OVERFLOW_Pos 21UL 261 #define I2S_INTR_MASK_RX_OVERFLOW_Msk 0x200000UL 262 #define I2S_INTR_MASK_RX_UNDERFLOW_Pos 22UL 263 #define I2S_INTR_MASK_RX_UNDERFLOW_Msk 0x400000UL 264 #define I2S_INTR_MASK_RX_WD_Pos 24UL 265 #define I2S_INTR_MASK_RX_WD_Msk 0x1000000UL 266 /* I2S.INTR_MASKED */ 267 #define I2S_INTR_MASKED_TX_TRIGGER_Pos 0UL 268 #define I2S_INTR_MASKED_TX_TRIGGER_Msk 0x1UL 269 #define I2S_INTR_MASKED_TX_NOT_FULL_Pos 1UL 270 #define I2S_INTR_MASKED_TX_NOT_FULL_Msk 0x2UL 271 #define I2S_INTR_MASKED_TX_EMPTY_Pos 4UL 272 #define I2S_INTR_MASKED_TX_EMPTY_Msk 0x10UL 273 #define I2S_INTR_MASKED_TX_OVERFLOW_Pos 5UL 274 #define I2S_INTR_MASKED_TX_OVERFLOW_Msk 0x20UL 275 #define I2S_INTR_MASKED_TX_UNDERFLOW_Pos 6UL 276 #define I2S_INTR_MASKED_TX_UNDERFLOW_Msk 0x40UL 277 #define I2S_INTR_MASKED_TX_WD_Pos 8UL 278 #define I2S_INTR_MASKED_TX_WD_Msk 0x100UL 279 #define I2S_INTR_MASKED_RX_TRIGGER_Pos 16UL 280 #define I2S_INTR_MASKED_RX_TRIGGER_Msk 0x10000UL 281 #define I2S_INTR_MASKED_RX_NOT_EMPTY_Pos 18UL 282 #define I2S_INTR_MASKED_RX_NOT_EMPTY_Msk 0x40000UL 283 #define I2S_INTR_MASKED_RX_FULL_Pos 19UL 284 #define I2S_INTR_MASKED_RX_FULL_Msk 0x80000UL 285 #define I2S_INTR_MASKED_RX_OVERFLOW_Pos 21UL 286 #define I2S_INTR_MASKED_RX_OVERFLOW_Msk 0x200000UL 287 #define I2S_INTR_MASKED_RX_UNDERFLOW_Pos 22UL 288 #define I2S_INTR_MASKED_RX_UNDERFLOW_Msk 0x400000UL 289 #define I2S_INTR_MASKED_RX_WD_Pos 24UL 290 #define I2S_INTR_MASKED_RX_WD_Msk 0x1000000UL 291 292 293 #endif /* _CYIP_I2S_V2_H_ */ 294 295 296 /* [] END OF FILE */ 297