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

1170 and 1180 PAD_CTL fields differ from 10xx fields #28

Open
mciantyre opened this issue Dec 15, 2022 · 1 comment
Open

1170 and 1180 PAD_CTL fields differ from 10xx fields #28

mciantyre opened this issue Dec 15, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@mciantyre
Copy link
Member

#26 integrated 1170 pads into imxrt-iomuxc assuming that the pad control (PAD_CTL) register fields would be just like all the PAD_CTL register fields on the 10xx MCUs. You know what that means...

They're different. In fact, there's various PAD_CTL field layouts in the 1170, depending on what pad group you're looking at. Until this is addressed, do not use configure and Config with 1170 pads from imxrt-iomuxc version 0.2. These APIs generate the wrong PAD_CTL values.

This will also affect any pin traits that include PAD_CTL values, like ADC and uSDHC (#27). However, those are not yet implemented for 1170 pads.

None of this affects the 10xx pads. For a 1170 workaround, try using imxrt-ral APIs to specify PAD_CTL values. The SVD appears to match the reference manual for the registers I sampled.

10xx PAD_CTL fields

This is what Config thinks the PAD_CTL looks like.

image

11xx PAD_CTL fields

I'm noticing three different field layouts across the IOMUXC and IOMUXC_LPSR PAD_CTL registers. I'm ignoring the bits related to domain protection (high nibble of the registers), since that's expected to differ w.r.t. 10xx.

This discussion is specific to the 1170 MCU. I've not considered the 1160 or other 11xx MCUs.

Layout 1: EMC, SD, and DISP_B1 pads (IOMUXC)

No slew rate, speed, or hysteresis. Limited PU/PD config. PDRV is the drive strength; 0 is "high," and 1 is "normal."

image

Layout 2: LPSR pads (IOMUXC_LPSR)

Slew rate is back. Different way to configure PU/PD. DSE is the drive strength; 0 is "normal," and 1 is "high." It's an inverted PDRV field from the first layout.

image

Layout 3: AD and DISP_B2 pads (IOMUXC)

Almost the same as the LPSR layout, but with a shifted bit to toggle the open drain.

image

Other notes

I'm ignoring IOMUXC_SNVS pads, since we're not exporting those through this package. If my study is right, these add two different layouts of 1170 PAD_CTL fields. They also change for the 10xx.

@mciantyre mciantyre added the bug Something isn't working label Dec 15, 2022
@teburd
Copy link
Member

teburd commented Dec 15, 2022

The intro here definitely gave me a chuckle.

Oh yes... but of course they are different, kind of like the entire register map of 1010 is different than the 1050/1060/1064, which is... yeah that actually was a bug in Zephyr as well that someone from NXP had to fix.

Kind of a bummer here though.

@mciantyre mciantyre added this to the 0.3.0 milestone Jul 3, 2023
@mciantyre mciantyre changed the title 1170 PAD_CTL fields differ from 10xx fields 1170 and 1180 PAD_CTL fields differ from 10xx fields Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants