Part Number: DRA829J
Hi, I'm trying to set up the R5 core MCU2_0 RTI WWD, but the settings don't seem to have any effect. I never get the reset nor the interrupt, regardless the configuration. Below is the code I'm using, based on PDK's rti_app_dwwd_v1.c example:
static void initWatchdog(void)
{
rtiInterruptConfig();
/* Set RTI clock source */
HW_WR_FIELD32(CSL_CTRL_MMR0_CFG0_BASE + CSL_MAIN_CTRL_MMR_CFG0_WWD28_CLKSEL,
CSL_MAIN_CTRL_MMR_CFG0_WWD28_CLKSEL_CLK_SEL,
0x3u);
uint32_t status;
RTIDwwdGetStatus(CSL_RTI28_CFG_BASE, &status);
RTIDwwdClearStatus(CSL_RTI28_CFG_BASE, status);
int32_t result = RTIDwwdWindowConfig(CSL_RTI28_CFG_BASE,
RTI_RTIDWWDRXNCTRL_DWWDRXN_INTERRUPT,
10000u * 32u,
RTI_RTIDWWDSIZECTRL_DWWDSIZE_100_PERCENT);
ASSERT(CSL_PASS == result);
result = RTIDwwdCounterEnable(CSL_RTI28_CFG_BASE);
ASSERT(CSL_PASS == result);
}
static void rtiInterruptConfig(void)
{
OsalRegisterIntrParams_t intParams;
Osal_RegisterInterrupt_initParams(&intParams);
intParams.corepacConfig.arg = (uintptr_t)NULL;
intParams.corepacConfig.priority = 1u;
intParams.corepacConfig.corepacEventNum = 0u; /**< Not used */
intParams.corepacConfig.isrRoutine = &rtiWwdIsr;
intParams.corepacConfig.intVecNum = CSLR_R5FSS0_CORE0_INTR_RTI28_INTR_WWD_0;
HwiP_Handle hHwiHandle;
OsalInterruptRetCode_e osalRetVal = Osal_RegisterInterrupt(&intParams, &hHwiHandle);
seASSERT(OSAL_INT_SUCCESS == osalRetVal);
}
I'm calling Board_unlockMMR() before configuring RTI.
I also tried setting the wwdt reaction to RTI_RTIDWWDRXNCTRL_DWWDRXN_RESET, but no change either.
Is there something I'm missing in the RTI WWD setup?