Dear TI:
用示波器测量I2S2 RX管脚是有波形的,仿真的时候查看I2S 2S2 Receive Left/Right Data Register寄存器里面的数据全是0;
我的代码设置如下,请帮查看一下问题出在哪里了:
/** Open the device with instance 0*/hI2s = I2S_open(I2S_INSTANCE0, DMA_POLLED, I2S_CHAN_STEREO);if(NULL == hI2s){status = CSL_TEST_FAILED;return (status);}else{printf ("I2S Module Instance opened successfully\n");}hI2s2 = I2S_open(I2S_INSTANCE2, DMA_POLLED, I2S_CHAN_STEREO);if(NULL == hI2s2){status = CSL_TEST_FAILED;return (status);}else{printf ("I2S Module Instance opened successfully\n");} /** Set the value for the configure structure*/hwConfig.dataType= I2S_STEREO_ENABLE;hwConfig.loopBackMode= I2S_LOOPBACK_ENABLE;hwConfig.fsPol= I2S_FSPOL_LOW;hwConfig.clkPol= I2S_FALLING_EDGE;hwConfig.datadelay= I2S_DATADELAY_ONEBIT;hwConfig.datapack= I2S_DATAPACK_ENABLE;hwConfig.signext= I2S_SIGNEXT_DISABLE;hwConfig.wordLen= I2S_WORDLEN_16;hwConfig.i2sMode= I2S_MASTER;hwConfig.clkDiv= I2S_CLKDIV128;hwConfig.fsDiv= I2S_FSDIV32;hwConfig.FError= I2S_FSERROR_DISABLE;hwConfig.OuError= I2S_OUERROR_DISABLE;/** Configure hardware registers*/result = I2S_setup(hI2s, &hwConfig);if(result != CSL_SOK){status = CSL_TEST_FAILED;return (status);}else{printf ("I2S Module Configured successfully\n");}result = I2S_setup(hI2s2, &hwConfig);if(result != CSL_SOK){status = CSL_TEST_FAILED;return (status);}else{printf ("I2S Module Configured successfully\n");}
Shine:
建议先做个digital loopback测试,看一下DSP这边的I2S配置有没有问题。
linhai zhang:
回复 Shine:
Dear TI:
我将这个hwConfig.loopBackMode= I2S_LOOPBACK_ENABLE;修改为DISABLE后查看寄存器是有值的,但是是一个固定值,不应该是一个在变化的值吗?Thanks!