Hi all,
I need a clarification about interrupt setting for the C6657 in case of firmware without BIOS.
I would like to clarify the differences between primary interrupts set-up and secondary interrupts set-up.
As per my understanding, primary events are routed directly to the INTC module, while secondary events for the cores are routed trough CIC0 (which in turn has 12 entries in the primary events list). Looking at the following image, I guess that the CIC output channels are the same concept (and then the same number) as Host Interrupts. Is that right? If not, what number shall I use into CSL_CPINTC_mapSystemIntrToChannel and CSL_CPINTC_enableHostInterrupt?

I would like to speak about a practical example, to check whether I'm doing the right things while setting up a primary event (let's say interrupt from GPIO8) and a secondary event (let's say interrupt from GPIO16). Please have a look at the following example showing the differences and come back with any suggestion/correction, please. It's supposed to be a logical example rather than a piece of working code.
Common initial calls for both cases:
CSL_intcGlobalNmiEnable();
CSL_intcGlobalEnable(&state);
Primary events (table 8-33 of SPRS814B):
They're directly routed to INTC, so they can be set up directly without additional mapping
CSL_intcOpen(&IntcObj, EVENT_NUMBER_FROM_TABLE_8_33, &vectId_4_15, NULL)
Secondary events (table 8-34 of SPRS814B):
CIC0 is in the middle, so first set up CIC0
IntcHandler = CSL_CPINTC_open(0);
CSL_CPINTC_setNestingMode (IntcHandler, CPINTC_NO_NESTING);
CSL_CPINTC_disableAllHostInterrupt(IntcHandler);
CSL_CPINTC_clearSysInterrupt (IntcHandler, EVENT_NUMBER_FROM_TABLE_8_34);
CSL_CPINTC_enableSysInterrupt (IntcHandler, EVENT_NUMBER_FROM_TABLE_8_34);
CSL_CPINTC_mapSystemIntrToChannel(IntcHandler, EVENT_NUMBER_FROM_TABLE_8_34, CIC0_CHANNEL_0_11 /*channel*/);
CSL_CPINTC_enableHostInterrupt (IntcHandler, CIC0_CHANNEL_0_11 /*host_event*/);
CSL_CPINTC_enableAllHostInterrupt(IntcHandler);
Then set up the primary event which will be one of the 12 CIC0 output channels used as primary events
CSL_intcOpen (&intcObj, EVENT_NUMBER_FROM_TABLE_8_33, &vectId_4_15 , NULL);
It's said that channel are already mapped to host interrupts, so this means I should never call the function CSL_CPINTC_mapChannelToHostInterrupt. Is that right?
Is there any CSL function to get the eventId based on the channel/host_event?
Thanks and best regards,
Luca