Hi champs,
When I want to use the
SBLLibCPUReset(SBLLIB_CORE_ID_EVE1);
function from sbl_lib_platform.c file in the ti-pdk-2020.4.16 version in my custom application, I see that the code is stuck in the while loop in PMHALResetRelease called by this function.My code starts immediately after u-boot and EVEs need to be reset.Can you help with the problem?
int32_t PMHALResetRelease(pmhalPrcmResetGroupId_t resId, uint32_t timeout) { AppUtils_printf("PMHAL line 293\n"); pmErrCode_t retVal; uint32_t resetCtrlMask; uint32_t timeToWait; uint32_t rstStat; uint32_t rstStMask; rstStat = 0x0U; retVal = PM_SUCCESS; retVal = PmhalIsResetDomainIdValid(resId); if (PM_SUCCESS == retVal) { retVal = PmhalIsResetDomainRegAvailable(resId); } if (PM_SUCCESS == retVal) { /* Put the local reset domain out of reset state by programming the * <RD>_RSTCTRL bit to 0. */ resetCtrlMask = (uint32_t) 1U << pmhalResetDomainElems[resId].rstCtrlBitField->regShift; HW_WR_FIELD32_RAW( pmhalResetDomainElems[resId].rstCtrlBitField->regAddr, resetCtrlMask, pmhalResetDomainElems[resId].rstCtrlBitField->regShift, (uint32_t) 0x0U); /* On lifting the reset based on the time out given by the user wait * for the reset to complete and the status reflected in the <RD>_RSTST. */ if (timeout == PM_TIMEOUT_NOWAIT) { /* Will not wait for the release status */ ; } else if (timeout == PM_TIMEOUT_INFINITE) { /* Wait infinitely for the reset to complete */ do { rstStMask = (uint32_t) 1U << pmhalResetDomainElems[resId].rstStBitField-> regShift; rstStat = (uint32_t) HW_RD_FIELD32_RAW( pmhalResetDomainElems[resId].rstStBitField->regAddr, rstStMask, pmhalResetDomainElems[resId].rstStBitField->regShift); } while (0x1U != rstStat); } else { /* Wait for the reset to complete till time out occurs */ timeToWait = timeout; do { rstStMask = (uint32_t) 1U << pmhalResetDomainElems[resId].rstStBitField-> regShift; rstStat = (uint32_t) HW_RD_FIELD32_RAW( pmhalResetDomainElems[resId].rstStBitField->regAddr, rstStMask, pmhalResetDomainElems[resId].rstStBitField->regShift); timeToWait--; } while ((0x1U != rstStat) && (0U != timeToWait)); /* If the time out expires and the reset has still not completed * the function returns failure. */ if (timeToWait == 0U) { if (0x1U == rstStat) { retVal = PM_SUCCESS; } else { retVal = PM_FAIL; } } } } return (int32_t) retVal; }