【问题标题】:Zynq-7000 by Xilinx. Interrupts system for AXI Uartlite赛灵思的 Zynq-7000。 AXI Uartlite 的中断系统
【发布时间】:2017-04-21 11:09:56
【问题描述】:

我使用 Picozed SDR SOM 2x2。我的 Vivado 和 SDK 工具的版本是 2015.4。

我需要为 axi_uartlite 块使用一些 PMOD 连接器。

There is my design

生成比特流后,我已将硬件导出到 SDK。然后我导入了 xuartlite_polled_example。使用示波器和从 tx 到 rx 的物理环回,我确保示例运行良好。

然后我导入了xuartlite_intr_example(因为对我来说使用中断很重要),它不起作用。

示例中处理中断的一些来源:

static volatile int TotalSentCount = 0;
static volatile int TotalReceivedCount = 0;

void SendHandler(void *CallBackRef, unsigned int EventData)
{
    TotalSentCount = EventData;
}

void RecvHandler(void *CallBackRef, unsigned int EventData)
{
    TotalReceivedCount = EventData;
}

程序被循环捕获的地方(用系统调试器和GDB检查):

/*
 * Wait for the entire buffer to be received, letting the interrupt
 * processing work in the background, this function may get locked
 * up in this loop if the interrupts are not working correctly.
 */

while ((TotalReceivedCount != TEST_BUFFER_SIZE) ||
    (TotalSentCount != TEST_BUFFER_SIZE)) {
}

为什么我的中断不能正常工作?我还尝试了 Vivado 和 SDK 2016.4 以及 ZC702 板上。结果相同,xuartlite_polled_example 正常工作,而 xuartlite_intr_example 不正常。

我还为 AXI 中断控制器导入了 SDK 示例,但没有人在工作。

【问题讨论】:

    标签: fpga xilinx uart interrupt-handling zynq


    【解决方案1】:

    在对代码进行任何操作之前,您应该检查 AXI 中断控制器是否直接连接到 Microblaze 处理器。要快速完成,您可以在图形设计视图 (XPS) 中检查中断控制器的连接。中断控制器上的 INTERRUPT 端口必须连接到 Microblaze 的 INTERRUPT 端口。

    如果它们没有连接,显然中断将不起作用。但是您可以手动编辑项目的 .mhs 文件。对于 Microblaze 和中断控制器,添加:

       # some ports...
       BUS_INTERFACE INTERRUPT = microblaze_0_interrupt
       # some ports...
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多