File tree Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,19 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
709
709
}
710
710
else
711
711
{
712
- return HAL_ERROR ;
712
+ /* MBED patch - ST internal ticket 42806 */
713
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLSRC ) != RCC_OscInitStruct -> PLL .PLLSource ) {
714
+ return HAL_ERROR ;
715
+ }
716
+
717
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLDIV ) != RCC_OscInitStruct -> PLL .PLLDIV ) {
718
+ return HAL_ERROR ;
719
+ }
720
+
721
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLMUL ) != RCC_OscInitStruct -> PLL .PLLMUL ) {
722
+ return HAL_ERROR ;
723
+ }
724
+ /* MBED patch - ST internal ticket 42806 */
713
725
}
714
726
}
715
727
return HAL_OK ;
Original file line number Diff line number Diff line change @@ -713,10 +713,21 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
713
713
}
714
714
else
715
715
{
716
- return HAL_ERROR ;
716
+ /* MBED patch - ST internal ticket 42806 */
717
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLSRC ) != RCC_OscInitStruct -> PLL .PLLSource ) {
718
+ return HAL_ERROR ;
719
+ }
720
+
721
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLDIV ) != RCC_OscInitStruct -> PLL .PLLDIV ) {
722
+ return HAL_ERROR ;
723
+ }
724
+
725
+ if (READ_BIT (RCC -> CFGR , RCC_CFGR_PLLMUL ) != RCC_OscInitStruct -> PLL .PLLMUL ) {
726
+ return HAL_ERROR ;
727
+ }
728
+ /* MBED patch - ST internal ticket 42806 */
717
729
}
718
730
}
719
-
720
731
return HAL_OK ;
721
732
}
722
733
Original file line number Diff line number Diff line change @@ -877,7 +877,31 @@ HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct)
877
877
}
878
878
else
879
879
{
880
- return HAL_ERROR ;
880
+ /* MBED patch - ST internal ticket 42806 */
881
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLSRC ) != RCC_OscInitStruct -> PLL .PLLSource ) {
882
+ return HAL_ERROR ;
883
+ }
884
+
885
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLM ) != RCC_OscInitStruct -> PLL .PLLM ) {
886
+ return HAL_ERROR ;
887
+ }
888
+
889
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLN ) != RCC_OscInitStruct -> PLL .PLLN ) {
890
+ return HAL_ERROR ;
891
+ }
892
+
893
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLP ) != RCC_OscInitStruct -> PLL .PLLP ) {
894
+ return HAL_ERROR ;
895
+ }
896
+
897
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLQ ) != RCC_OscInitStruct -> PLL .PLLQ ) {
898
+ return HAL_ERROR ;
899
+ }
900
+
901
+ if (READ_BIT (RCC -> CFGR , RCC_PLLCFGR_PLLR ) != RCC_OscInitStruct -> PLL .PLLR ) {
902
+ return HAL_ERROR ;
903
+ }
904
+ /* MBED patch - ST internal ticket 42806 */
881
905
}
882
906
}
883
907
return HAL_OK ;
You can’t perform that action at this time.
0 commit comments