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.

C5515 circular buffer size over 4k

Hi.

I've been having troubles implementing a circular buffer larger than 4096. I've read the data sheet for the processor (SPRS645F) and found that it contains 8 blocks of 4K x 16-Bit for the DARAM and assume that's causing my issues.

The size I need is about 48k

Is there any workaround to this limitation in size? 

Best regards,

Mette 

  • Hi,

    Have you looked at section 6.11 of the document at:

    http://focus.ti.com/lit/ug/spru371f/spru371f.pdf

    Regards

     Vasanth

     

  • Hi.

    Thanks for your reply.

    Yes, I've read the documentation, but it doesn't mention the size issues. 

    My circular buffer works fine with values < 4096

    If I define this:

    MOV #48000, BK03
    BSET AR0LC
    AMOV #02000h, XAR0 
    MOV #02000h, BSA01

    I however recieve the following error on the first line:

     [W9999] Using MMR address

    And the audio output is noise.

    In my linker file the MMR is defined as:

    MMR (RWIX): origin = 0x000000, length = 0x0000c0 /* MMRs */
    DARAM0 (RWIX): origin = 0x0000c0, length = 0x00ff40 /* 64KB - MMRs */

    But when writing to 0x2000, I'm unsure if there are any MMR values amongst them I've read the documentation 3.11 in spru371f and can't really find any indication of any MMR's being in this range.

    Regards,

    Mette

  • The instruction to load a constant directly to register BK03 only allows a 12-bit constant, so you have to write to BK03 with a memory-mapped register write.  The assembler is converting the instruction for you, but you usually want to add the "mmap" qualifier, like so.  If you don't, and XDP is not zero, your write will be to a random memory location rather than BK03.

    .mmregs
        MOV #48000, mmap(@BK03)
  • Thanks for your reply. That worked! :)