完善资料让更多小伙伴认识你,还能领取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的转接板,请问您有什么好的建议吗? |
|
|
|
只有小组成员才能发言,加入小组>>
TMS320F28377D:新做了以377d为芯片的板子,上电后芯片复位引脚出现方波请问如何解决?
1897 浏览 0 评论
TPS55340通电后输入端保险丝烧断,芯片输入和GND之间短路
3647 浏览 4 评论
5031 浏览 0 评论
请问如何用DM368对RGB格式的图片数据进行编码生成JPEG格式图片?
1734 浏览 1 评论
9372 浏览 8 评论
CC3100BOOST使用CC3200lunchXL进行烧录
669浏览 2评论
714浏览 1评论
TMS320F28034: 利用C2prog通过SCI给TMS320F28034烧录程序,出现错误提示:Bootloading... failed (invalid echo)!
675浏览 1评论
求DLPC350 Programmer’s Guide User's Guide 中文版说明书
1197浏览 1评论
1771浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-24 13:04 , Processed in 0.526084 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号