Skip to content

Commit 7177d8f

Browse files
authored
Merge pull request #11950 from ABOSTM/DISCO_H747I_TICKLESS
DISCO_H747I: add support of MBED_TICKLESS
2 parents 9f34b25 + 42a0407 commit 7177d8f

File tree

33 files changed

+157
-116
lines changed

33 files changed

+157
-116
lines changed

features/mbedtls/targets/TARGET_STM/TARGET_STM32L4/aes_alt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ void mbedtls_aes_free(mbedtls_aes_context *ctx)
9393
return;
9494
}
9595
#if defined(DUAL_CORE)
96-
uint32_t timeout = HSEM_TIMEOUT;
97-
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID) && (--timeout != 0)) {
96+
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) {
9897
}
9998
#endif /* DUAL_CORE */
10099
/* Force the CRYP Periheral Clock Reset */

targets/TARGET_STM/TARGET_STM32F0/common_objects.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f0xx_ll_usart.h"
3838
#include "stm32f0xx_ll_tim.h"
39+
#include "stm32f0xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {
@@ -119,6 +120,13 @@ struct analogin_s {
119120
uint8_t channel;
120121
};
121122

123+
124+
#ifdef CRC_PROG_POLYNOMIAL_SUPPORT
125+
#define HAL_CRC_IS_SUPPORTED(polynomial, width) ((width) == 7 || (width) == 8 || (width) == 16 || (width) == 32)
126+
#else
127+
#define HAL_CRC_IS_SUPPORTED(polynomial, width) ((width) == 32 && (polynomial) == 0x04C11DB7)
128+
#endif
129+
122130
#include "gpio_object.h"
123131

124132
#if DEVICE_ANALOGOUT

targets/TARGET_STM/TARGET_STM32F1/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f1xx_ll_usart.h"
3838
#include "stm32f1xx_ll_tim.h"
39+
#include "stm32f1xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F2/objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f2xx_ll_usart.h"
3838
#include "stm32f2xx_ll_tim.h"
39+
#include "stm32f2xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F3/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f3xx_ll_usart.h"
3838
#include "stm32f3xx_ll_tim.h"
39+
#include "stm32f3xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F4/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "PinNames.h"
3737
#include "stm32f4xx_ll_usart.h"
3838
#include "stm32f4xx_ll_tim.h"
39+
#include "stm32f4xx_ll_pwr.h"
3940

4041
#ifdef __cplusplus
4142
extern "C" {

targets/TARGET_STM/TARGET_STM32F7/common_objects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "stm32f7xx_ll_tim.h"
3939
#include "stm32f7xx_ll_adc.h"
4040
#include "stm32f7xx_ll_rtc.h"
41+
#include "stm32f7xx_ll_pwr.h"
4142

4243
#ifdef __cplusplus
4344
extern "C" {

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/h747i_sleep.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32H7/analogin_device.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ void analogin_init(analogin_t *obj, PinName pin)
8989
PeriphClkInitStruct.AdcClockSelection = RCC_ADCCLKSOURCE_CLKP;
9090
PeriphClkInitStruct.PLL2.PLL2P = 4;
9191
#if defined(DUAL_CORE)
92-
uint32_t timeout = HSEM_TIMEOUT;
93-
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID) && (--timeout != 0)) {
92+
while (LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)) {
9493
}
9594
#endif /* DUAL_CORE */
9695
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);

targets/TARGET_STM/TARGET_STM32H7/device/stm32h7xx_hal_rcc.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,19 @@ __weak HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruc
803803
}
804804
else
805805
{
806-
return HAL_ERROR;
806+
/* Do not return HAL_ERROR if request repeats the current configuration */
807+
uint32_t temp1_pllckcfg = RCC->PLLCKSELR;
808+
uint32_t temp2_pllckcfg = RCC->PLL1DIVR;
809+
if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
810+
(READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
811+
((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) ||
812+
(READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) ||
813+
((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) ||
814+
((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) ||
815+
((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U)))
816+
{
817+
return HAL_ERROR;
818+
}
807819
}
808820
}
809821
return HAL_OK;

0 commit comments

Comments
 (0)