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
Output configuration
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
[2] About setting pull up/down for GPIO output pin of i.MX6ULL
[3] 6sl gpio Keeper to stay high during suspend
Solved! Go to Solution.
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
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
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
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
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
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
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