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.

Interrupt Handing in c6678

Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm working on interrupts in c6678 processor.

The below is the code for Pcie interrupts.

{

int eventId;
ti_sysbios_family_c64p_Hwi_Params params;
CpIntc_mapSysIntToHostInt(0, 50, 32);
CpIntc_enableHostInt(0, 32);
CpIntc_enableSysInt(0, 50);
eventId = CpIntc_getEventId(32);

Hwi_Params_init(&params);
params.arg = 32;
params.eventId = eventId;
params.enableInt = TRUE;

Hwi_create(4, &hwi_pcie_inta, &params, NULL);
Hwi_enableInterrupt(4);
Hwi_enable();

}

1. How to choose the system interrupt and host interrupt numbers?

2. What does 0, 50 and 32 represents here in the above code in CpIntc_mapSysIntToHostInt() and how the numbers are choosen?

3. What does number 4 represents in the Hwi_create() function?

Thanks, Waiting for the reply.

  • Mounika anugula,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    Please refer below wiki page for information about keystone devices interrupt configuration.

    processors.wiki.ti.com/.../Configuring_Interrupts_on_Keystone_Devices

    Note: We strongly recommend you to create new e2e thread for your queries instead of following up on an old/closed e2e thread, new threads gets more attention than old threads and can provide link of old threads or information on the new post for clarity and faster response.

  • Hi,

    Thanks for the reply.

    I already went through that page, but i didn't understand how the sysint number and hostint numbers are chosen.

    can u please explain me that.

    Thank you,

    Mounika Anugula

  • Hi Mounika

    Mounika Anugula said:

    1. How to choose the system interrupt and host interrupt numbers?

    2. What does 0, 50 and 32 represents here in the above code in CpIntc_mapSysIntToHostInt() and how the numbers are choosen?

    3. What does number 4 represents in the Hwi_create() function?

    1. You need to look at tables 7-32 and 7-38 in c6678 datasheet

    2. 0 is the number of Chip Interrupt controller, 50 is the number of input system event (PCIEXpress_Legacy_INTA) on CIC0. 32 is the nubmer of host intterupt (output of CIC0). Host intterupt 32 of CIC0 is routed to input number 21 of corepack 0 intterrupt controller. If you print eventId you'll see number 21.

    3. 4 is the number of intterupt of core 0

    Andrey

  • Hi, 

    Thanks for the reply,

    It was very useful.

    Can you please tell me how the interrupt of Core 0 can be chosen, is it device specific or we can choose randomly from the 12 interrupts that we have for Core0?

    Thank you,

    Mounika Anugula

  • The following will help you understand the interrupt mapping,

    CpIntc_mapSysIntToHostInt(0, 50, 32) - 

    0  - CIC0

    50 - CIC0 system event number.

    PCIEXpress_Legacy_INTA Legacy interrupt mode (Table 7-38 of data manual)

    32 - Host interrupt(System Event I/P) - CIC0_OUT(32 + 0 + 11 * 0 = 32

    21 CIC0_OUT(32+0+11*n) (7) Or CIC1_OUT(32+0+11*(n-4)) (7) Interrupt Controller output(Figure 7-32 of data manual where n is the core number which is 0) 

     

    eventId = CpIntc_getEventId(32);

    eventId - 21(Refer figure 7-32)

     

    Hwi_create(4, &hwi_pcie_inta, &params, NULL);
    Hwi_enableInterrupt(4);

    The value can be from 4-15. Please refer the C66xx corepac user guide (SPRUGW0C)

    /cfs-file/__key/communityserver-discussions-components-files/791/8054.4263.KeyStone_5F00_Interrupts.pptx

    Please refer the attached training ppt for more information. 

     

  • Hi Mounika

    Mounika Anugula said:
    Can you please tell me how the interrupt of Core 0 can be chosen, is it device specific or we can choose randomly from the 12 interrupts that we have for Core0?

    You can chose any you like. But than a several host interrupts are routed to the same bit, it will be a little slower to resolve exact interrupt source.

  • Hi,

    Thank you for the info, it was very helpful.

    Thanks,

    Mounika