clock configuration for stm32u375

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

clock configuration for stm32u375

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: clock configuration for stm32u375

Post 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
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

Re: clock configuration for stm32u375

Post 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
Post Reply