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.

AAC Encoder + DMA on C5515

Hi,

I am trying to use the AAC Encoder example as a template and add DMA Pingpong buffer to transfer I2S data on EVMC5515.

downloads.ti.com/.../MPEG4AAC_LC_Encoder_C55x_Datasheet_1_00_00_03.pdf

I was able to get both projects working with code generation tool 4.4.1, but no luck when combining them.

Repeatedly tried allocating .data and .bss section to DARAM or SARAM but neither worked.

I strongly suspect the linker cmd file cause the problem. Here's linker file I am using. 

Where should I change? How should I allocate the memory?

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

-w   

-c                    /* Use C linking conventions: auto-init vars at runtime */

/*-u _Reset             /* Force load of reset interrupt handler                */

MEMORY

{

   PAGE 0:  /* ---- Unified Program/Data Address Space ---- */

   DARAM    : origin = 0x000100, length = 0xFF00

   SARAM    : origin = 0x010000, length = 0x18000

   EXTERNAL : origin = 0x0028000, length = 0x0100000            

}

 

SECTIONS

  vectors(NOLOAD)

    vector     : > DARAM  ALIGN = 256

    .text       : > DARAM  

    stack       : > DARAM  

    .sysstack : > DARAM

    .system : > DARAM

.switch : > DARAM

.cinit : > DARAM

.cio : > DARAM

.bss        : > SARAM

    .data       : > SARAM 

.const : > EXTERNAL    PAGE 0

.aacenc_text: align(4) {

-laar_tni_rev2.l55l(.text)

} > EXTERNAL PAGE 0

.aacenc_const: align(4) {

-laar_tni_rev2.l55l(.const)

} > SARAM PAGE 0

  .rts_text: align(4) {

         rts55x.lib (.text)

          } > EXTERNAL    PAGE 0

}

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

Thanks,

Jun

  • Jun,

    I would get DMA audio to the speakers working, before adding the complexity of the AAC decoder.  Have you tried that?  Just generate a sine wav in a fixed length buffer, and use DMA to push that to the speakers.  The buffer can be in SARAM or DARAM.  Make sure you use the right DMA controller for the I2S peripheral you use; not every controller can see every peripheral.  This table is from SPRUFO9:

    Regards,

    Bill

  • Thanks for replying, Bill. Both the simple sine wave DMA example and the pingpong buffer worked until I began to merge them into the AAC encoder example. I also tried to allocate the buffer on both DARAM and SARAM with DMA different offset. Now I am trying to use the pingpong buffer code as a template and port the AAC encoder example code. This looks more troublesome. The encoder library is not well linked...

    These two sections, .aacenc_text and .aacenc_const, could not be found.

    Has anyone done this work before? 

  • Jun,

    Sorry.  I used the AAC decoder when I built my own music player, but I've never used the encoder.

    > These two sections, .aacenc_text and .aacenc_const, could not be found.

    Those sections are defined by the library, correct?  You need to locate them in the linker command file with a SECTIONS directive.

    Regards,

    Bill