STM32F469I-Discovery BSP User Manual: STM32469I Discovery AUDIO Exported Constants

STM32F469I-Discovery BSP Drivers

STM32F469I-Discovery BSP User Manual
STM32469I Discovery AUDIO Exported Constants

Modules

 BSP AUDIO OUT Option
 STM32469I Discovery Audio Slot TDM mode
 

In W8994 codec the Audio frame contains 4 slots : TDM Mode TDM format : +------------------|------------------|--------------------|-------------------+ | CODEC_SLOT0 Left | CODEC_SLOT1 Left | CODEC_SLOT0 Right | CODEC_SLOT1 Right | +------------------------------------------------------------------------------+.

Defines

#define AUDIO_SAIx   SAI1_Block_A
#define AUDIO_SAIx_CLK_ENABLE()   __HAL_RCC_SAI1_CLK_ENABLE()
#define AUDIO_SAIx_CLK_DISABLE()   __HAL_RCC_SAI1_CLK_DISABLE()
#define AUDIO_SAIx_MCLK_SCK_SD_FS_AF   GPIO_AF6_SAI1
#define AUDIO_SAIx_MCLK_ENABLE()   __HAL_RCC_GPIOG_CLK_ENABLE()
#define AUDIO_SAIx_MCLK_DISABLE()   __HAL_RCC_GPIOG_CLK_DISABLE()
#define AUDIO_SAIx_MCK_PIN   GPIO_PIN_7
#define AUDIO_SAIx_MCLK_GPIO_PORT   GPIOG
#define AUDIO_SAIx_SCK_SD_FS_ENABLE()   __HAL_RCC_GPIOE_CLK_ENABLE()
#define AUDIO_SAIx_SCK_SD_FS_DISABLE()   __HAL_RCC_GPIOE_CLK_DISABLE()
#define AUDIO_SAIx_FS_PIN   GPIO_PIN_4
#define AUDIO_SAIx_SCK_PIN   GPIO_PIN_5
#define AUDIO_SAIx_SD_PIN   GPIO_PIN_6
#define AUDIO_SAIx_SCK_SD_FS_GPIO_PORT   GPIOE
#define AUDIO_RESET_ENABLE()   __HAL_RCC_GPIOE_CLK_ENABLE()
#define AUDIO_RESET_DISABLE()   __HAL_RCC_GPIOE_CLK_DISABLE()
#define AUDIO_RESET_PIN   GPIO_PIN_2
#define AUDIO_RESET_GPIO_PORT   GPIOE
#define AUDIO_SAIx_DMAx_CLK_ENABLE()   __HAL_RCC_DMA2_CLK_ENABLE()
#define AUDIO_SAIx_DMAx_CLK_DISABLE()   __HAL_RCC_DMA2_CLK_DISABLE()
#define AUDIO_SAIx_DMAx_STREAM   DMA2_Stream3
#define AUDIO_SAIx_DMAx_CHANNEL   DMA_CHANNEL_0
#define AUDIO_SAIx_DMAx_IRQ   DMA2_Stream3_IRQn
#define AUDIO_SAIx_DMAx_PERIPH_DATA_SIZE   DMA_PDATAALIGN_HALFWORD
#define AUDIO_SAIx_DMAx_MEM_DATA_SIZE   DMA_MDATAALIGN_HALFWORD
#define DMA_MAX_SZE   0xFFFF
#define AUDIO_SAIx_DMAx_IRQHandler   DMA2_Stream3_IRQHandler
#define AUDIO_OUT_IRQ_PREPRIO   5 /* Select the preemption priority level(0 is the highest) */
#define AUDIO_SAIx_PLL_DISABLE()   HAL_RCCEx_DisablePLLSAI1()
#define AUDIO_I2Sx   SPI3
#define AUDIO_I2Sx_CLK_ENABLE()   __HAL_RCC_SPI3_CLK_ENABLE()
#define AUDIO_I2Sx_CLK_DISABLE()   __HAL_RCC_SPI3_CLK_DISABLE()
#define AUDIO_I2Sx_SCK_PIN   GPIO_PIN_3
#define AUDIO_I2Sx_SCK_GPIO_PORT   GPIOB
#define AUDIO_I2Sx_SCK_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOB_CLK_ENABLE()
#define AUDIO_I2Sx_SCK_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOB_CLK_DISABLE()
#define AUDIO_I2Sx_SCK_AF   GPIO_AF6_SPI3
#define AUDIO_I2Sx_SD_PIN   GPIO_PIN_6
#define AUDIO_I2Sx_SD_GPIO_PORT   GPIOD
#define AUDIO_I2Sx_SD_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOD_CLK_ENABLE()
#define AUDIO_I2Sx_SD_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOD_CLK_DISABLE()
#define AUDIO_I2Sx_SD_AF   GPIO_AF5_I2S3ext
#define AUDIO_I2Sx_DMAx_CLK_ENABLE()   __HAL_RCC_DMA1_CLK_ENABLE()
#define AUDIO_I2Sx_DMAx_CLK_DISABLE()   __HAL_RCC_DMA1_CLK_DISABLE()
#define AUDIO_I2Sx_DMAx_STREAM   DMA1_Stream2
#define AUDIO_I2Sx_DMAx_CHANNEL   DMA_CHANNEL_0
#define AUDIO_I2Sx_DMAx_IRQ   DMA1_Stream2_IRQn
#define AUDIO_I2Sx_DMAx_PERIPH_DATA_SIZE   DMA_PDATAALIGN_HALFWORD
#define AUDIO_I2Sx_DMAx_MEM_DATA_SIZE   DMA_MDATAALIGN_HALFWORD
#define AUDIO_I2Sx_DMAx_IRQHandler   DMA1_Stream2_IRQHandler
#define AUDIO_IN_IRQ_PREPRIO   ((uint32_t)6) /* Select the preemption priority level(0 is the highest) */
#define AUDIO_TIMx_CLK_ENABLE()   __HAL_RCC_TIM4_CLK_ENABLE()
#define AUDIO_TIMx_CLK_DISABLE()   __HAL_RCC_TIM4_CLK_DISABLE()
#define AUDIO_TIMx   TIM4
#define AUDIO_TIMx_IN_CHANNEL   TIM_CHANNEL_1
#define AUDIO_TIMx_OUT_CHANNEL   TIM_CHANNEL_2 /* Select channel 2 as output */
#define AUDIO_TIMx_GPIO_CLK_ENABLE()   __HAL_RCC_GPIOD_CLK_ENABLE()
#define AUDIO_TIMx_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOD_CLK_DISABLE()
#define AUDIO_TIMx_GPIO_PORT   GPIOD
#define AUDIO_TIMx_IN_GPIO_PIN   GPIO_PIN_12
#define AUDIO_TIMx_OUT_GPIO_PIN   GPIO_PIN_13
#define AUDIO_TIMx_AF   GPIO_AF2_TIM4
#define AUDIODATA_SIZE   2 /* 16-bits audio data size */
#define AUDIO_OK   ((uint8_t)0)
#define AUDIO_ERROR   ((uint8_t)1)
#define AUDIO_TIMEOUT   ((uint8_t)2)
#define DEFAULT_AUDIO_IN_FREQ   I2S_AUDIOFREQ_16K
#define DEFAULT_AUDIO_IN_BIT_RESOLUTION   ((uint8_t)16)
#define DEFAULT_AUDIO_IN_CHANNEL_NBR   ((uint8_t)2) /* Mono = 1, Stereo = 2 */
#define DEFAULT_AUDIO_IN_VOLUME   ((uint16_t)64)
#define INTERNAL_BUFF_SIZE   (128*DEFAULT_AUDIO_IN_FREQ/16000*DEFAULT_AUDIO_IN_CHANNEL_NBR)
#define PCM_OUT_SIZE   (DEFAULT_AUDIO_IN_FREQ/1000*DEFAULT_AUDIO_IN_CHANNEL_NBR)
#define CHANNEL_DEMUX_MASK   ((uint8_t)0x55)
#define CODEC_RESET_DELAY   ((uint8_t)5)

Define Documentation

#define AUDIO_I2Sx_CLK_DISABLE ( )    __HAL_RCC_SPI3_CLK_DISABLE()

Definition at line 161 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit().

#define AUDIO_I2Sx_CLK_ENABLE ( )    __HAL_RCC_SPI3_CLK_ENABLE()

Definition at line 160 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_CHANNEL   DMA_CHANNEL_0

Definition at line 178 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_CLK_DISABLE ( )    __HAL_RCC_DMA1_CLK_DISABLE()

Definition at line 176 of file stm32469i_discovery_audio.h.

#define AUDIO_I2Sx_DMAx_CLK_ENABLE ( )    __HAL_RCC_DMA1_CLK_ENABLE()

Definition at line 175 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_IRQ   DMA1_Stream2_IRQn

Definition at line 179 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit(), and BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_IRQHandler   DMA1_Stream2_IRQHandler

Definition at line 183 of file stm32469i_discovery_audio.h.

#define AUDIO_I2Sx_DMAx_MEM_DATA_SIZE   DMA_MDATAALIGN_HALFWORD

Definition at line 181 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_PERIPH_DATA_SIZE   DMA_PDATAALIGN_HALFWORD

Definition at line 180 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_DMAx_STREAM   DMA1_Stream2

Definition at line 177 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SCK_AF   GPIO_AF6_SPI3

Definition at line 166 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SCK_GPIO_CLK_DISABLE ( )    __HAL_RCC_GPIOB_CLK_DISABLE()

Definition at line 165 of file stm32469i_discovery_audio.h.

#define AUDIO_I2Sx_SCK_GPIO_CLK_ENABLE ( )    __HAL_RCC_GPIOB_CLK_ENABLE()

Definition at line 164 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SCK_GPIO_PORT   GPIOB

Definition at line 163 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit(), and BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SCK_PIN   GPIO_PIN_3

Definition at line 162 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit(), and BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SD_AF   GPIO_AF5_I2S3ext

Definition at line 172 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SD_GPIO_CLK_DISABLE ( )    __HAL_RCC_GPIOD_CLK_DISABLE()

Definition at line 171 of file stm32469i_discovery_audio.h.

#define AUDIO_I2Sx_SD_GPIO_CLK_ENABLE ( )    __HAL_RCC_GPIOD_CLK_ENABLE()

Definition at line 170 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SD_GPIO_PORT   GPIOD

Definition at line 169 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit(), and BSP_AUDIO_IN_MspInit().

#define AUDIO_I2Sx_SD_PIN   GPIO_PIN_6

Definition at line 168 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspDeInit(), and BSP_AUDIO_IN_MspInit().

#define AUDIO_IN_IRQ_PREPRIO   ((uint32_t)6) /* Select the preemption priority level(0 is the highest) */

Definition at line 186 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_MspInit().

#define AUDIO_OUT_IRQ_PREPRIO   5 /* Select the preemption priority level(0 is the highest) */

Definition at line 151 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_RESET_DISABLE ( )    __HAL_RCC_GPIOE_CLK_DISABLE()

Definition at line 134 of file stm32469i_discovery_audio.h.

#define AUDIO_RESET_ENABLE ( )    __HAL_RCC_GPIOE_CLK_ENABLE()

Definition at line 133 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_RESET_PIN   GPIO_PIN_2
#define AUDIO_SAIx_CLK_DISABLE ( )    __HAL_RCC_SAI1_CLK_DISABLE()

Definition at line 117 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit().

#define AUDIO_SAIx_CLK_ENABLE ( )    __HAL_RCC_SAI1_CLK_ENABLE()

Definition at line 116 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_CHANNEL   DMA_CHANNEL_0

Definition at line 142 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_CLK_DISABLE ( )    __HAL_RCC_DMA2_CLK_DISABLE()

Definition at line 140 of file stm32469i_discovery_audio.h.

#define AUDIO_SAIx_DMAx_CLK_ENABLE ( )    __HAL_RCC_DMA2_CLK_ENABLE()

Definition at line 139 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_IRQ   DMA2_Stream3_IRQn

Definition at line 143 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_IRQHandler   DMA2_Stream3_IRQHandler

Definition at line 148 of file stm32469i_discovery_audio.h.

#define AUDIO_SAIx_DMAx_MEM_DATA_SIZE   DMA_MDATAALIGN_HALFWORD

Definition at line 145 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_PERIPH_DATA_SIZE   DMA_PDATAALIGN_HALFWORD

Definition at line 144 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_DMAx_STREAM   DMA2_Stream3

Definition at line 141 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_FS_PIN   GPIO_PIN_4

Definition at line 128 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_MCK_PIN   GPIO_PIN_7

Definition at line 123 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_MCLK_DISABLE ( )    __HAL_RCC_GPIOG_CLK_DISABLE()

Definition at line 121 of file stm32469i_discovery_audio.h.

#define AUDIO_SAIx_MCLK_ENABLE ( )    __HAL_RCC_GPIOG_CLK_ENABLE()

Definition at line 120 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_MCLK_GPIO_PORT   GPIOG

Definition at line 124 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_MCLK_SCK_SD_FS_AF   GPIO_AF6_SAI1

Definition at line 118 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_PLL_DISABLE ( )    HAL_RCCEx_DisablePLLSAI1()

Definition at line 154 of file stm32469i_discovery_audio.h.

#define AUDIO_SAIx_SCK_PIN   GPIO_PIN_5

Definition at line 129 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_SCK_SD_FS_DISABLE ( )    __HAL_RCC_GPIOE_CLK_DISABLE()

Definition at line 127 of file stm32469i_discovery_audio.h.

#define AUDIO_SAIx_SCK_SD_FS_ENABLE ( )    __HAL_RCC_GPIOE_CLK_ENABLE()

Definition at line 126 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_SCK_SD_FS_GPIO_PORT   GPIOE

Definition at line 131 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_SAIx_SD_PIN   GPIO_PIN_6

Definition at line 130 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_MspDeInit(), and BSP_AUDIO_OUT_MspInit().

#define AUDIO_TIMEOUT   ((uint8_t)2)

Definition at line 215 of file stm32469i_discovery_audio.h.

#define AUDIO_TIMx   TIM4

Definition at line 196 of file stm32469i_discovery_audio.h.

Referenced by TIMx_DeInit(), and TIMx_Init().

#define AUDIO_TIMx_AF   GPIO_AF2_TIM4

Definition at line 204 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIO_TIMx_CLK_DISABLE ( )    __HAL_RCC_TIM4_CLK_DISABLE()

Definition at line 195 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_Stop(), and TIMx_IC_MspDeInit().

#define AUDIO_TIMx_CLK_ENABLE ( )    __HAL_RCC_TIM4_CLK_ENABLE()

Definition at line 194 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIO_TIMx_GPIO_CLK_DISABLE ( )    __HAL_RCC_GPIOD_CLK_DISABLE()

Definition at line 200 of file stm32469i_discovery_audio.h.

#define AUDIO_TIMx_GPIO_CLK_ENABLE ( )    __HAL_RCC_GPIOD_CLK_ENABLE()

Definition at line 199 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIO_TIMx_GPIO_PORT   GPIOD

Definition at line 201 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIO_TIMx_IN_CHANNEL   TIM_CHANNEL_1

Definition at line 197 of file stm32469i_discovery_audio.h.

Referenced by TIMx_DeInit(), and TIMx_Init().

#define AUDIO_TIMx_IN_GPIO_PIN   GPIO_PIN_12

Definition at line 202 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIO_TIMx_OUT_CHANNEL   TIM_CHANNEL_2 /* Select channel 2 as output */

Definition at line 198 of file stm32469i_discovery_audio.h.

Referenced by TIMx_DeInit(), and TIMx_Init().

#define AUDIO_TIMx_OUT_GPIO_PIN   GPIO_PIN_13

Definition at line 203 of file stm32469i_discovery_audio.h.

Referenced by TIMx_IC_MspInit().

#define AUDIODATA_SIZE   2 /* 16-bits audio data size */

Definition at line 210 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_OUT_Play().

#define CHANNEL_DEMUX_MASK   ((uint8_t)0x55)

Definition at line 227 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_PDMToPCM().

#define CODEC_RESET_DELAY   ((uint8_t)5)

Definition at line 234 of file stm32469i_discovery_audio.h.

Referenced by AUDIO_CODEC_Reset().

#define DEFAULT_AUDIO_IN_BIT_RESOLUTION   ((uint8_t)16)

Definition at line 219 of file stm32469i_discovery_audio.h.

#define DEFAULT_AUDIO_IN_CHANNEL_NBR   ((uint8_t)2) /* Mono = 1, Stereo = 2 */

Definition at line 220 of file stm32469i_discovery_audio.h.

Referenced by BSP_AUDIO_IN_PDMToPCM().

#define DEFAULT_AUDIO_IN_FREQ   I2S_AUDIOFREQ_16K

Definition at line 218 of file stm32469i_discovery_audio.h.

#define DEFAULT_AUDIO_IN_VOLUME   ((uint16_t)64)

Definition at line 221 of file stm32469i_discovery_audio.h.

#define DMA_MAX_SZE   0xFFFF

Definition at line 146 of file stm32469i_discovery_audio.h.

Generated on Wed Jan 13 2016 10:58:46 for STM32F469I-Discovery BSP User Manual by   doxygen 1.7.6.1