Hi,
I've made up an application with PPS with the EVM-U kit. This is running and working fine (at least, if I add one own I2C Setup file). I choose the 24 kHz sampling rate, as my out shall work at this frequency.
Now I want to download this app into my more real world: I have a DSP (c5515) in chain after the aic3254. In a "aic3204" mode this chip is running at 24kHz sample rate as shown in the code shown below: This runs and works, too. The Clk Signal is comming derived from the I2S bus and it means, that the samples are arriving with resulting 24 kHz in my DSP memory. I observed, that the aic32x4 is sending data rates different from sample rates. Eg. when just changing MDAC/NDAC and MADC/NADC the sample rate is changed (hearing the audio quality at e.g. 24 kHz ) but the data is still sent with 48 kHz, if the I2S Bus is not changing.
Now I want to download the PPS Applikation. I've used the miniDSP Registersets of the PPS-headerfile, miniDSP_D_reg_values and miniDSP_A_reg_values after this setip
(my function vfnSet_AIC() works with the I2C Interface), after the the AIC setup, but then noting is at the output.
I've also tested the programming of the register-set given by PPS: First the reg_value REG_Section_program[], then the miniDSP registers, afterwards the I2C Registers of my own Commandfile for the EVM-U. I adapted the registers for the clock, as this is of course different in the EVM-U. I also wonder, if the I2S clock is somehow important for th operation of the minidsp.
Here my registers of the "AIC3204-mode".
// ------------------ Configuring the AIC3254 as if an AIC3204 Device => this works -------//
//* Configure AIC3204 */
vfnSet_AIC( 0, 0x00 ); // Select page 0
vfnSet_AIC( 1, 0x01 ); // Reset codec
vfnSet_AIC( 0, 0x01 ); // Point to page 1
vfnSet_AIC( 1, 0x08 ); // Disable crude AVDD generation from DVDD
vfnSet_AIC( 2, 0x00 ); // Enable Analog Blocks
// PLL and Clocks config and Power Up
vfnSet_AIC( 0, 0x00 ); // Select page 0
vfnSet_AIC( 27, 0x00 ); // BCLK and WCLK is set as i/p to AIC3204(Slave)
vfnSet_AIC( 4, 0x07 ); // PLL setting: PLLCLK <- BCLK and CODEC_CLKIN <-PLL CLK
vfnSet_AIC( 6, 0x20 ); // PLL setting: J=32
vfnSet_AIC( 7, 0 ); // PLL setting: HI_BYTE(D = 0)
vfnSet_AIC( 8, 0 ); // PLL setting: LO_BYTE(D) = 0
// For 24 KHz sampling
vfnSet_AIC( 5, 0x92 ); // PLL setting: Power up PLL, P=1 and R=2
vfnSet_AIC( 13, 0x00 ); // Hi_Byte(DOSR) for DOSR = 128 decimal or 0x0080 DAC oversamppling
vfnSet_AIC( 14, 0x80 ); // Lo_Byte(DOSR) for DOSR = 128 decimal or 0x0080
vfnSet_AIC( 20, 0x80 ); // AOSR for AOSR = 128 decimal or 0x0080 for decimation filters 1 to 6 (War 0x88)
//
//
vfnSet_AIC( 11, 0x88 ); // Power up NDAC and set NDAC value to 8
vfnSet_AIC( 12, 0x82 ); // Power up MDAC and set MDAC value to 2
vfnSet_AIC( 18, 0x88) ; // Power up NADC and set NADC value to 8
vfnSet_AIC( 19, 0x82 ); // Power up MADC and set MADC value to 2
vfnSet_AIC( 61, 0x03 ); // Filtertyp 3 des ADC
// DAC ROUTING and Power Up
vfnSet_AIC( 0, 0x01 ); // Select page 1
vfnSet_AIC( 12, 0x08 ); // LDAC AFIR routed to HPL
vfnSet_AIC( 13, 0x08 ); // RDAC AFIR routed to HPR
vfnSet_AIC( 0, 0x00 ); // Select page 0
vfnSet_AIC( 64, 0x02 ); // Left vol=right vol
vfnSet_AIC( 65, 0x00 ); // Left DAC gain to 0dB VOL; Right tracks Left
vfnSet_AIC( 63, 0xd4 ); // Power up left,right data paths and set channel
vfnSet_AIC( 0, 0x01 ); // Select page 1
vfnSet_AIC( 16, 0x06 ); // Unmute HPL , 6dB gain
vfnSet_AIC( 17, 0x06 ); // Unmute HPR , 6dB gain
vfnSet_AIC( 9, 0x30 ); // Power up HPL,HPR
vfnSet_AIC( 0, 0x00 ); // Select page 0
vfnPause(8000);
vfnSet_AIC( 0, 0x01 ); // Select page 1
vfnSet_AIC( 51, 0x40 ); // SetMICBIAS
vfnSet_AIC( 52, 0xc0 ); // STEREO 1 Jack-> IN2_L to LADC_P through 40 kohm
vfnSet_AIC( 55, 0xc0 ); // IN2_R to RADC_P through 40 kohmm
vfnSet_AIC( 54, 0x03 ); // CM_1 (common mode) to LADC_M through 40 kohm
vfnSet_AIC( 57, 0xc0 ); // CM_1 (common mode) to RADC_M through 40 kohm
vfnSet_AIC( 59, 0x1f ); // Gain L/R 95*0,5 dB= 47,5 dB (Maximumwert
vfnSet_AIC( 60, 0x1f ); //
vfnSet_AIC( 0, 0x00 ); // Select page 0
vfnSet_AIC( 81, 0xc0 ); // Powerup Left and Right ADC
vfnSet_AIC( 82, 0x00 ); // Unmute Left and Right ADC
vfnSet_AIC( 0, 0x00 );