Skip to content

backport: v3.7: dts: arm: st: stm32h5: fix spi 1-3 clocks #78769

Closed
@erwango

Description

@erwango

Backport issue to get #77923 backported on V3.7

Describe the bug

The STM32 SPI driver, spi_ll_stm32.c, reads the clock frequency via clock_control_get_rate(). The first clocks index is used as subsystem argument if there is no second index, but this is not the source clock for SPI 1, 2, and 3.
This causes the prescaler value calculation to be incorrect, resulting in a frequency potentially above the spi-max-frequency value.

Required fix

Add clock source for SPI instances 1, 2 and 3, that matches the default clock configuration register reset value, which resolves the issue.

Metadata

Metadata

Assignees

Labels

BackportBackport PR and backport failure issuesbugThe issue is a bug, or the PR is fixing a bugplatform: STM32ST Micro STM32priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions