Tool/software:
Hello,
I am attempting to trigger an interrupt using the UART1 peripheral on the Cortex-R5F. I am able to use the UART using TI's DRV functions, but using the A53 specific interrupts (CSL_GIC0_INTR_USART1_BUS_USART_IRQ) does not work.
So we looked into using an interrupt routing method similar to what this post describes: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/779597/am6526-creating-an-interrupt-from-pru-to-r5f. But have ran into issues.
We are using SR2.0 and attempting to configure the interrupt routing using the CSL library, the code to do so looks like this:
/* Configure MAIN2MCU_LVL_INTRTR0 interrupt router */
int32_t configureIntrRouter(
uint32_t intrRtrInIntNum,
uint32_t intrRtrOutIntNum
)
{
CSL_IntrRouterCfg intrRouterMain2MCUCfg;
int32_t retVal;
/* Initialize Main to MCU Interrupt Router config structure */
intrRouterMain2MCUCfg.pIntrRouterRegs = (CSL_intr_router_cfgRegs *)(uintptr_t)(CSL_MAIN2MCU_LVL_INTRTR0_CFG_BASE);
intrRouterMain2MCUCfg.pIntdRegs = (CSL_intr_router_intd_cfgRegs *)(uintptr_t)NULL;
intrRouterMain2MCUCfg.numInputIntrs = 192;
intrRouterMain2MCUCfg.numOutputIntrs = 64;
retVal = CSL_intrRouterCfgMux(&intrRouterMain2MCUCfg, intrRtrInIntNum, intrRtrOutIntNum);
if (retVal < 0)
{
return -1;
}
return 0;
}
And we are calling it like so:
configureIntrRouter(CSLR_MAIN2MCU_LVL_INTRTR0_IN_UART1_USART_IRQ_0, 2);
From what we can tell, we are trying to route the interrupt CSLR_MAIN2MCU_LVL_INTRTR0_IN_UART1_USART_IRQ_0 to interrupt 2 so that the TI UART driver can attach an OSAL interrupt to it.
The issue is, is that our code is hitting a data abort handler at the function CSL_intrRouterCfgMux, specifically at the line where we attempt to disable the interrupt output:
regVal &= ~INTR_ROUTER_CFG_MUXCNTL_INT_ENABLE; CSL_REG32_WR( &pCfg->pIntrRouterRegs->MUXCNTL[outputIntrNum], regVal );
Does TI know why this is happening? Is our approach to triggering an interrupt in the R5F from UART1 correct?
Thanks,
Ben