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

Clock control settings for MCUX Audio Clock are Incorrect #45800

Closed
NickolasLapp opened this issue May 19, 2022 · 1 comment · Fixed by #44935
Closed

Clock control settings for MCUX Audio Clock are Incorrect #45800

NickolasLapp opened this issue May 19, 2022 · 1 comment · Fixed by #44935
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@NickolasLapp
Copy link
Contributor

Describe the bug
The Audio PLL Clock Rate calculation for the I2S Clock is incorrect, resulting in incorrect downstream clocks (for example I2S MCLK). Additionally, the PLL configuration for NXP RT parts configures the PLL settings outside of their allowable ranges according to the datasheet.

This affects:

  • MCUX Clock Control Driver when using the Audio PLL
  • IMX RT Parts configuring the SAI module in DTS

To Reproduce
Steps to reproduce the behavior:
Run the sample I2S test code on a compatible NXP RT part:
https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/i2s/i2s_api

  1. west build -p auto -b mimxrt1060_evk tests/drivers/i2s/i2s_api
  2. Probe the MCLK output line with a scope or logic analyzer and measure the MClk frequency
  3. Compare it to the calculated MCLK rate (from the driver: here)
  4. Notice the measured value and the calculated value do not agree.

Expected behavior
The calculated mclk rate should match the actual produced rate and the driver should set up the PLL according to datasheet specifications.

Impact
I2S cannot be correctly configured on RT parts.

@NickolasLapp NickolasLapp added the bug The issue is a bug, or the PR is fixing a bug label May 19, 2022
@NickolasLapp
Copy link
Contributor Author

Fixed by: #44935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants