mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #5896 from jeromecoutant/PR_DEEPSLEEP
STM32LX : HAL_RCC_OscConfig update in PLL configurationpull/5912/head
commit
de5c170eee
|
@ -709,7 +709,19 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
|||
}
|
||||
else
|
||||
{
|
||||
return HAL_ERROR;
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLDIV) != RCC_OscInitStruct->PLL.PLLDIV) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
}
|
||||
}
|
||||
return HAL_OK;
|
||||
|
|
|
@ -713,10 +713,21 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
|||
}
|
||||
else
|
||||
{
|
||||
return HAL_ERROR;
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLDIV) != RCC_OscInitStruct->PLL.PLLDIV) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_CFGR_PLLMUL) != RCC_OscInitStruct->PLL.PLLMUL) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
}
|
||||
}
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -877,7 +877,31 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
|
|||
}
|
||||
else
|
||||
{
|
||||
return HAL_ERROR;
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLN) != RCC_OscInitStruct->PLL.PLLN) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
if (READ_BIT(RCC->CFGR, RCC_PLLCFGR_PLLR) != RCC_OscInitStruct->PLL.PLLR) {
|
||||
return HAL_ERROR;
|
||||
}
|
||||
/* MBED patch - ST internal ticket 42806 */
|
||||
}
|
||||
}
|
||||
return HAL_OK;
|
||||
|
|
Loading…
Reference in New Issue