• Resolved

TMS320C5515: FIR IIR biquad filters not working in AIC3204 on EVM TMS320C5515EVM board

Part Number: TMS320C5515

hello,

I tried to used digital filters in signal processing blocks of AIC3204 to decimate the noise of high frequencies. But it fails. I did below works:

1,  with the example AIC3204 example code, I modified function aic3204_loop_mic_in with adding below lines to enable PRB_P3 of AD and PRB_P2 of DA. But sound from headphone has no change. I can still hear lots of background noises.

AIC3204_rset( 61, 0x02 ); //use AD PRB_P3 to test the noise reduction.
AIC3204_rset( 60, 0x02 ); //use DA PRB_P2 to test the noise reduction.

2, As my target audio frequency is around 100-200hz, so i use TIBQ to calculate a coefficent with fc=200 and lowpass filter. with below codes. the problem is i still can hear the noise and even when I modified my audio source to 500hz, i still can hear it from the headphone. that doesn't make sense. it should be decimated. please help. thanks.

#define LEFT_VOLUME_N0 0x01CC56
#define LEFT_VOLUME_N0_1 0x01
#define LEFT_VOLUME_N0_2 0xCC
#define LEFT_VOLUME_N0_3 0x56

#define LEFT_VOLUME_N1 0x01CC56
#define LEFT_VOLUME_N1_1 0x01
#define LEFT_VOLUME_N1_2 0xCC
#define LEFT_VOLUME_N1_3 0x56

#define LEFT_VOLUME_N2 0x7C6752
#define LEFT_VOLUME_N2_1 0x7C
#define LEFT_VOLUME_N2_2 0x67
#define LEFT_VOLUME_N2_3 0x52

#define LEFT_VOLUME_D1 0x0
#define LEFT_VOLUME_D1_1 0x00
#define LEFT_VOLUME_D1_2 0x00
#define LEFT_VOLUME_D1_3 0x0

#define LEFT_VOLUME_D2 0x0
#define LEFT_VOLUME_D2_1 0x0
#define LEFT_VOLUME_D2_2 0x0
#define LEFT_VOLUME_D2_3 0x0

#ifdef _TEST_DECIMATION
AIC3204_rset( 61, 0x02 ); //use AD PRB_P3 to test the noise reduction.
AIC3204_rset( 60, 0x02 ); //use DA PRB_P2 to test the noise reduction.
#if 1
AIC3204_rset( 0, 0x2C ); // Select page 44
//N0
AIC3204_rset( 12, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 13, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 14, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 16, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 17, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 18, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F
//N2
AIC3204_rset( 20, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 21, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 22, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F
//D1
AIC3204_rset( 24, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 25, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 26, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F
//D2
AIC3204_rset( 28, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 29, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 30, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F

//N0
AIC3204_rset( 32, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 33, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 34, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F

//N1
AIC3204_rset( 36, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 37, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 38, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F

//N2
AIC3204_rset( 40, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 41, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 42, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F

//D1
AIC3204_rset( 44, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 45, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 46, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F

//D2
AIC3204_rset( 48, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 49, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 50, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F


//N0
AIC3204_rset( 52, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 53, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 54, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 56, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 57, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 58, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F
//N2
AIC3204_rset( 60, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 61, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 62, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F
//D1
AIC3204_rset( 64, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 65, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 66, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F
//D2
AIC3204_rset( 68, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 69, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 70, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F

//N0
AIC3204_rset( 72, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 73, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 74, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 76, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 77, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 78, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F
//N2
AIC3204_rset( 80, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 81, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 82, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F
//D1
AIC3204_rset( 84, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 85, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 86, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 88, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 89, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 90, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F

//N0
AIC3204_rset( 92, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 93, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 94, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 96, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 97, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 98, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F
//N2
AIC3204_rset( 100, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 101, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 102, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F
//D1
AIC3204_rset( 104, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 105, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 106, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F
//D2
AIC3204_rset( 108, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 109, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 110, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F

//N0
AIC3204_rset( 112, LEFT_VOLUME_N0_1 ); // set cof to 3F3F3F
AIC3204_rset( 113, LEFT_VOLUME_N0_2 ); // set cof to 3F3F3F
AIC3204_rset( 114, LEFT_VOLUME_N0_3 ); // set cof to 3F3F3F
//N1
AIC3204_rset( 116, LEFT_VOLUME_N1_1 ); // set cof to 3F3F3F
AIC3204_rset( 117, LEFT_VOLUME_N1_2 ); // set cof to 3F3F3F
AIC3204_rset( 118, LEFT_VOLUME_N1_3 ); // set cof to 3F3F3F
//N2
AIC3204_rset( 120, LEFT_VOLUME_N2_1 ); // set cof to 3F3F3F
AIC3204_rset( 121, LEFT_VOLUME_N2_2 ); // set cof to 3F3F3F
AIC3204_rset( 122, LEFT_VOLUME_N2_3 ); // set cof to 3F3F3F
//D1
AIC3204_rset( 124, LEFT_VOLUME_D1_1 ); // set cof to 3F3F3F
AIC3204_rset( 125, LEFT_VOLUME_D1_2 ); // set cof to 3F3F3F
AIC3204_rset( 126, LEFT_VOLUME_D1_3 ); // set cof to 3F3F3F

AIC3204_rset( 0, 0x2D ); // Select page 45
//D2
AIC3204_rset( 8, LEFT_VOLUME_D2_1 ); // set cof to 3F3F3F
AIC3204_rset( 9, LEFT_VOLUME_D2_2 ); // set cof to 3F3F3F
AIC3204_rset( 10, LEFT_VOLUME_D2_3 ); // set cof to 3F3F3F
#endif
#endif

  • Hi,

    I've notified the team. In the mean time can you share which software is this?

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Hi Yordan,

    I am using CCS4.0. The code is the test code installed with it in C:\Program Files (x86)\Texas Instruments\ccsv4\emulation\boards\evm5515_v1\tests\aic3204

      

  • In reply to Yang Xiao32:

    Hi Yang

    It might be a good idea to  separate the digital signal processing function on C5515 from the analogue part and debug each one separately. Let's start with the digital signal processing. Here is what I  suggest:

    1. First move to CCS v6 or V7    CCSv4 is really old version. Update you software to the latest available version (do search on the Web) as well.

    2. Have a tool that displays spectrum of a signal

    3. Generate synthetic low frequency signal plus white noise or ping noise in the C5515, move the signal to your PC and examine the  spectrum. verify that indeed you see signal plus noise.

    4. Apply low-pass filter from the library and look at the results - does it filter the signal correctly?  Do you need multiple BiQuad filter to achieve your desire spectrum?

    5. Based on the results from above we will know if the problem is in the digital signal processing or with the AIC3204, its configuration or the connection

    Ran

  • In reply to ran35366:

    Hi Ran,

    Thanks for your reply. Indeed, I will separate the DSP function on C5515. my questions are:

    1, is it ok display spectrum with Audaicty? what kind of tool do you recommend?

    2, do you have example code for apply low-pass filter from library based on AIC3204+EVM 5515?

    looking forward your reply.

    Yang

  • In reply to Yang Xiao32:

    i have found the example code on MDK. close this issue.