嵌入式开发者社区

标题: AM57x PCIe中断问题 [打印本页]

作者: liuzhanchun    时间: 2019-8-23 14:05
标题: AM57x PCIe中断问题
参考 创龙的例程  tl-messageq-pcie-edma

代码里面 向量号 12 是否需要FPGA定义,现在的问题是收到中断,进不到中断函数
[attach]5530[/attach]
[attach]5531[/attach]

作者: 梁淑怡-Tronlong    时间: 2019-8-27 08:58
您好,
    vector只是指硬件中断号,由AM5728这边决定,即ARM端
这个硬件号的选择从4-15都可以使用,目前被占用的只有14,15。剩下的都可以使用
[attach]5539[/attach]
[attach]5541[/attach]
[attach]5540[/attach]



作者: liuzhanchun    时间: 2019-8-27 09:22
梁淑怡-Tronlong 发表于 2019-8-27 08:58
您好,
    vector只是指硬件中断号,由AM5728这边决定,即ARM端
这个硬件号的选择从4-15都可以使用,目前 ...

嗯嗯  这个了解,现在PCIE是收不到FPGA的MSI中断
作者: liuzhanchun    时间: 2019-8-27 10:49
创龙工程师你们好
  请教一下PCIE的问题  am5728和FPGA调试pcie接口接收不到MSI的中断,跳转不到PlatformMsiIntxIsr函数,请教一下DSP端代码 或者FPGA端该如何修改 ,还需传递哪些配置

static void PlatformMsiIntxIsr (uintptr_t vhandle)
{
    pcieTiConfIrqStatusMsiReg_t pendingBits;
    pciePlconfMsiCtrlIntStatusReg_t msiBits[8];
    pciePlconfMsiCtrlIntStatusReg_t *clearMsiBits = NULL;
    int32_t clearMsiBitsSize = 0;
    Pcie_Handle handle = (Pcie_Handle)vhandle;
    int32_t msiError = 0, i;

    isr_count++;
    isr_flag = 1;
#if 1
    /* Figure out which type if interrupt */
    if (Pcie_getPendingFuncInts (handle, &pendingBits, sizeof(msiBits), msiBits) == pcie_RET_OK)
    {
#if 0
            msi_isr_index = 0;
            for (i = 1; i < 32; i++)
            {
                if (msiBits[0].msiCtrlIntStatus & (1<<i))
                {
                    msi_isr_index = i;
                    msi_index_count[msi_isr_index] += 1;
                    break;
                }
            }
#endif
            /* clear it */
            clearMsiBitsSize = sizeof(msiBits);
            clearMsiBits = msiBits;
    }
#endif
    /* Tell user task ISR happend */
    //SemaphoreP_postFromISR (semaphoreHandle);
    /* Clear/acknowledge the interrupt */
    Pcie_clrPendingFuncInts (handle, &pendingBits, clearMsiBitsSize, clearMsiBits);
}



作者: liuzhanchun    时间: 2019-8-27 10:52
[attach]5542[/attach]

这里的 下面两个值如何定义的
   cpuEvent = 48;
    xbarIndex = cpuEvent - 31;

作者: 12345    时间: 2019-8-27 15:00
liuzhanchun 发表于 2019-8-27 10:52
这里的 下面两个值如何定义的
   cpuEvent = 48;
    xbarIndex = cpuEvent - 31;

你好,      1、在TRM手册中可以看到,对于DSP1来说,DSP1_IRQ_48是一个预留中断事件号,没有特意指定的,换成其他也可以。

      [attach]5544[/attach]

      2、你提到了,接收到了中断,但没有进入中断服务函数。请问你是通过什么方式确认接收到了中断?

作者: liuzhanchun    时间: 2019-8-27 17:15
没有接收到中断,用MSI方式,进不了中断  FPGA与dsp代码怎么设置才能接到呢
作者: 12345    时间: 2019-8-28 09:44
liuzhanchun 发表于 2019-8-27 17:15
没有接收到中断,用MSI方式,进不了中断  FPGA与dsp代码怎么设置才能接到呢

你好,
       可以通过查看5728端的寄存器,确认MSI中断的触发状态,以确认是MSI中断的接收或者中断发送的问题。

作者: liuzhanchun    时间: 2019-8-30 17:08
多谢支持  可以了




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4