-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add support for i.MX RT1050 #43
base: master
Are you sure you want to change the base?
Conversation
Looks like a good start. As of a6b01f8, a comparison between the 1050 and 1060 using
reveals that they're very similar. The important differences:
Since there's so few differences, it seems we could consolidate the modules and share some code. I pushed some commits to show how that could happen. This fixes the CI failures. Both the 1050 and 1060 were re-defining type aliases for the same pins, then implementing the same traits on those same pins. Now, there's only one set of type aliases and one implementation of traits. When enabled, the 1060 modules include additional implementations for SAI3 and FlexIO3. Could you let me know if this setup works in your build? |
fix lib.rs
- FlexCAN, FlexIO, LPI2C, SAI, USDHC
These three modules are nearly the same between the 1050 and 1060. There's only some superficial naming differences. Since the 1060 is established, let's prefer those names (even if the 1050 names are better in some cases). I produced this diff by copying the three modules from the 1060 directory. This is an intermediate diff to show that these peripherals are effectively the same.
Before this commit, a diff of the 1050 and 1060 directories, like diff -ur src/imxrt1050 src/imxrt1060 showed that these modules were basically identical. The only differences: 1. The 1060 has additional GPIO_SPI_* pads that aren't on the 1050. 2. The 1060 has FlexIO3. 3. The 1060 has SAI3. We can handle these similarities through the module system, instead of duplicating code. This commit consolidates the common pad definitions and implementations into their own module. We build with that module whenever the user enables a 1050 or 1060 feature. By consolidating most pin implementations here, they'll be available on both MCUs without duplication. The 1050 directory re-exports all common pad modules and defines the top-level `Pads` type. The 1060 does the same, and it also defines those GPIO_SPI_* modules. This handles difference 1. The 1060 defines its own flexio and sai modules where it provides its additional implementations. This handles differences 2 and 3.
Demonstrated with a failing unit test.
@mciantyre Works on my builds |
I have pushed a commit with support for SEMC. Works on my build and is used to drive an external RAM. |
I'll need additional time to review the SEMC contributions. If you'd like to move that SEMC commit into a separate PR, we'll be able to merge the 1050 contributions. |
This adds basic support for the i.MX RT1050.
Have not tested all modules on hardware, instead have checked it against the reference manual.