Skip to content
Merged
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
9 changes: 9 additions & 0 deletions arch/arm/src/stm32h7/stm32h7x3xx_rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
# define USE_PLL3
#endif

#if defined(STM32_BOARD_USEHSI) && !defined(STM32_BOARD_HSIDIV)
#error When HSI is used, you have to define STM32_BOARD_HSIDIV in board/include/board.h
Comment thread
davids5 marked this conversation as resolved.
#endif

/****************************************************************************
* Private Data
****************************************************************************/
Expand Down Expand Up @@ -600,6 +604,11 @@ void stm32_stdclockconfig(void)

regval = getreg32(STM32_RCC_CR);
regval |= RCC_CR_HSION; /* Enable HSI */

/* Set HSI predivider to board specific value */

regval |= STM32_BOARD_HSIDIV;

putreg32(regval, STM32_RCC_CR);

/* Wait until the HSI is ready (or until a timeout elapsed) */
Expand Down