Hello,
I'm trying to perform a loopback data transfer across a PCIe link, initiated and controlled by MSI interrupts. My code is based on the pdk example project.
I can successfully fire the first interrupt from EP to RC to cause the RC to transmit the data. This data is received by the EP.
However, when I try to fire another interrupt to signal to the RC that the EP is sending the data back, the interrupt does not cross the link and get received by the RC.
I am using the following lines of code to configure OB translation to point to the RC BAR0, write the vector to the MSI_IRQ register to trigger the interrupt and then point the OB trans back to its previous value to enable data transfer:
/*Move Outbound Translation to trigger MSI; 0x7000_0000 */
pcieObTransCfg(0x70000000, PCIE_OB_HI_ADDR_S, PCIE_OB_REGION_S);
System_printf("Interrupt Sent\n");
*((volatile uint32_t *) 0x60000054) = 0x0;
/*Move Outbound Translation back to sending data; 0x9000_0000*/
pcieObTransCfg(0x90000000, PCIE_OB_HI_ADDR_S, PCIE_OB_REGION_S);
I was wondering whether the method of directly writing a value to an address, using the PCIe data space, is not the best approach
Is it possible that when a data transfer occurs, this address is displaced to a higher location or some other change in its function?
The ISR reset and all other initialisation code on the RC is fault free as the data transfer can be delayed behind multiple interrupts and they all pass. The program only falters if the interrupt occurs after a data transfer.
Any suggestions of either and alternative system to trigger the interrupt across the link or reason for this phenomenon occurring would be appreciated.
Thx
Charles