目前设计是这样,STM32F412RET送出19.2M I2S MCLK给DA7218的CLKIN,如下图的MIC_P选择Single‐ended方式输入,我在MIC_P有量到波形输入,I2S的SCLK,LRCK,DATAOUT都有量到正常波形,但HPL,HPR都没有波形输出。初始化DA7218的代码和线路图如下,帮忙检查下为什么HPL,HPR没有波形输出,会是哪里的问题?
- {
- {0x09, 0x80}, //RESET
- {0x00, 0x01}, //Enable ACTIVE mode
- {0x01, 0x01}, //Enable repeat mode register access (register address and data is sent for each write)
- {0xDC, 0x08}, //Enable Master BIAS and VMID (VMID and Bandgap enabled on BIAS_EN)
- {0x0D, 0x01}, //Set ramp rate to nominal
- {0x0C, 0x03}, //PC_COUNT
- {0xFC, 0x11}, //MICBIAS_CTRL
- {0xFD, 0x11}, //MICBIAS_EN
- /*DA7218 DAI / PLL*/
- {0xE0, 0x00}, //IO Level 2.5-3.6V
- {0xE1, 0x80}, //Digital LDO Enabled, 1.05V
- #if 1
- {0x91, 0x13}, //PLL_MODE-disable , PLL_MCLK_SQR_EN-enable , PLL INDIV= 18-36MHz
- #else
- {0x91, 0x51}, //PLL_MODE-normal , PLL_MCLK_SQR_EN-enable , PLL INDIV= 2-5MHz
- #endif
- {0x92, 0x12}, //PLL FRAC TOP
- {0x93, 0x6E}, //PLL FRAC BOT
- {0x94, 0x18}, //PLL INTEGER
- {0x98, 0xC0}, //PLL_REFOSC_CAL
- {0x0B, 0xBB}, //48kHz sample rate for ADC and DAC
- #if 1
- {0x8C, 0xA8}, //DAI Enabled, DAI Channel 1L and 1R enabled, 24 bits per channel, I2S
- #else
- {0x8C, 0xA0}, //DAI Enabled, DAI Channel 1L and 1R enabled, 32bit, I2S
- #endif
- {0x90, 0x80}, //Master Mode DAI, 64xFS BCLK
- #if 1
- {0x8D, 0x40}, //DAI_TDM_CTRL,DAI in normal mode,DAI DATOUT pin is driven when required
- #else
- {0x8D, 0xCF}, //DAI_TDM_CTRL
- #endif
- {0x8E, 0x00}, //No Offset on DAI (lower)
- {0x8F, 0x00}, //No Offset on DAI (upper)
- // {0xAC, 0xF0}, //CP Enabled, Signal Magnitude tracking mode
- // {0xAD, 0x35}, //CP Delay 64ms
- // {0xAE, 0x36}, //CP Volume threshold = 0x36
- /*DA7218 INPUTS*/
- //Enable Record Path
- {0xB4, 0x80}, //MIC1 Amp Enabled
- {0xB8, 0x40}, //MIC2 Amp Disable
- {0xB5, 0x07}, //MIC1 Gain
- {0xB9, 0x07}, //MIC2 Gain
- {0xB7, 0x01}, //MIC_1_P single-ended
- {0xBB, 0x01}, //MIC2 select 1p
- {0x2C, 0xA8}, //MIXIN_1 Enabled
- {0x2E, 0xA8}, //MIXIN_2 Enabled
- {0x2D, 0x0F}, //MIXIN_1_GAIN
- {0x2F, 0x0F}, //MIXIN_2_GAIN
- {0xBD, 0x00}, //Disable IN_2 HPF
- {0xBC, 0x00}, //Disable IN_1 HPF
- {0x18, 0xA0}, //INFILT_1_L Enabled
- {0x1A, 0xA0}, //INFILT_1_L Enabled
- {0x5C, 0x01}, //INFILT_1_L to DAI_1_L
- {0x64, 0x04}, //INFILT_2_L to DAI_1_R
- {0xC0, 0x04}, //ADC_1_CTR
- {0xC1, 0x04}, //ADC_2_CTRL
- {0xDC, 0x08}, //References
- /*MIXERS*/
- {0x6C, 0x20}, //OUTFILT_1L_SOURCE = DAI INPUT L
- {0x74, 0x40}, //OUTFILT_1R_SOURCE = DAI INPUT R
- /*DA7218 OUTPUTS*/
- {0x72, 0x1C}, //DAI INPUT L GAIN = 0dB
- {0x7B, 0x1C}, //DAI INPUT L GAIN = 0dB
- {0xF8, 0x6F}, //OUT_1L_DIGITAL_GAIN GAIN = 0dB
- {0xF9, 0x6F}, //OUT_1R_DIGITAL_GAIN GAIN = 0dB
- {0xCC, 0x80}, //MIXOUT_L Enable
- {0xCE, 0x80}, //MIXOUT_R Enable
- {0xCD, 0x03}, //MIXOUT_L GAIN = 0dB
- {0xCF, 0x03}, //MIXOUT_R GAIN = 0dB
- {0x20, 0x80}, //Enable OUT_1L_FILTER (also enables DACREF)
- {0x21, 0x80}, //Enable OUT_1R_FILTER
- {0xCC, 0x80}, //MIXOUT_L Enable
- {0xCE, 0x80}, //MIXOUT_R Enable
- {0xD0, 0xFC}, //HP_L Enable, Muted, Ramped
- {0xD2, 0xFC}, //HP_R Enable, Muted, Ramped
- {0x5A, 0x00}, //DGS SIGNAL and ANTICLIP level to 0dB
- {0x54, 0x27}, //Enable DGS
- #if 1
- {0xAC, 0xE0}, //Charge pump is enabled
- {0xD5, 0x00}, //Single-ended output
- {0xD8, 0x80}, //Accessory detect jack detection enable
- #endif
- {0x24, 0x08}, //HP_L Enable, Muted, Ramped
- //{0xD2, 0xE8}, //HP_R Enable, Muted, Ramped
- //DELAY 50
- {0xD0, 0xA8}, //HP_L Enable, Un-muted, Ramped
- {0xD2, 0xA8}, //HP_R Enable, Un-muted, Ramped
- {0xE8, 0x07}, //HP_R Enable, Un-muted, Ramped
- {0xE9, 0x07}, //HP_R Enable, Un-muted, Ramped
- };
复制代码
|