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.

C66x Problem service MSI-interrupt in EP-mode

Other Parts Discussed in Thread: SYSBIOS

Need help!!!

Problem:

TDMXEVM6678 on AMC adapter  plug to PCIe slot in PC.

TDMXEVM6678 memory configuration L1P=32K,L1D=32K,L2-SRAM

PC enable MSI-interrupt   by write MSI_0_SET_REG :  PCI_ADDR[BAR0 + 0x108] = 1

PC periodic generate MSI-interrupt   by write to MSI_IRQ register:  PCI_ADDR[BAR0 + 0x54] = 0

On TDMXEVM6678 run application  HWI-routine hwi_msi_func call only one time

I think Interrupt request not clear, but I don't  know to do any more?


File app.cfg

  var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');

  ....

  var hwi_msiParams = new Hwi.Params();
  hwi_msiParams.instance.name = "HWI_INT4";
  hwi_msiParams.eventId = 17; // MSI-interrupt event from DataSheet
  hwi_msiParams.priority = 4;
  hwi_msiParams.enableInt = false;
  hwi_msiParams.arg = 1;
  Program.global.HWI_INT4 = Hwi.create(4, "&hwi_msi_func", hwi_msiParams);
  Hwi.common$.namedInstance = false;


File: main.c

...
#include <ti/csl/cslr_pciess_app.h>
...

Void main()
{
    ...

    Hwi_enableInterrupt(4);
    BIOS_start();     /* enable interrupts and start SYS/BIOS */
}

uint32v count = 0 ;
void hwi_msi_func(int arg)
{
  CSL_Pciess_appRegs* baseAddr = priv->handle ;
  CSL_Pciess_appMsix_irqRegs* msi_ptr = baseAddr->MSIX_IRQ ;


  Uint32 val = baseAddr->MSI_IRQ ;
  Uint32 status;
  status =  msi_ptr[0].MSI_IRQ_STATUS ;

  msi_ptr[0].MSI_IRQ_STATUS = status[0] ; // clear interrupt request

  // for check  isr calls count by PC side
  ++count ;
  baseAddr->GPR[0] = count;  
}

  • Problem is solved, I find secret added. Need write also IRQ_EOI register in HWI rotine

    uint32v count = 0 ;
    void hwi_msi_func(int arg)
    {
      CSL_Pciess_appRegs* baseAddr = priv->handle ;
      CSL_Pciess_appMsix_irqRegs* msi_ptr = baseAddr->MSIX_IRQ ;


      Uint32 val = baseAddr->MSI_IRQ ;
      Uint32 status;
      status =  msi_ptr[0].MSI_IRQ_STATUS ;

      msi_ptr[0].MSI_IRQ_STATUS = status ; // clear interrupt request

     

       // !!!!!!!! secret added !!!

       baseAddr->IRQ_EOI = 4 ; // say PCIe "interrupt is servised"

      // for check  isr calls count by PC side
      ++count ;
      baseAddr->GPR[0] = count;  
    }