Page 1 of 1

clock configuration for stm32u375

Posted: Thu Jul 23, 2026 3:46 am
by geoffrey.brown
I don't seem to have a way to select the msis clock being used. I can set the mode

#define STM32_MSIRC0_MODE RCC_MSIRC0_FREE
#define STM32_MSIRC1_MODE RCC_MSIRC1_FREE
#define STM32_MSIPLL1N_VALUE 0
#define STM32_MSIS_SRCDIV RCC_ICSCR1_MSIS_IRC1_DIV1
#define STM32_MSIK_SRCDIV RCC_ICSCR1_MSIK_IRC1_DIV1

but there doesn't seem to be a way to select the MSIS clock source. What am I missing?

Re: clock configuration for stm32u375

Posted: Thu Jul 23, 2026 5:10 am
by Giovanni
Hi,

STM32_MSIS_SRCDIV selects both the MSIS source and divider. Your current setting already selects MSIRC1 divided by one:

Code: Select all

#define STM32_MSIS_SRCDIV RCC_ICSCR1_MSIS_IRC1_DIV1
Use an ...IRC0_DIVx value to select MSIRC0 instead. STM32_MSIRC0_MODE and STM32_MSIRC1_MODE configure the oscillator operating modes, not the MSIS source selection.

Giovanni

Re: clock configuration for stm32u375

Posted: Thu Jul 23, 2026 12:53 pm
by geoffrey.brown
Thanks! I guess it was working all along -- I was looking at a spi clock for confirmation and IRC1_DIV1 and IRC0_DIV4 both gave 25 mhz signals. This is a super complicated chip, but I'm hoping for some real power savings if I can get spi dma working in stop0 or stop1.

Geoffrey