i.MX GPIO PU/PD/keeper admittable configurations

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX GPIO PU/PD/keeper admittable configurations

Jump to solution
103 Views
Contributor II

Hi all,

I wrote this question to try to summarize things on official documentation and to get an explanation about the topic GPIO PU/PD/keeper admittable configurations, for GPIO output and input configuration. There are some other questions about this topic in NXP community (see for example [1], [2], [3]) but answers are not definite and a bit conflicting.

Output configuration

I start from what is stated in iMX6ULL RM (but this is valid for all the iMX6 family)

28.4.2.2 Output Driver

Output driver characteristics
....
• Selectable pull-up resistors of 22K, 47K, 100K and a pull-down resistor of
100KOhm. Unsilicided P+ poly resistor is used to limit resistance variation to within
+/- 20%.
• Pull-up, pull-down, and pad keeper are disabled in output mode.

So, the output driver has selectable PU and PD resistors, but they are disabled in output mode. It is reasonable that, if I drive an output, I don't need a PU/PD because I'm setting the level actively, ant the keeper functionality makes sense only when output is disabled. But then, why PU/PD resistors are in the output section?

Moreover, the "28.4.2.2.4 Open drain" states that the internal pull-up could be used. And AN_5078 says that ODE is an option for the OBE (OBE is enabled when ODE is enabled)

Figure 28-3 seems to confuse things: due to the NAND port (and the NOT applied to ODE signal), PU/PD are:

- enabled when PKE is enabled and ODE is enabled (makes sense)

- enabled when PKE is disabled and ODE is enabled (could make sense, but if I want to use an external PU, what I have to do to disable the internal PU?)

- enabled when PKE is disabled and ODE is disabled

- disabled when PKE is enabled and ODE is disabled

Last two conditions needs at least some clarification.

Input configuration

For this configuration seems that PU/PD can be always enabled/disabled, without preconditions (keeper is always enabled as stated in section 28.4.2.1.2). If it is true (and it is true, and proven on hardware), the Figure 28-3 should be updated with a PU/PD enablement also from IBE signal.

Conclusions

Seems that the documentation needs some review about this topic.

Seems that the logical behavior for PU/PD/keeper should be:

Input configuration

  • PU/PD are enabled/disabled via pinctrl
  • keeper is always enabled

Output configuration

  • PU/PD are enabled/disabled via pinctrl, but
    • if enabled and GPIO is in output mode (standard, not open drain), the pinctrl configuration is not used and PU/PD are disabled
    • if enabled and GPIO is in open drain, the pinctrl configuration is used (but only PU makes sense)
  • keeper is enabled/disabled via pinctrl, if enabled it is automatically disabled when GPIO is in output mode (OBE=1) and enabled when GPIO is not in output mode (OBE=0)

Could NXP kindly confirm/discard/expand these conclusions?

A minor question: can a GPIO have both IBE and OBE =0? With GPIO_DIR we can select only if GPIO is an input or an output

Thanks in advance, regards

Mauro

[1] i.MX6 GPIO pull up  

[2] About setting pull up/down for GPIO output pin of i.MX6ULL 

[3] 6sl gpio Keeper to stay high during suspend 

Labels (1)
0 Kudos
1 Solution
17 Views
NXP TechSupport
NXP TechSupport

Hi Mauro,

>>keeper is used (if enabled in PUE+PKE registers) only in input mode ?    
 yes , right .
>>pull is used (if enabled in PUE+PKE registers) only in input mode, or in open drain output mode
PUE = 1, PKE = 1, means pull up/down function is enabled.
PUE = 1, PKE = 0, means  pull up/down function is disabled.

PUE = 0, PKE = 1, means Keeper function is enabled   (PAD should be input mode)
PUE = 0, PKE = 0, means Keeper function is disabled  (PAD should be input mode)

Pull is not related to Input , Output and Open Drain output mode.

weidong

View solution in original post

0 Kudos
6 Replies
17 Views
NXP TechSupport
NXP TechSupport

Hello Mauro,

>> can a GPIO have both IBE and OBE =0? With GPIO_DIR we can select only if GPIO is an input or an output.

Yes, it can.

From the perspective of SOC, Output buffer & Input buffer can be enabled at the same time.

Have  a nice day!

B.R,

Weidong

0 Kudos
17 Views
Contributor II

Hi Wigros,

thank you for your answer.

Do you have one also for the primary question (Could NXP kindly confirm/discard/expand these conclusions)?

Thanks in advance, regards

Mauro

0 Kudos
17 Views
NXP TechSupport
NXP TechSupport

Hi Mauro,

>>Could NXP kindly confirm/discard/expand these conclusions?

---PUE: Pull / Keep Select Field

0 PUE_0_Keeper — Keeper
1 PUE_1_Pull — Pull

---PKE : pull / keeper  disable / enable.

0 PKE_0_Pull_Keeper_Disabled — Pull/Keeper Disabled
1 PKE_1_Pull_Keeper_Enabled — Pull/Keeper Enabled

PUE + PKE determines you operate PULL or Keeper feature of the current PAD.

[comment]

Keeper  is just for Input, not output. So you are right.

---ODE : Open Drain Enable Field

0 ODE_0_Open_Drain_Disabled — Open Drain Disabled
1 ODE_1_Open_Drain_Enabled — Open Drain Enabled

[Comment]

ODE filed is independent, not affected by other fields.

Hope above information is helpful for you.

Have a nice day!

B.R,

Weidong

0 Kudos
17 Views
Contributor II

Hi Weidong,

thank you for your answer.

PUE + PKE determines you operate PULL or Keeper feature of the current PAD.

I know this, my question was if PULL and KEEPER are used only with GPIO in input mode. After your answer we can say yes, PULL and KEEPER operates only when GPIO is in input mode.

ODE filed is independent, not affected by other fields.

Yes, this is also known. My question is if, when ODE enabled, the PULL configuration is used and activated also if we are in output mode. The answer seems yes.

Then, to summarize:

- keeper is used (if enabled in PUE+PKE registers) only in input mode

- pull is used (if enabled in PUE+PKE registers) only in input mode, or in open drain output mode

Are these two statements true?

Thank you, best regards

Mauro

0 Kudos
18 Views
NXP TechSupport
NXP TechSupport

Hi Mauro,

>>keeper is used (if enabled in PUE+PKE registers) only in input mode ?    
 yes , right .
>>pull is used (if enabled in PUE+PKE registers) only in input mode, or in open drain output mode
PUE = 1, PKE = 1, means pull up/down function is enabled.
PUE = 1, PKE = 0, means  pull up/down function is disabled.

PUE = 0, PKE = 1, means Keeper function is enabled   (PAD should be input mode)
PUE = 0, PKE = 0, means Keeper function is disabled  (PAD should be input mode)

Pull is not related to Input , Output and Open Drain output mode.

weidong

View solution in original post

0 Kudos
17 Views
Contributor II

Hi Weidong,

thank you. So the reference manual of all the iMX6 CPUs must be corrected, because it states that

Pull-up, pull-down, and pad keeper are disabled in output mode.

but the correct wording should be

Keeper is disabled in output mode

Final recap:

- Pull is not related to Input, Output and Open Drain output mode. They can be enabled regardless the pin mode

- when enabled, keeper is active only when output mode is disabled

Thanks again, best regards.

Mauro

0 Kudos