Skip to content

Commit 1e1d093

Browse files
stm32cube: f7: patch HAL RCC to work w/o Legacy header
Signed-off-by: Mathieu Choplain <[email protected]>
1 parent c4f78b6 commit 1e1d093

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

stm32cube/stm32f7xx/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ Patch List:
4848
This will have to be removed once Zephyr driver is migrated to the new
4949
Cube HAL ethernet API.
5050

51+
*Update HAL RCC which used legacy "GPIO_SPEED_HIGH"
52+
This enables compilation of the HAL RCC module without the legacy header.
53+
Impacted files:
54+
drivers/src/stm32f7xx_hal_rcc.c
55+
ST Internal Reference: N/A (TBD)
56+
5157
*Wrap define UNUSED with an ifndef
5258
This will prevent a compiler warning for the case the UNUSED macro
5359
is already defined elsewhere in the project

stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_rcc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_M
917917
/* Configure the MCO1 pin in alternate function mode */
918918
GPIO_InitStruct.Pin = MCO1_PIN;
919919
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
920-
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
920+
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
921921
GPIO_InitStruct.Pull = GPIO_NOPULL;
922922
GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
923923
HAL_GPIO_Init(MCO1_GPIO_PORT, &GPIO_InitStruct);
@@ -935,7 +935,7 @@ void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_M
935935
/* Configure the MCO2 pin in alternate function mode */
936936
GPIO_InitStruct.Pin = MCO2_PIN;
937937
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
938-
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
938+
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
939939
GPIO_InitStruct.Pull = GPIO_NOPULL;
940940
GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
941941
HAL_GPIO_Init(MCO2_GPIO_PORT, &GPIO_InitStruct);
@@ -1236,4 +1236,3 @@ __weak void HAL_RCC_CSSCallback(void)
12361236
/**
12371237
* @}
12381238
*/
1239-

0 commit comments

Comments
 (0)