Skip to content

STM32 usb clock from PLLSAI1 #30800

@qin-zou

Description

@qin-zou

I have external clock source (8MHz) for my STM32L452.
I want to configure my USB to use PLL as clock source (PLLSAI1).

Here is my current config.

# 80MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=80000000

# Clock Configuration
CONFIG_CLOCK_CONTROL=y

# Use PLLCLK for SYSCLK
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y

# External clock source (8MHz)
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
CONFIG_CLOCK_STM32_HSE_BYPASS=y
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=1
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=20
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=7
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2

CONFIG_CLOCK_STM32_AHB_PRESCALER=1
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
CONFIG_CLOCK_STM32_APB2_PRESCALER=1

With the above configuration, USB clock source is still from HSI48.
I am wondering if it's possible to create the clock configuration like the picture attached using zephyr config parameters.

Screen Shot 2020-12-16 at 3 52 15 PM

Metadata

Metadata

Assignees

Labels

EnhancementChanges/Updates/Additions to existing featuresplatform: STM32ST Micro STM32

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions