[HAL][RCC] Correct the configuration macro of I2S clock source and the value of I2S external clock source
diff --git a/Inc/Legacy/stm32_hal_legacy.h b/Inc/Legacy/stm32_hal_legacy.h
index 934f1f9..06cded9 100644
--- a/Inc/Legacy/stm32_hal_legacy.h
+++ b/Inc/Legacy/stm32_hal_legacy.h
@@ -1283,7 +1283,7 @@
#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2
#endif
-#if defined(STM32U5) || defined(STM32MP2)
+#if defined(STM32U5)
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
#endif
diff --git a/Inc/stm32f4xx_hal_rcc_ex.h b/Inc/stm32f4xx_hal_rcc_ex.h
index 909a717..bfba11f 100644
--- a/Inc/stm32f4xx_hal_rcc_ex.h
+++ b/Inc/stm32f4xx_hal_rcc_ex.h
@@ -526,7 +526,7 @@
* @{
*/
#define RCC_I2SCLKSOURCE_PLLI2S 0x00000000U
-#define RCC_I2SCLKSOURCE_EXT 0x00000001U
+#define RCC_I2SCLKSOURCE_EXT RCC_CFGR_I2SSRC
/**
* @}
*/
@@ -6101,7 +6101,7 @@
* @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin
* used as I2S clock source.
*/
-#define __HAL_RCC_I2S_CONFIG(__SOURCE__) (*(__IO uint32_t *) RCC_CFGR_I2SSRC_BB = (__SOURCE__))
+#define __HAL_RCC_I2S_CONFIG(__SOURCE__) (MODIFY_REG(RCC->CFGR, RCC_CFGR_I2SSRC, (__SOURCE__)))
/** @brief Macro to get the I2S clock source (I2SCLK).