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.

PRUSS1 event mapping in C66x in DRA72x board

Hello,

I need to register an interrupt for the PRUSS1_EVTOUT0 in C66x. but I am not finding the event value for this and it is not mapped to DSP1. It is  connected to

IRQ_CROSSBAR_186. so I tried to register the interrupt with the below code.

Hwi_Params_init(&hwiParams);

hwiParams.arg = (UArg)arg;

hwiParams.eventId = 186;

hwiParams.enableInt = TRUE;

hwiParams.maskSetting = Hwi_MaskingOption_SELF;

Error_init(&eb);

hwhandle = Hwi_create(15, (Hwi_FuncPtr)entry, &hwiParams, &eb);

if(hwhandle != NULL) {

Hwi_enableInterrupt(intNum);

}

But it is not working. when we see through the ROV ,interrupt is registered with event value of 58. DRA72x supports 428 events and C66x supports 128 events . So how to registers the interrupts in C6xx whose  IRQ_Crossbar is more than 128.

 

Thanks,

Ramesh.S

  • Hi Ramesh,

    If IRQ_CROSSBAR_186 input line is connected to PRUSS1_EVTOUT0 signal then the first step is to map this crossbar input to one of the DSP events. You can select any unused DSP event for this purpose (I would recommend using one of the DSP events that is shown as reserved in the TRM). Once the crossbar input is mapped to a DSP event, the next step is to create a Hwi for that particular event number. Once again you could use the event combiner or directly map this event to an interrupt vector.

    SYS/BIOS provides a IntXbar module that allows you to map the crossbar input to a DSP event (Link to IntXbar cdoc). I have shared some untested example code below that maps the crossbar input to a DSP event X and then using the event combiner maps the DSP event to interrupt vector 7:

    #include <ti/sysbios/family/c64p/EventCombiner.h>
    #include <ti/sysbios/family/shared/vayu/IntXbar.h>
    
    Void main()
    {
        Hwi_Params params;
        Error_Block eb;
    
        IntXbar_connectIRQ(X, 186); // Maps crossbar input 186 to DSP event X
    
        /* Plug an ISR for DSP event X */
        EventCombiner_dispatchPlug(X, &myEventFxn, X, TRUE);
    
        Hwi_Params_init(&params);
    
        params.eventId = X / 32;
        params.arg = params.eventId;
        params.enableInt = TRUE;
    
        Hwi_create(7, &EventCombiner_dispatch, &params, &eb);
        ...
    }

    Hope this helps.

    Best,

    Ashish