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.

c5515 multiple interrupt problem

Hi,
I have 2 interrupt sources in my project (for now) and i have some issues about serving both interrupts. I have a one hardware interrupt source and a usb module. When i run my code i noticed that my code never visits the usb_isr although usb interrupt source registers are set. However hardware intterupt is served and i didnt encounter any problems related to it.

You can see the status of usb interrupt registers below. As you can see interrupt flags for both endpoint 0 and endpoint 1 are set.

Below you can see how i enable the interrupts in initialization function. I use the IRQ_plug() and IRQ_enable() commands. I also set all used bits of USB Interrupt Mask Set Registers and their values are also below:

////////////////////////////////////////
//These values set in another function//
USB_INTMSKSETR1=0x0F1F;
USB_INTMSKSETR2=0X01FF;
////////////////////////////////////////

IRQ_setVecs((Uint32)(&VECSTART));

IRQ_plug(INT1_EVENT,&int1_isr); 
IRQ_plug(USB_EVENT, &usb_isr);

/* Enabling Interrupt */

IRQ_enable(INT1_EVENT);
IRQ_enable(USB_EVENT);

IRQ_globalEnable();

Any comments, ideas, suggestions, resource recommendations are much appreciated.

Thank you in advance.

Regards.

Hasan.

  • Hi,

    Did you try refering to USB CSL examples ? CSL_USB_IntcExample could be good one to refer to check from USB interrupts setup/configuration point of view.

    CSL example can be downloaded from the following link - http://www.ti.com/tool/sprc133

    Regards

     Vasanth

  • Hi Vasanth,

    Thanks for the reply. I checked the example you mentioned and see that they use the same csl functions for enabling USB interrupts (code below is taken from that example). I try to enable USB interrupts before making the necessary register modifications like in the example. However, my code still doest enter the usb_isr function that I wrote. When i put a break point in usb_isr nothing happens.

    If you can think of an another suggestion, i will be very happy since i dont understand the reason of this problem.

    /* Set the interrupt vector start address */
    IRQ_setVecs((Uint32)(&VECSTART));
    
    /* Plug the USB Isr into vector table */
    config.funcAddr = &usb_isr;
    IRQ_plug(USB_EVENT, config.funcAddr);
    
    /* Enable USB Interrupts */
    IRQ_enable(USB_EVENT);
    /* Enable CPU Interrupts */
    IRQ_globalEnable();

    Regards

    Hasan

  • Hasan,

    I recommend you use polling for the USB on the C5515. If you look at the errata for the part, there is an issue where if there are not enough buffers to receive bulk transmitted data, the USB module interrupts the device incessantly, and there is no way to mask it other than turning off all USB interrupts altogether.

    That said, if you are not going to use bulk transfers you could get by with interrupts.

    Regards,
    Bill
  • Bill,

    Thanks for mentioning this issue but ii am not using bulk transfer for recieving purposes. My device mainly collects data (using external interrupt) and transfer this data to the host using USB. I achieved this by polling as you say but for some efficeincy reasons, i want to do this using interrupt.

    And my main problem is i cannot enable the interrupt for the USB module by using above csl commands. If you have any other advices, i will be happy to consider them.

    Regards

    Hasan