Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix SPI clock speed on mimxrt10xx family & mimxrt1020 pinmux fixups #2658

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

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

mubes
Copy link

@mubes mubes commented Feb 26, 2020

Make SPI dependant on the divisor register rather than a constant, and fix more mixup in the 1020 pinmux table relating to SPI and I2C.

@@ -95,8 +95,7 @@ static void config_periph_pin(const mcu_periph_obj_t *periph) {
| IOMUXC_SW_PAD_CTL_PAD_SRE(0));
}

#define LPSPI_CLOCK_SOURCE_DIVIDER (7U)
#define LPSPI_MASTER_CLK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk) / (LPSPI_CLOCK_SOURCE_DIVIDER + 1U))
#define LPSPI_MASTER_CLK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk) / (CLOCK_GetDiv(kCLOCK_LpspiDiv)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I get for copying example code ;)

@arturo182 arturo182 merged commit 1b33cd1 into adafruit:master Feb 26, 2020
@arturo182
Copy link
Collaborator

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants