功能框图:
上电自动复位所有寄存器
系统时钟图:
时钟分叉树:
从模式的SCLK作为PLL锁相环的时钟源,生成内部时钟(3线PCM)
SPK_GAIN脚上的电压决定了功放的最大输出功率
功放运行模式选择stereo模式
uint8_t IIC_REG_5754[][2] =
{
{0x00,0x00}, /* Select page 0 */
{0x01,0x11}, /* Enter reset mode */
{0xFF,0x32}, /* Delay 50ms */
{0x01,0x00}, /* Enter normal mode */
{0x03,0x11}, /* Mute all channels */
{0x02,0x10}, /* Enter standby mode */
{0x25,0x5a}, /* Ignore Fs/MCLK/LRCLK/SCLK detection,disable clock auto set */
{0x0d,0x10}, /* Set SCLK as PLL clock */
{0x14,0x01}, /* Set P=2 */
{0x15,0x08}, /* Set J=9 */
{0x16,0x00}, /* Set D=0 */
{0x17,0x00},
{0x18,0x00}, /* Set R=1 */
{0x1b,0x01}, /* Set DSP clock divide by 1 */
{0x1c,0x0f}, /* Set DAC clock divide by 16 */
{0x1d,0x03}, /* Set NCP clock divide by 2 */
{0x1e,0x01}, /* Set OSR clock divide by 1 */
{0x22,0x02}, /* Set Quad speed(96KHz~192KHz) */
{0x23,0x01}, /* Set DSP clock cycles=DSPfs */
{0x24,0x00},
{0x02,0x00}, /* Enter normal operation */
{0x03,0x00}, /* Un-mute all channels */
};
void PA_5754_Init(uint8_t Adds)
{
uint8_t buf[2];
uint8_t index;
for(index = 0; index<(sizeof(IIC_REG_5754)/(sizeof(uint8_t)*2)); index++)
{
switch(IIC_REG_5754[index][0])
{
case 0xFF:
vTaskDelay(IIC_REG_5754[index][1]);
break;
default:
buf[0] = IIC_REG_5754[index][0];
buf[1] = IIC_REG_5754[index][1];
IICsetReg(Adds,buf);
break;
}
}
}