I'm trying to trigger MSI interrupt vector 0 in core0 of my C6678 by writing to the MSI_IRQ from the device/core0 itself.
Here is what I'm doing and what parts of the interrupt-chain are working:
I configured SystemInterrupt CSL_GEM_PCIEXPRESS_MSI_INTN (0x17) to call my isr. This is tested by calling CpIntc_postSysInt(0, 17) - interrupt gehts triggered.
So my problem seems to be inside the PCIe subsystem. Here is my PCIe MSI initialization:
//enable MSI interrupts in MSI Capability register
hPciessCfgSpaceRootComplexRegs->MSI_CAP |= CSL_PCIE_CFG_SPACE_ROOTCOMPLEX_MSI_CAP_MSI_EN_MASK;
//Write 1 to Bit0 of MSI0_IRQ_STATUS to clear vector0
hPciessAppRegs->MSIX_IRQ[0].MSI_IRQ_STATUS = 0x01;
//Write to EOI to clear InterruptEventNumber 4 (vector0 is part of this event number)
hPciessAppRegs->IRQ_EOI = 0x04;
//enable MSI vector 0 IRQ
hPciessAppRegs->MSIX_IRQ[0].MSI_IRQ_ENABLE_SET = 0x01;
When I now write 0x00 to MSI_IRQ or 0x01 to MSI0_IRQ_STATUS_RAW, the MSI0_IRQ_STATUS register changes from 0x0 to 0x1. But the interrupt isn't triggered:
hPciessAppRegs->MSI_IRQ = 0x00;
hPciessAppRegs->MSIX_IRQ[0].MSI_IRQ_STATUS_RAW = 0x1;
What else do I need to get this MSI interrupt to work?
Thanks,
Thomas