Tool/software: TI-RTOS
In the PRU example PRU_PRUtoARM_Interrupt, It has the code:
uint32_t *pDdr = (uint32_t *) &CT_DDR;
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
CT_INTC.GER = 0x1;
__R31 = 0x00000000;
pDdr[1] = 0x0001;
CT_INTC.HIEISR |= HOST_NUM;
CT_INTC.HMR0_bit.HINT_MAP_2 = HOST_NUM;
CT_INTC.CMR4_bit.CH_MAP_19 = CHAN_NUM;
CT_INTC.SICR = (PRU0_ARM_INTERRUPT - 16);
CT_INTC.EISR = (PRU0_ARM_INTERRUPT - 16);
PRU0_CTRL.CTPPR1_bit.C31_POINTER = 0x0;
pDdr[1] = 0xB;
__halt();
}
I have two question:
1. does which line of code above set the interrupt ? I can find the enable/map/clear instructions, but I cannot find set one.
2. if generated the interrupt, how the host CPU get it? On the TRM, there are only four pages to describe interrupt table. How to program about interrupt?where can I have the example programm?