你好,有两个问题帮忙确认下:
- Chip Interrupt Controller输出的Broadcast Events和Secondary Events有什么区别,与System Event 事件表有关系吗?
- CIC中断映射配置函数Void CpIntc_mapSysIntToHostInt(UInt id, UInt sysInt, UInt hostInt)
hostInt取值依据是多少,与System Event Mapping — C66x CorePac Primary Interrupts有关系?
pdk_keystone2_3_01_04_07\packages\exampleProjects 实例工程SRIO_LpbkDioIsrK2HC66BiosExampleProject内配置srio输出中断如下:
/* Map the System Interrupt i.e. the Interrupt Destination 0 interrupt to the DIO ISR Handler. */
CpIntc_dispatchPlug(CSL_CIC0_SRIO_INTDST0, (CpIntc_FuncPtr)myDioTxCompletionIsr, (UArg)hSrioDrv, TRUE);
/* The configuration is for CPINTC0. We map system interrupt 112 to Host Interrupt 8. */
CpIntc_mapSysIntToHostInt(0, CSL_CIC0_SRIO_INTDST0, 8);
/* Enable the Host Interrupt. */
CpIntc_enableHostInt(0, 8);
/* Enable the System Interrupt */
CpIntc_enableSysInt(0, CSL_CIC0_SRIO_INTDST0);
/* Get the event id associated with the host interrupt. */
eventId = CpIntc_getEventId(8);
/* Plug the CPINTC Dispatcher. */
EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, 8, TRUE);
hostInt 取值为 8 ,eventId 返回值为74,这两个值在System Event Mapping — C66x CorePac Primary Interrupts对应关系。