This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Noise when running mcaspPlayBk.c on LCDK C6748

I compiled the mcasp example provided with StarterWare.  Then I connected an audio signal to the LCDK's input, and an amplifier to the output.  When the program is running there is a low frequency noise at the LCDK's output.  The ISRs are called correctly, and there is no error when starting a debug session.  Changing the #define lines at mcaspPlayBk.c alters the frequency of the noise.  Based on that I suppose there could be an audio buffers configuration issue.  What could be wrong?

Regards



board: LCDK C6748

emulator: XDS100v2

optimization level = 0

includes:

"C:\ti\C6748_StarterWare_1_20_03_03\include\"

"C:\ti\C6748_StarterWare_1_20_03_03\include\hw"

"C:\ti\C6748_StarterWare_1_20_03_03\include\c674x\c6748"

libraries:

"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\system_config\Debug\system_config.lib"

"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\lcdkC6748\platform\Debug\platform.lib"

"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\drivers\Debug\drivers.lib"

---------------------------------------------------------------------------------------------


**** Build of configuration Debug for project starterware_passthrough ****

"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building file: ../mcaspPlayBk.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6740 --abi=eabi -O0 -g --disable_push_pop --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/ti/C6748_StarterWare_1_20_03_03/include/" --include_path="C:/ti/C6748_StarterWare_1_20_03_03/include/hw" --include_path="C:/ti/C6748_StarterWare_1_20_03_03/include/c674x/c6748" --define=c6748 --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="mcaspPlayBk.pp"  "../mcaspPlayBk.c"
'Finished building: ../mcaspPlayBk.c'
' '
'Building target: starterware_passthrough.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6740 --abi=eabi -O0 -g --disable_push_pop --define=c6748 --display_error_number --diag_warning=225 -z --stack_size=0x800 -m"starterware_passthrough.map" --heap_size=0x800 -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -i"C:/ti/ccsv5/tools/compiler/c6000/include" --reread_libs --warn_sections --display_error_number --rom_model -o "starterware_passthrough.out"  "./mcaspPlayBk.obj" "./codecif.obj" "./aic31.obj" -l"libc.a" -l"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\system_config\Debug\system_config.lib" -l"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\lcdkC6748\platform\Debug\platform.lib" -l"C:\ti\C6748_StarterWare_1_20_03_03\binary\c674x\cgt\c6748\drivers\Debug\drivers.lib" "../C6748.cmd"
<Linking>
'Finished building target: starterware_passthrough.out'
' '

**** Build Finished ****

----------------------------------------------------------------------

C674X_0: Output:     Target Connected.
C674X_0: Output:     ---------------------------------------------
C674X_0: Output:     Memory Map Cleared.
C674X_0: Output:     ---------------------------------------------
C674X_0: Output:     Memory Map Setup Complete.
C674X_0: Output:     ---------------------------------------------
C674X_0: Output:     PSC Enable Complete.
C674X_0: Output:     ---------------------------------------------
C674X_0: Output:     PLL0 init done for Core:300MHz, EMIFA:25MHz
C674X_0: Output:     DDR initialization is in progress....
C674X_0: Output:     PLL1 init done for DDR:150MHz
C674X_0: Output:     Using DDR2 settings
C674X_0: Output:     DDR2 init for 150 MHz is done
C674X_0: Output:     ---------------------------------------------

  • Hi Jose,

    Thanks for your post.

    Could you please provide the details below:

    1. What are the #define lines which are modified in mcaspPlayBk.c?

    Even I suppose, there could be audio buffer configuration issue but still i need to know, what are the #define parameters you changed so that, i simulate the usecase scenario and check appropriately.

    Kindly provide me the above details for more clarity and better understanding.

    ---------------------------------------------------------------------------------
    Please click the Verify Answer
    button on this post if it answers your question.
    ---------------------------------------------------------------------------------

    Thanks & regards,

    Sivaraj K

  • Hi Sivara,

    thanks for responding, I'm currently using the mcaspPlayBk.c file without modifications, changing NUM_SAMPLES_PER_AUDIO_BUF value didn't solve the problem.

    Regards

    /*
    ** Values which are configurable
    */
    /* Slot size to send/receive data */
    #define SLOT_SIZE                             (16u)

    /* Word size to send/receive data. Word size <= Slot size */
    #define WORD_SIZE                             (16u)

    /* Sampling Rate which will be used by both transmit and receive sections */
    #define SAMPLING_RATE                         (48000u)

    /* Number of channels, L & R */
    #define NUM_I2S_CHANNELS                      (2u)

    /* Number of samples to be used per audio buffer */
    #define NUM_SAMPLES_PER_AUDIO_BUF             (2000u)

    /* Number of buffers used per tx/rx */
    #define NUM_BUF                               (3u)

    /* Number of linked parameter set used per tx/rx */
    #define NUM_PAR                               (2u)

    /* Specify where the parameter set starting is */
    #define PAR_ID_START                          (40u)

    /* Number of samples in loop buffer */
    #define NUM_SAMPLES_LOOP_BUF                  (10u)

    /* AIC3106 codec address */
    #define I2C_SLAVE_CODEC_AIC31                 (0x18u)

    /* Interrupt channels to map in AINTC */
    #define INT_CHANNEL_I2C                       (2u)
    #define INT_CHANNEL_MCASP                     (2u)
    #define INT_CHANNEL_EDMACC                    (2u)

    /* McASP Serializer for Receive */
    #define MCASP_XSER_RX                         (14u)

    /* McASP Serializer for Transmit */
    #define MCASP_XSER_TX                         (13u)

  • Hi Jose,

    Thanks for your post.

    I understand the problem still persist.

    I would recommend you to configure McASP Serializer for Transmit and Receive  "#define" parameters as shown below:

    #define MCASP_XSER_RX

    #define MCASP_XSER_TX                        

    The above would help you to optimize your low frequency noise on the audio output.

    Please try to evaluate and Kindly let me know, how it responds.

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

    Thanks & Regards,

    Sivaraj K

  • Hi Sivaraj,

    documentation says MCASP_XSER_RX and MCASP_XSER_TX are the serializer numbers, in LCDK they are AXR13 and AXR14.

    I think maybe the problem is related to memory configuration (all the sections are in SHRAM).


    Regards

    Jose

  • Hi Jose,

    Thanks for your post.

    I do agree with you, there are chances of memory configuration issue.

    I would recommend you to map some internal memory (L1/L2 RAM/Cache) instead of mapping all in external memory (SDRAM).

    I hope, the above would help you to solve this issue.

    -----------------------------------------------------------------------------------------------------------
    Please click the
    Verify Answer button on this post if it answers your question.
    ------------------------------------------------------------------------------------------------------------

    Thanks & regards,

    Sivaraj K

  • Hi Jose,

    I think I'm running in your same issue.

    Have you found any solutions?

    Regards,

    Simone