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.

DSP/BIOS interrupt configuration for lwip

Other Parts Discussed in Thread: OMAPL138

Hello,

I am seeking some help regarding configuration of the interrupt for the DSP c6748 with custom board inspired by LCDKC6748/OMAPL138.

I want to run multi-threading and realtime OS in DSP. So for configuring HWI i have used configuration tool and setup the unused interrupt to emac rx and emac tx interrupts with corresponding event number 27 and 28 for core0.

bios.HWI.instance("HWI_INT10").interruptSelectNumber = 27;
bios.HWI.instance("HWI_INT10").fxn = prog.extern("Interrupt_emac_rx");
bios.HWI.instance("HWI_INT13").interruptSelectNumber = 28;
bios.HWI.instance("HWI_INT13").fxn = prog.extern("Interrupt_emac_tx");

I am masking interrupt with 'self' but yet nothing is being executed in any of the routine of  'Interrupt_emac_rx/Interrupt_emac_tx'. 

From the registers i see that ethernet module is working and link and rxgoodframes are increasing.

Any guidelines for the DSP/BIOS interrupt management or assistance to resolve the problem.

Thanks!

  • Which version of DSP/BIOS are you using? Is there a reason you're not using SYS/BIOS?

    Can you provide more information about the application. Does it ever disable/enable interrupts 10 and 13?
    If you set a breakpoint on your ISRs are they ever arrived at?

    Are you sure global interrupts are enabled? If you halt the CPU, what value is in the CSR register?

    Alan
  • Hello Alan,

    I can't use SYS/BIOS as the previous development is done over DSP/BIOS.

    I want to use Ethernet for communication and i have a working project with SYS/BIOS for the same.

    However now i am adapting that old project with the current DSP BIOS one and i see that there is no interrupt being triggered by HWI configuration.

    I have configured interrupt as above with configuration tool and enabled the interrupts with IER in the c6x.h

    Setting break point doesn't arrive at that place during debug/execution.

    register value in CSR is 0x14000100.
  • Hello Alan,

    I have tried to use interrupt.h and using the api 'IntGlobalEnable();' i am setting the global interrupt enable also.
    Now, the value for the CSR is 0x14000101.
  • Do you have to call ECM_enableEvent(27), and ECM_enableEvent(28) to unmask the rx and tx EMAC events?

    Alan
  • Hi Alan,

    I am not sure but in the interrupt.h from LWIP i have called these routines.
    // // Initialize the DSP Interrupt Controller
    IntDSPINTCInit();

    // Enable DSP Interrupts Globally
    IntGlobalEnable();

    // Register the ISR in the Interrupt Vector Table
    IntRegister(C674X_MASK_INT8, EMACCore0RxIsr);
    IntRegister(C674X_MASK_INT9, EMACCore0TxIsr);

    // Map the system interrupt to the DSP maskable interrupt
    IntEventMap(C674X_MASK_INT8, SYS_INT_EMAC_C0RX);
    IntEventMap(C674X_MASK_INT9, SYS_INT_EMAC_C0TX);

    // Enable DSP maskable interrupt
    IntEnable(C674X_MASK_INT8);
    IntEnable(C674X_MASK_INT9);

    and i am seeting interrupts by the configuration tool and saving them in the DSP.tcf.6748 also. Is that right?

    The CSR is still now acting strange. It's 0x14000102.

    Could you please suggest me the steps to configure interrupt in DSp/BIOS.
  • If you are going to use DSP/BIOS with LWIP, you'll have to stop using those "IntXyz()" APIs and start using the DSP/BIOS APIs that correspond to them.

    Also, DSP/BIOS expects that it is the owner/manager of the interrupt vector table. It appears that the LWIP code manages its own interrupt vector table. I don't know which one is getting linked in. Most likely the one DSP/BIOS is creating is NOT being used.

    It appears that porting LWIP to work with DSP/BIOS either hasn't been done before or whoever did it hasn't published their port. We do not have resources allocated to perform this work, nor is it on our roadmap to complete. Consequently, you may be facing a bit of a challenge.

    Alan
  • Thanks Alan for the 'not so cool but reality' advice!

    I would refrain from these "IntXyz()" APIs and start using the DSP/BIOS APIs!

    Moreover, i am trying that and if i get it working in upcoming days i would keep you posted!

    Have a good one!

    Axay
  • Hello Alan;

    Could you please assist me on the issue by the interrupt of DSP/BIOS.

    It stuck at this line defined by the dsp_6748cfg.s62 file.
    HWI_Obj 1, HWI_INT8, 8, _function, _monitor, _addr, _dataType, _operation, _client, _iUseDispatcher, _iArg, _IntrMask, _iCCBitMask, _iLoadTrack

    I am setting receive interrupt at HWI 8 but the all the time CSR stays at 0x14000102 that means that interrupt is disabled.
    In IER i see that IER is enabled for the 8 and 9.

    What should i do to resolve it?
  • Were you able to get past this issue?

    Alan
  • Hi Alan,

    Yes, i did!

    Have a good one!