Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32cube: recalibrate hsi clock after reset for H7/H7RS serie #231

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions stm32cube/stm32h7rsxx/drivers/src/stm32h7rsxx_ll_rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ void LL_RCC_DeInit(void)
/* Wait for HSI READY bit */
while (LL_RCC_HSI_IsReady() == 0U)
{}
/* Set HSIDIV Default value */
CLEAR_BIT(RCC->CR, RCC_CR_HSIDIV);

/* Set HSITRIM bits to the reset value */
LL_RCC_HSI_SetCalibTrimming(0x40U);

/* Reset CFGR register to select HSI as system clock */
CLEAR_REG(RCC->CFGR);

Expand Down
6 changes: 6 additions & 0 deletions stm32cube/stm32h7xx/drivers/src/stm32h7xx_ll_rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ void LL_RCC_DeInit(void)
while (LL_RCC_HSI_IsReady() == 0U)
{}

/* Set HSIDIV Default value */
CLEAR_BIT(RCC->CR, RCC_CR_HSIDIV);

/* Set HSITRIM bits to the reset value */
LL_RCC_HSI_SetCalibTrimming(0x40U);

/* Reset CFGR register */
CLEAR_REG(RCC->CFGR);

Expand Down
Loading