Other Parts Discussed in Thread: AM5729
Hi,
I'm writing an application that requires all 4 of the PRUs on the AM5728 to be synchronised (+= 1 clock cycle) while performing IO (specifically, I've got a 16MHz 48-bit bus to read from, hence all PRUs need to work in sync). I'm attempting to synchronise them with interrupts, and I've been successful within a PRU-ICSS (specifically, between PRUs 2_0 and 2_1). However, I am struggling to get interrupts to trigger between the two PRU subsystems.
I am mapping IRQ ('System Event') 28 to host interrupt 4, and I am triggering IRQ28 manually on PRU2_0 (by writing 28 to the INTC SICR register). I have observed that HI4 is indeed triggering on this PRU (by looking at the HIPIR4 register). I then map PRU-ICSS2_HI4 (IRQ crossbar #198) to system event 38 on PRU-ICSS1 using the configuration register at 0x4A00 28D4 (bits 8:0). Code snippet:
// Map global interrupt sources void *CTRL_CORE_BASE = (void *)0x4A002000; uint32_t *p_CTRL_CORE_PRUSS1_IRQ_38_39 = (uint32_t *)(CTRL_CORE_BASE + 0x8D4); // Reset *p_CTRL_CORE_PRUSS1_IRQ_38_39 = 0; // IRQ 38 = PRUSS2_IRQ_HOST4 *p_CTRL_CORE_PRUSS1_IRQ_38_39 |= 198; // IRQ 39 = PRUSS2_IRQ_HOST5 *p_CTRL_CORE_PRUSS1_IRQ_38_39 |= (199 << 16);
System event 38 (IRQ38) on PRU1_0 is mapped to Host Interrupt 0, and I have confirmed that manually triggering IRQ38 does indeed trigger HI0. Therefore, I believe that my error lies in the mapping of PRU-ICSS2_HI4 to PRU-ICSS1_IRQ38.
Could you please point out what I am missing in order to tie a PRU host interrupt to a PRU IRQ?
Thanks,
Scott
EDIT: Correction: the part number is actually AM5729. The board is a Beaglebone AI Rev.A1