mirror of https://github.com/ARMmbed/mbed-os.git
STM32F4: remove deprecated macro
parent
39d981cf70
commit
927cba8fa5
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -837,7 +837,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -896,7 +896,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -778,7 +778,7 @@ void SetSysClock(void)
|
|||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -842,7 +842,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -899,7 +899,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -835,7 +835,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -893,7 +893,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -835,7 +835,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -893,7 +893,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -1001,7 +1001,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -1060,7 +1060,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -1001,7 +1001,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -1060,7 +1060,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -819,7 +819,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -879,7 +879,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -836,7 +836,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -900,7 +900,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -836,7 +836,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSE oscillator and activate PLL with HSE as source */
|
||||
|
@ -895,7 +895,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
/* The voltage scaling allows optimizing the power consumption when the device is
|
||||
clocked below the maximum system frequency, to update the voltage scaling value
|
||||
regarding system frequency refer to product datasheet. */
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
|
||||
|
||||
/* Enable HSI oscillator and activate PLL with HSI as source */
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -870,8 +870,8 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
PeriphClkInitStruct.PLLI2S.PLLI2SM = 8;
|
||||
PeriphClkInitStruct.PLLI2S.PLLI2SQ = 4;
|
||||
PeriphClkInitStruct.PLLI2S.PLLI2SN = 192;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CK48CLKSOURCE_PLLI2SQ;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLI2SQ;
|
||||
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
|
@ -939,8 +939,8 @@ uint8_t SetSysClock_PLL_HSI(void)
|
|||
PeriphClkInitStruct.PLLI2S.PLLI2SM = 8;
|
||||
PeriphClkInitStruct.PLLI2S.PLLI2SQ = 4;
|
||||
PeriphClkInitStruct.PLLI2S.PLLI2SN = 192;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CK48CLKSOURCE_PLLI2SQ;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLI2SQ;
|
||||
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -785,7 +785,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -823,7 +823,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -837,7 +837,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
HAL_PWREx_ActivateOverDrive();
|
||||
HAL_PWREx_EnableOverDrive();
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|RCC_CLOCKTYPE_PCLK2;
|
||||
|
|
|
@ -786,7 +786,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -824,7 +824,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -838,7 +838,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
HAL_PWREx_ActivateOverDrive();
|
||||
HAL_PWREx_EnableOverDrive();
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|RCC_CLOCKTYPE_PCLK2;
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -793,7 +793,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -834,7 +834,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -797,7 +797,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -835,7 +835,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -849,7 +849,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
HAL_PWREx_ActivateOverDrive();
|
||||
HAL_PWREx_EnableOverDrive();
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|RCC_CLOCKTYPE_PCLK2;
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -867,7 +867,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
}
|
||||
|
||||
// Activate the OverDrive to reach the 180 MHz Frequency
|
||||
if (HAL_PWREx_ActivateOverDrive() != HAL_OK)
|
||||
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
|
||||
{
|
||||
return 0; // FAIL
|
||||
}
|
||||
|
@ -876,8 +876,8 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
PeriphClkInitStruct.PLLSAI.PLLSAIM = 8;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIN = 384;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CK48CLKSOURCE_PLLSAIP;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP;
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
// Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers
|
||||
|
|
|
@ -867,7 +867,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
}
|
||||
|
||||
// Activate the OverDrive to reach the 180 MHz Frequency
|
||||
if (HAL_PWREx_ActivateOverDrive() != HAL_OK)
|
||||
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
|
||||
{
|
||||
return 0; // FAIL
|
||||
}
|
||||
|
@ -876,8 +876,8 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
PeriphClkInitStruct.PLLSAI.PLLSAIM = 8;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIN = 384;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CK48CLKSOURCE_PLLSAIP;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP;
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
// Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers
|
||||
|
|
|
@ -867,7 +867,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
}
|
||||
|
||||
// Activate the OverDrive to reach the 180 MHz Frequency
|
||||
if (HAL_PWREx_ActivateOverDrive() != HAL_OK)
|
||||
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
|
||||
{
|
||||
return 0; // FAIL
|
||||
}
|
||||
|
@ -876,8 +876,8 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
PeriphClkInitStruct.PLLSAI.PLLSAIM = 8;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIN = 384;
|
||||
PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CK48CLKSOURCE_PLLSAIP;
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
|
||||
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP;
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
|
||||
|
||||
// Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -796,7 +796,7 @@ void SystemClock_Config(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -833,7 +833,7 @@ void SystemClock_Config(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -849,7 +849,7 @@ void SystemClock_Config(void)
|
|||
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
HAL_PWREx_ActivateOverDrive();
|
||||
HAL_PWREx_EnableOverDrive();
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|RCC_CLOCKTYPE_PCLK2;
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM2
|
||||
#define TIM_MST_IRQ TIM2_IRQn
|
||||
#define TIM_MST_RCC __TIM2_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM2_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM2_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM2_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM2_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM2_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define TIM_MST TIM5
|
||||
#define TIM_MST_IRQ TIM5_IRQn
|
||||
#define TIM_MST_RCC __TIM5_CLK_ENABLE()
|
||||
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
|
||||
|
||||
#define TIM_MST_RESET_ON __TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __TIM5_RELEASE_RESET()
|
||||
#define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
|
||||
#define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
|
||||
|
||||
#define TIM_MST_16BIT 0 // 1=16-bit timer, 0=32-bit timer
|
||||
|
||||
|
|
|
@ -795,7 +795,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -833,7 +833,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
__PWR_CLK_ENABLE();
|
||||
__HAL_RCC_PWR_CLK_ENABLE();
|
||||
|
||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||
|
||||
|
@ -847,7 +847,7 @@ void SetSysClock(void)
|
|||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
HAL_PWREx_ActivateOverDrive();
|
||||
HAL_PWREx_EnableOverDrive();
|
||||
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|
||||
|RCC_CLOCKTYPE_PCLK2;
|
||||
|
|
|
@ -82,28 +82,28 @@ void analogin_init(analogin_t *obj, PinName pin)
|
|||
#if defined(ADC1)
|
||||
if ((obj->adc == ADC_1) && adc1_inited) return;
|
||||
if (obj->adc == ADC_1) {
|
||||
__ADC1_CLK_ENABLE();
|
||||
__HAL_RCC_ADC1_CLK_ENABLE();
|
||||
adc1_inited = 1;
|
||||
}
|
||||
#endif
|
||||
#if defined(ADC2)
|
||||
if ((obj->adc == ADC_2) && adc2_inited) return;
|
||||
if (obj->adc == ADC_2) {
|
||||
__ADC2_CLK_ENABLE();
|
||||
__HAL_RCC_ADC2_CLK_ENABLE();
|
||||
adc2_inited = 1;
|
||||
}
|
||||
#endif
|
||||
#if defined(ADC3)
|
||||
if ((obj->adc == ADC_3) && adc3_inited) return;
|
||||
if (obj->adc == ADC_3) {
|
||||
__ADC3_CLK_ENABLE();
|
||||
__HAL_RCC_ADC3_CLK_ENABLE();
|
||||
adc3_inited = 1;
|
||||
}
|
||||
#endif
|
||||
// Configure ADC
|
||||
AdcHandle.Instance = (ADC_TypeDef *)(obj->adc);
|
||||
AdcHandle.Init.ClockPrescaler = ADC_CLOCKPRESCALER_PCLK_DIV2;
|
||||
AdcHandle.Init.Resolution = ADC_RESOLUTION12b;
|
||||
AdcHandle.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
|
||||
AdcHandle.Init.Resolution = ADC_RESOLUTION_12B;
|
||||
AdcHandle.Init.ScanConvMode = DISABLE;
|
||||
AdcHandle.Init.ContinuousConvMode = DISABLE;
|
||||
AdcHandle.Init.DiscontinuousConvMode = DISABLE;
|
||||
|
|
|
@ -60,9 +60,9 @@ void analogout_init(dac_t *obj, PinName pin) {
|
|||
// Configure GPIO
|
||||
pinmap_pinout(pin, PinMap_DAC);
|
||||
|
||||
__GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
|
||||
__DAC_CLK_ENABLE();
|
||||
__HAL_RCC_DAC_CLK_ENABLE();
|
||||
|
||||
DacHandle.Instance = DAC;
|
||||
|
||||
|
|
|
@ -206,55 +206,55 @@ void serial_free(serial_t *obj)
|
|||
// Reset UART and disable clock
|
||||
switch (obj_s->index) {
|
||||
case 0:
|
||||
__USART1_FORCE_RESET();
|
||||
__USART1_RELEASE_RESET();
|
||||
__USART1_CLK_DISABLE();
|
||||
__HAL_RCC_USART1_FORCE_RESET();
|
||||
__HAL_RCC_USART1_RELEASE_RESET();
|
||||
__HAL_RCC_USART1_CLK_DISABLE();
|
||||
break;
|
||||
case 1:
|
||||
__USART2_FORCE_RESET();
|
||||
__USART2_RELEASE_RESET();
|
||||
__USART2_CLK_DISABLE();
|
||||
__HAL_RCC_USART2_FORCE_RESET();
|
||||
__HAL_RCC_USART2_RELEASE_RESET();
|
||||
__HAL_RCC_USART2_CLK_DISABLE();
|
||||
break;
|
||||
#if defined(USART3_BASE)
|
||||
case 2:
|
||||
__USART3_FORCE_RESET();
|
||||
__USART3_RELEASE_RESET();
|
||||
__USART3_CLK_DISABLE();
|
||||
__HAL_RCC_USART3_FORCE_RESET();
|
||||
__HAL_RCC_USART3_RELEASE_RESET();
|
||||
__HAL_RCC_USART3_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
#if defined(UART4_BASE)
|
||||
case 3:
|
||||
__UART4_FORCE_RESET();
|
||||
__UART4_RELEASE_RESET();
|
||||
__UART4_CLK_DISABLE();
|
||||
__HAL_RCC_UART4_FORCE_RESET();
|
||||
__HAL_RCC_UART4_RELEASE_RESET();
|
||||
__HAL_RCC_UART4_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
#if defined(UART5_BASE)
|
||||
case 4:
|
||||
__UART5_FORCE_RESET();
|
||||
__UART5_RELEASE_RESET();
|
||||
__UART5_CLK_DISABLE();
|
||||
__HAL_RCC_UART5_FORCE_RESET();
|
||||
__HAL_RCC_UART5_RELEASE_RESET();
|
||||
__HAL_RCC_UART5_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
#if defined(USART6_BASE)
|
||||
case 5:
|
||||
__USART6_FORCE_RESET();
|
||||
__USART6_RELEASE_RESET();
|
||||
__USART6_CLK_DISABLE();
|
||||
__HAL_RCC_USART6_FORCE_RESET();
|
||||
__HAL_RCC_USART6_RELEASE_RESET();
|
||||
__HAL_RCC_USART6_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
#if defined(UART7_BASE)
|
||||
case 6:
|
||||
__UART7_FORCE_RESET();
|
||||
__UART7_RELEASE_RESET();
|
||||
__UART7_CLK_DISABLE();
|
||||
__HAL_RCC_UART7_FORCE_RESET();
|
||||
__HAL_RCC_UART7_RELEASE_RESET();
|
||||
__HAL_RCC_UART7_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
#if defined(UART8_BASE)
|
||||
case 7:
|
||||
__UART8_FORCE_RESET();
|
||||
__UART8_RELEASE_RESET();
|
||||
__UART8_CLK_DISABLE();
|
||||
__HAL_RCC_UART8_FORCE_RESET();
|
||||
__HAL_RCC_UART8_RELEASE_RESET();
|
||||
__HAL_RCC_UART8_CLK_DISABLE();
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue