完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
下面是个简单的例子 供参考 谢谢!
void Pcie_init_interrupt() [ printf("**************************************************n"); printf("****************** PCIE MSI Testing ****************n"); printf("**************************************************n"); /************************************************ *************** INTC Configuration ************* ************************************************/ printf("Debug: GEM-INTC Configuration...n"); /* INTC module initialization */ intcContext.eventhandlerRecord = EventHandler; intcContext.numEvtEntries = 10; if (CSL_intcInit(&intcContext) != CSL_SOK) [ printf("Error: GEM-INTC initialization failedn"); return; ] /* Enable NMIs */ if (CSL_intcGlobalNmiEnable() != CSL_SOK) [ printf("Error: GEM-INTC global NMI enable failedn"); return; ] /* Enable global interrupts */ if (CSL_intcGlobalEnable(&state) != CSL_SOK) [ printf("Error: GEM-INTC global enable failedn"); return; ] /* Open the INTC Module for Vector ID: 4 and Event ID: 63 (C6678) 59 (C6670) * Refer to the interrupt architecture and mapping document for the Event ID (INTC0_OUT3)*/ vectId = CSL_INTC_VECTID_4; hTest = CSL_intcOpen (&intcObj, 17, &vectId , NULL); if (hTest == NULL) [ printf("Error: GEM-INTC Open failedn"); return; ] /* Register an call-back handler which is invoked when the event occurs. */ EventRecord.handler = &test_isr_handler; EventRecord.arg = 0; if (CSL_intcPlugEventHandler(hTest,&EventRecord) != CSL_SOK) [ printf("Error: GEM-INTC Plug event handler failedn"); return; ] /* Enabling the events. */ if (CSL_intcHwControl(hTest,CSL_INTC_CMD_EVTENABLE, NULL) != CSL_SOK) [ printf("Error: GEM-INTC CSL_INTC_CMD_EVTENABLE command failedn"); return; ] printf("Debug: GEM-INTC Configuration Completedn"); ] /* * ======== main ======== */ void main() [ //Task_Handle task; //Error_Block eb; pcieRet_e retVal; printf("enter main()n"); #if 0 Error_init(&eb); task = Task_create(taskFxn, NULL, &eb); if (task == NULL) [ System_printf("Task_create() failed!n"); BIOS_exit(0); ] #endif Pcie_init_interrupt(); //Hwi_enableInterrupt(5); //! initialize PCIe Module /* Set the PCIe mode*/ if ((retVal = Pcie_setMode(PcieModeGbl)) != pcie_RET_OK) [ printf("Set PCIe Mode failed (%d)n", (int)retVal); exit(1); ] /* Power up PCIe Module */ if ((retVal = pciePowerCfg()) != pcie_RET_OK) [ printf("PCIe Power Up failed (%d)n", (int)retVal); exit(1); ] //enable PCIe MSI Interrupt MSI0_IRQ_ENABLE_SET = 0xF; //enable MSI_0/8/16/24 MSI_IRQ = 0x8; //BIOS_start(); /* enable interrupts and start SYS/BIOS */ ] |
|
|
|
|
|
|
|
|
|
|
|
Thomas Yang1 你好, 请问我在收到这个中断之后,我把数据完成了处理,想回发一个中断给PC端,怎么回发一个中断呢? 我使用的是c6678,请问c6678是作为EP端是吧?PC是RC端? |
|
|
|
|
|
您好@Thomas Yang1 能否将这个例子的工程发上来,目前本人正在调试这个MSI功能,遇到了点困难,感谢! |
|
|
|
|
|
您好,我现在想要调试PCIe遇到点麻烦,电脑主板上只有一个PCIe插槽并被显卡占用,市场上也找不到PCI转PCIe的转接板,请问您有什么好的建议吗? |
|
|
|
|
只有小组成员才能发言,加入小组>>
549 浏览 0 评论
1613 浏览 0 评论
2047 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1513 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1337 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1757浏览 29评论
2781浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1724浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1634浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1645浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 09:53 , Processed in 0.637896 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3952