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.

TMS320C5517: C55x Assembler : RPT and RPTB questions.

Part Number: TMS320C5517

In TMS320C5xx DSP Mnemonic Instruction Set 2002 I see that

1)RPT instruction is interruptible. 
Do C IRQ handler using such instruction automatically save and resume  RPTC value provided that they are declared, say:  interrupt void MyIsr(void) ?

2)RPTB is interruptible or not ?
Such issue is not covered by the manual.

  • Hi,

    The team is notified. They will post their feedback directly here.

    Best Regards,
    Yordan
  • 2) Yes, both RPT and RPTB are interruptable.
    1) Yes, a C IRQ handler is required to save and restore RPTC, BRC0, and BRC1, as well as all the other loop-related registers, such as BRS0, BRS1, RSA0, RSA0, etc. Remember, you only need to save and restore a register if something might modify it, which probably means executing a RPT or RPTB instruction in the IRQ, or calling some function which might use an RPT or RPTB.

    The required save-restore order is a bit tricky. IMHO, I'd let the compiler generate it if possible.

    Are you in fact trying to use an RPT or RPTB inside of an interrupt?
  • Many thanks for your feedback.

    I do not aim to use RPT or RPTB in IRQ handlers as I would like to use C only, but the optimized C compiler

    could insert RPT or RPTB on my behalf...

    Actually I use only RPT in in a backgroud "wait cycle" function through ASM directive.


    So I wonder if the C interrupt qualifier automatically preservers all sensitive used registers...