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.

Hyperlink interruptions

Hi all,

I'm working on two C6678 connected together with a Hyperlink cable and I've got some issues for passing an interrupt from a DSP to an other DSP.

My use case is as follow:

A DSP "A" configure the EDM3 ressources of a DSP "B" (through Hyperlink) to execute a transfer between L2SRAM of core#0 and MSM.

An interruption occurs at the end of the transfer to notice the DSP "B" that the transfer is completed. The interruption triggers a function and I want that function to send a software interrupt to DSP "A" in order to notice it that the transfer in DSP "B" is completed.

In the interrupt routine in DSP"B" I wrote this :

    int_ctrl_val.SIEN         = 1;
    control_reg.intLocal    = 0;
    control_reg.int2cfg     = 1;
    int_ctrl_idx.intCtrlIdx    = 0x01;
    gen_soft_int.iVector    = 0x01;

    ret_valeur = Hyplnk_writeRegs (hyplnk_handle, hyplnk_LOCATION_LOCAL, &set_reg) ;

Is that necessary to send an interrupt to a remote device ?

In DSP "A", I correctly set the int2cfg field.

And I correctly mapped in DSP "A" the event #111 (hyperlink_int_0) in order to interrupt the core#0.

I cheked the IFR bit in DSP "A" and it is never set... So that mean the interruption never occur.

Do I forgot something in my interruption function above ?

Thanks for helping me.

  • Anyone as an answer ?

    It is written in the datasheet that when you put right vector number into the ivector field of  Generate Soft Interrupt register, an interrupt should be issued...

  • Micheal,

    Please confirm additional configuration I listed below.

    In DSP A:  control_reg.vector   field was correctly set

    In DSP B: interrupt control index register [1].icidx = 0x1; ==> are you sure you want to use Hyperlink_int_i[1] as your interrupt source? your application on both DSP should agree that this event will be used for your special purpose.  

                       interupt control value register[1] should be correctly set :  inten : 1,  sien : 1, mps : 0, vector: 1. ==> this should be matched with the control_reg.vector value in DSP B

                       interrupt pointer Index[1].icidx = 0x1

                      interrupt pointer vlaue [1].intptr = 0x14 (interrupt pending/ set regsiter position)

    Let me know if this still doesn't make it work.

    Regards,

    Albert

  • Hi Albert,

    Thank you for your answer. I'll try this way and give a feedback.

  • Hi again,

    it doen't seem to work.. but I'm very new in the hyperlink inerrupt process.

    So here is my code for DSP "B":

        hyplnkIntCtrlIdxReg_t    intCtrlIdx            ;
        hyplnkIntCtrlValReg_t    intCtrlVal            ;
        hyplnkGenSoftIntReg_t    genSoftInt            ;
        hyplnkIntPtrIdxReg_t    intPtrIdx            ;
        hyplnkIntPtrValReg_t    intPtrVal            ;
        hyplnkControlReg_t        control                ;
        hyplnkRegisters_t        set_reg                ;
        Hyplnk_Handle            hyplnk_handle = NULL;
        hyplnkRet_e                ret_valeur            ;

        memset (&set_reg    , 0, sizeof(set_reg))    ;
        memset (&control    , 0, sizeof(control))    ;
        memset (&intCtrlIdx    , 0, sizeof(intCtrlIdx));
        memset (&intCtrlVal    , 0, sizeof(intCtrlVal));
        memset (&genSoftInt    , 0, sizeof(genSoftInt));
        memset (&intPtrIdx    , 0, sizeof(intPtrIdx)) ;
        memset (&intPtrVal    , 0, sizeof(intPtrVal)) ;

        ret_valeur = Hyplnk_open(0, &hyplnk_handle);

        if (ret_valeur != hyplnk_RET_OK)
        {
            System_printf("Hyplnk_open() failed.\n");
            exit(0);
        }

        set_reg.control     = &control        ;
        set_reg.genSoftInt    = &genSoftInt    ;
        set_reg.intCtrlVal    = &intCtrlVal    ;
        set_reg.intCtrlIdx    = &intCtrlIdx    ;
        set_reg.intPtrIdx    = &intPtrIdx    ;
        set_reg.intPtrVal    = &intPtrVal    ;

        control.intLocal    = 0;
        intCtrlIdx.intCtrlIdx    = 0x1;
        intCtrlVal.intEn        = 1;
        intCtrlVal.SIEN        = 1;
        intCtrlVal.mps        = 0;
        intCtrlVal.vector    = 1;
        intPtrIdx.intPtrIdx    = 0x1;
        intPtrVal.intPtr    = 0x14;
        genSoftInt.iVector    = 0x1;

        ret_valeur = Hyplnk_writeRegs (hyplnk_handle, hyplnk_LOCATION_LOCAL, &set_reg) ;

        if (ret_valeur != hyplnk_RET_OK)
        {
            System_printf("Hyplnk_writeRegs() à  échoué.\n");
            exit(0);
        }

        ret_valeur = Hyplnk_close(&hyplnk_handle);

        if (ret_valeur != hyplnk_RET_OK)
        {
            System_printf("Hyplnk_open() a échoué.\n");
            exit(0);
        }

    And in DSP "A" I just wrote:

    control.statusIntVec = 0x1;

    control.int2cfg =    1;

    The result is I don't have any interrupt on DSP "A", the IFR bit is never set. So surely my configuration on DSP "B" is wrong but the hyperlink UG is not very clear on the subject...

    It is just said that you have to write a vector into the genSoftInt register to generate a software interrupt and then clear the Intlocal bit to send the interrupt to the other DSP.

    So I'm just a bit lost...

  • Michael,

    We need to confirm this function from our application verification team, because we didn't tested this feature from application level.

    it will take a couple of weeks to finish the verification and I'll let you know as soon as I get their result. sorry for the latency.

    Regards,

    Albert

  • Hi Albert,

    Thank you really much for what you are doing.

    But it seems that I've got some troubles with my hyperlink cable. I mean, I can from the DSP "A" write into the registers of the DSP"B" but I can't do the opposite.

    I don't think the problem comes from the boards so I think my hyperlink cable is the source. I'll try to fix it on Monday by reversing the cable and use 1 lane instead of 4.

    Regards.

  • Hi,

    I fixed my problem I told you in my previous post. So now the DSP "B" can write fine into registers of DSP "A".

    In order to send an interrupt, I just set the int_pend_set.intSet bit of DSP "A" from DSP "B".

    I'll try later to generate a soft interrupt.

    Thank you for your precious help.

    Regards.