Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
I am new to PRU INTC and am stuck. I’m trying to understand how to implement INTC interrupts.
To help me understand I’d like to use the PRU ECAP peripheral with INTC.
First, the ECAP module is setup for operation with interrupts enabled (ECAP_ECFLG_ECEINT)
Next, for routing INTC I am looking at 6.4.7.2 from the TRM for INTC config.
1) Polarity and Type
What does this mean?
2) ICSS_INTC_CH_MAP_REG3 register bit field CH_MAP_15 = 0x0
This means whenever a PRU ECAP interrupt is triggered, it is routed out to Channel 0?
3) ICSS_INTC_HINT_MAP_REG0 register bit field HINT_MAP_0 = 0x0
This means Channel 0 interrupts are routed out to Host 0 interrupts
4) Write 1h to ICSS_INTC_ENABLE_CLR_REG0 bit fields to clear interrupts
This is easy to understand
5) Enable Host Interrupt by writing index value to ICSS_INTC_HINT_ENABLE_SET_INDEX_REG
I don’t understand what this wants me to do…
6) Enable global interrupts
I don’t know how to actually write the ISR in assembly so when the ECAP interrupt triggers the event goes to Channel 0 Host 0 and then triggers an ISR…
I saw some example code in pru_io ADC example project that uses the following, but haven’t seen the declaration yet or how it is included…
Also I wasn’t sure where in the assembly file the interrupts were enabled…or was channel/host mapping all done in syscfg?
m_prgm_flow_jump_on_intr PRGM_FLOW_EVENT, PRGM_FLOW_EVENT_BIT, 6, TEMP_REG_1, IDLE, IEP, SAMPLE_TRANSFER, ADC_CONFIG, READ_SAMPLES, RESET
