void SBLUtilsConfigModules(void) { int32_t retVal = STW_SOK; uint32_t tblIndex = 0U; for (tblIndex = 0U; tblIndex < SBL_UTILS_NUM_ENTRIES_MODULE_ENABLE_TABLE; tblIndex++) { if ((PMHAL_PRCM_MOD_DSS == gModuleEnableTable[tblIndex].moduleId) && (PMHAL_PRCM_MODULE_MODE_ENABLED == gModuleEnableTable[tblIndex].moduleEnableMode)) { PMHALCMModuleEnableAllOptClock(PMHAL_PRCM_MOD_DSS); } if (PMHAL_PRCM_MOD_GPIO1 == gModuleEnableTable[tblIndex].moduleId) { PMHALCMModuleEnableAllOptClock(PMHAL_PRCM_MOD_GPIO1); } if (PMHAL_PRCM_MOD_GPIO2 == gModuleEnableTable[tblIndex].moduleId) { PMHALCMModuleEnableAllOptClock(PMHAL_PRCM_MOD_GPIO2); } if (PMHAL_PRCM_MOD_GPIO3 == gModuleEnableTable[tblIndex].moduleId) { PMHALCMModuleEnableAllOptClock(PMHAL_PRCM_MOD_GPIO3); } if (PMHAL_PRCM_MOD_GPIO4 == gModuleEnableTable[tblIndex].moduleId) { PMHALCMModuleEnableAllOptClock(PMHAL_PRCM_MOD_GPIO4); } /* Set clock frequency to 48 MHz for MMC4 */ if ((PMHAL_PRCM_MOD_MMC4 == gModuleEnableTable[tblIndex].moduleId) && (PMHAL_PRCM_MODULE_MODE_ENABLED == gModuleEnableTable[tblIndex].moduleEnableMode)) { PMHALCMMuxParentSelect(PMHAL_PRCM_MUX_MMC4_GFCLK_MUX, PMHAL_PRCM_DIV_FUNC_48M_FCLK); } /* retVal = PMHALModuleModeSet( (pmhalPrcmModuleId_t) gModuleEnableTable[tblIndex].moduleId, (pmhalPrcmModuleSModuleMode_t) gModuleEnableTable[tblIndex].moduleEnableMode, PM_TIMEOUT_INFINITE); */ retVal = PMHALModuleModeSet( (pmhalPrcmModuleId_t) gModuleEnableTable[tblIndex].moduleId, (pmhalPrcmModuleSModuleMode_t) gModuleEnableTable[tblIndex].moduleEnableMode, 100); if (STW_SOK != retVal) { SBLLibPrintf(SBLLIB_TRACE_LEVEL_ERROR, "\n Module Enable Error - "); SBLLibPrintf(SBLLIB_TRACE_LEVEL_ERROR, gModuleEnableTable[tblIndex].moduleName); SBLLibPrintf(SBLLIB_TRACE_LEVEL_ERROR, " \n"); } } SBLLibPrintf(SBLLIB_TRACE_LEVEL_INFO1, "\n Module Enable Configuration Completed \n"); }
TDA3xMA 在 SBL内运行此函数在 配置 MCASP1 是会报错: Module Enable Error - MCASP1 ;
TI源代码内配置的超时时间为无限,程序会卡死,我修改为100,会打印上述错误。
这个错误不是必现的错误,重启时,时好时坏。