I'm trying to port the starterware uart example in order to be used under sys/bios but I'm facing the following problem, after I've replaced the interrupt configuration by hwi configuration the interrupt has not been activated.
So i tried to use that line from starterware interrupt configuration which set the IER register to enable the rx and tx interrupts the code work for one time and stuck in an infinte loop of ISR .
static int32_t UartAppIntrConfig(uartAppObj_t *pObj) {
int32_t status = S_PASS;
intcIntrParams_t intrParams;
uartAppIntrCfg_t *pUartIntrConfig = &(pObj->uartAppCfg.uartAppIntrCfg);
/* Initialize the Interrupt Controller */
if (TRUE == pUartIntrConfig->isIntrSecure) {
//INTCInit(INTC_SECURE_MODE);
} else {
//INTCInit(INTC_NON_SECURE_MODE);
}
if (S_PASS == status) {
/* Do the interrupt related configurations */
//intrParams.triggerType = pUartIntrConfig->intrTrigType;
//intrParams.priority = pUartIntrConfig->intrPriority;
/*
** Assign the ISR to the function pointer to invoke when the
** interrupt is raised.
*/
//intrParams.pFnIntrHandler = &UartAppIsr;
/* Assign the app object to pass to the generic ISR */
//intrParams.pUserParam = pObj;
//intrParams.isIntrSecure = pUartIntrConfig->isIntrSecure;
/* Configure the interrupt Controller */
//status = INTCConfigIntr(pUartIntrConfig->intrLine, &intrParams,
//pUartIntrConfig->isIntrSecure);
Hwi_Params hwiParams;
Hwi_Params_init(&hwiParams);
hwiParams.priority = 1;
hwiParams.arg = 3;
hwiParams.maskSetting = Hwi_MaskingOption_SELF;
//hwiParams.eventId = 3;
hwiParams.enableInt = TRUE;
Hwi_create(104U, (Hwi_FuncPtr) UartAppIsr, &hwiParams, NULL);
}
return status;
}