Hi,
I'm trying to get 16kHz Fs clock based on a BCLK of 512kHz (resolution : 16 bit). Using the register settings below, I cannot get any output, can you advise the appropriate register required?
Refer to “TAS2505 Application Reference Guide_slau472.pdf”:
4.0.7 Example Register Setup to Play Digital Data Through DAC and Headphone/Speaker
Outputs
//new settings for TAS2505, 2017.6.19
void CodecInit(unsigned char ucInputLine, unsigned char ucOutputLine)
{
/* Initialization */
CodecReset();
/* Digital Configuration
* -> PLL_CLK = (PLL_CLKIN x R x J.D)/P
* -> CODEC_CLKIN = PLL_CLK
* -> DAC_Fs = CODEC_CLK_IN / (NDAC.MDAC.DOSR)
* -> ADC_Fs = CODEC_CLK_IN / (NADC.MADC.AOSR)
* Options:
* -> 84.672MHz = (3.528MHz x 1 x 24.0)/1 --> For Fs = 44.1KHz
* -> 92.160MHz = (3.840MHz x 1 x 24.0)/1 --> For Fs = 48KHz
* -> 44.1KHz = 84.672MHz / (3.5.128)
* -> 48KHz = 92.160MHz / (3.5.128)
* Considerations:
* -> MDAC * xOSR >= ResourceClass * 32
* - 5 * 128 (640) >= 8 * 32 (256)
* -> 2.8MHz < xOSR x ADC_Fs < 6.758MHz
* - 128 * 44,100 = 5.644MHz
* - 128 * 48,000 = 6.144MHz
* -> xOSR must be a multiple of 8 (48KHz High-Performance)
* -> xOSR = 64, for Low-Power Mode
* -> xOSR = 128, for High-Performance Mode
*/
CodecPageSelect(1);
CodecRegWrite(0x02, 0x00);
CodecPageSelect(0);
CodecRegWrite(0x04, 0x47);
CodecRegWrite(0x05, 0x91);
CodecRegWrite(0x06, 0x18);
CodecRegWrite(0x06, 0x04);
CodecRegWrite(0x07, 0x00);
CodecRegWrite(0x08, 0x00);
BTPS_Delay(20);
CodecRegWrite(0x0B, 0x83);
//CodecRegWrite(0x0B, 0x84);
CodecRegWrite(0x0C, 0x85);
//CodecRegWrite(0x0C, 0x82);
CodecRegWrite(0x0D, 0x00);
CodecRegWrite(0x0E, 0x80);
CodecRegWrite(0x1B, 0xC0);
CodecRegWrite(0x1C, 0x00);
CodecRegWrite(0x3C, 0x02);
CodecPageSelect(1);
CodecRegWrite(0x01, 0x10);
CodecRegWrite(0x0A, 0x00);
CodecRegWrite(0x0C, 0x00);
//CodecRegWrite(0x0C, 0x04);
CodecRegWrite(0x16, 0x00);
CodecRegWrite(0x18, 0x00);
CodecRegWrite(0x09, 0x00);
//CodecRegWrite(0x09, 0x20);
CodecRegWrite(0x10, 0x40);
//CodecRegWrite(0x10, 0x00);
CodecRegWrite(0x2E, 0x00);
CodecRegWrite(0x30, 0x10);
CodecRegWrite(0x2D, 0x02);
CodecPageSelect(0);
CodecRegWrite(0x3F, 0x90);
CodecRegWrite(0x41, 0x00);
CodecRegWrite(0x40, 0x04);
}
Thanks,
Christina