Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix I2S kernel clock source for STM32F4 #3712

Open
elagil opened this issue Jan 2, 2025 · 2 comments
Open

Fix I2S kernel clock source for STM32F4 #3712

elagil opened this issue Jan 2, 2025 · 2 comments

Comments

@elagil
Copy link
Contributor

elagil commented Jan 2, 2025

The I2S driver for STM32F4 (and other series?) currently assumes the SPI peripheral clock to be the I2S kernel clock. This is not the case, because in I2S mode, the SPI peripheral is supplied by the I2S PLL.

RM0368, p. 585
image

Current implementation:

//let pclk = unsafe { get_freqs() }.plli2s1_q.unwrap();

This leads to incorrect calculation of clock scaling factors in the I2S driver and thus incorrect I2S clocks.

@elagil
Copy link
Contributor Author

elagil commented Jan 3, 2025

The same is true for STM32F7 series devices, and probably others with combined SPI/I2S.

@elagil
Copy link
Contributor Author

elagil commented Jan 3, 2025

See #3716 for a fix for F4 series devices only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant