|
NetBurner 3.5.6
PDF Version |
Complete configuration structure for the SAI driver. More...
#include <sai.h>
Public Attributes | |
| uint32_t | txClkFreq {12288000} |
| uint32_t | rxClkFreq {12288000} |
| rxTxSync_t | rxTxSync {RXTX_ASYNC} |
| I2S_Type * | sai |
| SAI_rxtx_cfg_t | rx |
| SAI_rxtx_cfg_t | tx |
Complete configuration structure for the SAI driver.
This structure encapsulates all configuration parameters for both the transmit and receive channels of the SAI peripheral, along with shared parameters like clock frequencies and synchronization mode.
Clock Configuration
Clock frequencies determine the sample rate:
Example for 48kHz stereo 24-bit:
Usage
For most applications, use one of the predefined configurations:
Or customize from a base configuration:
| SAI_rxtx_cfg_t SAI_cfg_t::rx |
Receive channel configuration
| uint32_t SAI_cfg_t::rxClkFreq {12288000} |
Receive bit clock frequency in Hz. Default: 12.288 MHz
| rxTxSync_t SAI_cfg_t::rxTxSync {RXTX_ASYNC} |
Synchronization mode between RX and TX channels
| I2S_Type* SAI_cfg_t::sai |
Pointer to the SAI hardware instance (SAI1, SAI2, or SAI3)
| SAI_rxtx_cfg_t SAI_cfg_t::tx |
Transmit channel configuration
| uint32_t SAI_cfg_t::txClkFreq {12288000} |
Transmit bit clock frequency in Hz. Must match the actual clock rate for proper operation. Default: 12.288 MHz (512 x 48kHz for 24-bit stereo)