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.

Enabling external interrupt: what should be checked?

Dear forum members,

after I've switched the code, accessing a network chip (on eZdsp5502) with added interrupt handler (for INT3), to DSP/BIOS, the interrupt handler is not being invoked.

Calling C55_enable() for INT3 sets the correct bit in IER0. What else should one check in order to be sure all software parts are configured properly?

Thanks,

Andrey

  • Andrey,

    Can you tell me what version of BIOS you are using?

    Also, where are you "trying to trigger" the interrupt?

    Judah

  • Judah,

    judahvang said:

    Andrey,

    Can you tell me what version of BIOS you are using?

    The last available for c55xx series: 5.42.01.09.

    judahvang said:

    Also, where are you "trying to trigger" the interrupt?

    With enabled 'link state change' and 'receive' interrupts it is enough to plug in/out a network cable or send a packet to trigger a interrupt.

    Is it possible to simulate an interrupt? One can't write directly to IFR0, is there something like ISR0?

    Andrey

  • You can try the "INTR #" assembly instruction to trigger an interrupt.

    Judah

  • judahvang said:

    You can try the "INTR #" assembly instruction to trigger an interrupt.

    Yes, it does work! Judah, thanks for the hint.

    I've checked also the configuration register for interrupt events of the network chip by reading back the content. It's correct. Is there something else could be wrong between DSP senses the level change on a pin and issues INTR?

  • Andrey,

    You said,  "after I've switched the code, accessing a network chip (on eZdsp5502) with added interrupt handler (for INT3), to DSP/BIOS, the interrupt handler is not being invoked."

    Did you have this working outside of BIOS before?  If you were able to trigger the interrupt and have your ISR execute outside of BIOS, but you can't in BIOS then I would think something is missing in the BIOS case.  If that's not the case, then I might suggest this forum post be moved to a hardware specific forum where someone might know more about the hardware and can answer your question.

    Judah

  • judahvang said:

    Andrey,

    You said,  "after I've switched the code, accessing a network chip (on eZdsp5502) with added interrupt handler (for INT3), to DSP/BIOS, the interrupt handler is not being invoked."

    Did you have this working outside of BIOS before?  If you were able to trigger the interrupt and have your ISR execute outside of BIOS, but you can't in BIOS then I would think something is missing in the BIOS case.  If that's not the case, then I might suggest this forum post be moved to a hardware specific forum where someone might know more about the hardware and can answer your question.

    Yes, it works without the BIOS (and with BIOS only by polling). I've checked the register content just to be sure, that this most relevant for the interrupts based case is not for some reason corrupted.

  • Andrey,

    If it works without BIOS, I don't see any reason why it wouldn't work with BIOS.  Without knowing the specifics, basically, your interrupt handler becomes a Hwi.  You probably have some init code that intializes the network chip, and that should be done in main() or prior to main().  The body of your code that process the data should be a TSK.

    The way the interrupt is triggered without BIOS should be the same way its triggered with BIOS.

    I know i'm simplyfing it, but really BIOS simply adds the ability to schedule things.  The hardware should still work the same.

    Judah

  • Judah, thanks for your reply. After I went through the running CSL and BIOS programs once again, I've finally noticed the key difference:

    IRQ_enable(IRQ_EVT_INT3); // CSL
    C55_enableInt(C55_INT3);  // DSP/BIOS

    are not the same, though looking identical. I'm really wondering, why DSP/BIOS defines C55_INT3 differently comparing to CSL, namely to be not INT3 actually, but the BIT 3 in IER0, while IRQ_EVT_INT3 is defined as 11 (staying indeed for INT3). Analogously with a HWI declaration: HWI_INT3 doesn't stay for INT3, but HWI_INT11 would be right.