【发布时间】:2017-04-21 11:09:56
【问题描述】:
我使用 Picozed SDR SOM 2x2。我的 Vivado 和 SDK 工具的版本是 2015.4。
我需要为 axi_uartlite 块使用一些 PMOD 连接器。
生成比特流后,我已将硬件导出到 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