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.

Simultaneous execution of C2000 cores and CLAs

I have a question.
When calling a CLA task with a software interrupt, I believe the C2000 core execution is blocked.
To prevent this, is it possible to interrupt the CLA task at the rising edge of the GPIO pin, and then at the end of the CLA task, the GPIO pin is pulled down to inform the C2000 core that the task is finished?
If so, please provide some sample programs.
If not, please tell us why it does not work.

  • Hi,

    When calling a CLA task with a software interrupt, I believe the C2000 core execution is blocked.

    Please could you elaborate on your question? The C28 executes an instruction or writes to a register to trigger CLA task. Once C28 executes this it continues executing subsequent instructions while CLA task is executing in parallel. So CLA and C28 are executing in parallel and C28 is not blocked.

    is it possible to interrupt the CLA task at the rising edge of the GPIO pin,

    I don't believe this is possible, however if the goal is for C28 application to trigger CLA then GPIO is not needed, as explained SW trigger is OK.

    end of the CLA task, the GPIO pin is pulled down to inform the C2000 core that the task is finished?

    If the device has a CLA type-1 or type 2, then CLA task can be configured to generate an end of task interrupt to C28 core after CLA task is finished. GPIO is not needed to do this. Please see the following information in CLA software development guide.

    https://software-dl.ti.com/C2000/docs/cla_software_dev_guide/faq.html#can-the-cla-send-an-interrupt-to-the-c28x

    Please let me know if you have any further questions.

    Thanks,

    Ashwini

  • Thank you for your answer.
    I understand that the CLA trigger by hardware is not possible with the listed items.
    I understand that software interrupts can be called only by IACK, which is defined in f280XXX_cla_defines.h.
    #define Cla1ForceTask1() asm(" IACK #0x0001")
    #define Cla1ForceTask2() asm(" IACK #0x0002")
    #define Cla1ForceTask3() asm(" IACK #0x0004")
    #define Cla1ForceTask4() asm(" IACK #0x0008")
    #define Cla1ForceTask5() asm(" IACK #0x0010")
    #define Cla1ForceTask6() asm(" IACK #0x0020")
    #define Cla1ForceTask7() asm(" IACK #0x0040")
    #define Cla1ForceTask8() asm(" IACK #0x0080")


    If I want to wait for the end of the process, use


    #define Cla1ForceTask1andWait()asm(" IACK #0x0001"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT1 == 1);

    #define Cla1ForceTask2andWait()asm(" IACK #0x0002"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT2 == 1);

    #define Cla1ForceTask3andWait()asm(" IACK #0x0004"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT3 == 1);

    #define Cla1ForceTask4andWait()asm(" IACK #0x0008"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT4 == 1);

    #define Cla1ForceTask5andWait()asm(" IACK #0x0010"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT5 == 1);

    #define Cla1ForceTask6andWait()asm(" IACK #0x0020"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT6 == 1);

    #define Cla1ForceTask7andWait()asm(" IACK #0x0040"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT7 == 1);

    #define Cla1ForceTask8andWait()asm(" IACK #0x0080"); \
    asm(" RPT #3 || NOP"); \
    while(Cla1Regs.MIRUN.bit.INT8 == 1);

    I was mistaken because it looks like a function call.