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.

RPTB on C28069



Hi,
I am working with a C28069 Piccolo Control stick. While optiming a delay buffer shift function, I would like use the RPTB assembly command, but I repeatedly face the error :[E0200] Block Size out of range. I am using the 6.2.3 compiler (I know there was an error related to this fixed in the 6.1.1 compiler).
Lets say my code is:
RPTB loop_end,#48
MOVL ACC,*--XAR4
MOVL *--XAR5,ACC
loop_end

Is this incorrect usage? How can i correct it? Also, is there some way to get the C compiler to use the RPTB command instead of BANZ?

Thanks,
Anandhi

  • Hi Anandhi,

    the block needs to be atleast 8 words(16-bit) long if it is even aligned, so you need two more 32-bit instructions

    you can slot in two NOPs or repeat the instructions and halve the count of the loop

    .align 2

    RPTB loop_end,#24
    MOVL ACC,*--XAR4
    MOVL *--XAR5,ACC

    MOVL ACC,*--XAR4
    MOVL *--XAR5,ACC

    loop_end

    This loop will execute 25 times.

  • Thanks, Vishal. I figured that out yesterday. But generally, is there some compiler option that will enforce this RPTB usage? This same loop is being run in my code but the compiler uses a BANZ instruction every time. 

    Thanks, 

    Anandhi

  • There is a rather vague section on the RPTB generation in the compiler guide 3.12.17 in SPRU514F. I suppose if the code you put in a loop meets the min size for a repeat block and you have fpu32 support turned on, the compiler should use a RPTB instead of a BANZ.