Does i.MX6's GPIO have pull-up/pull-down resistance?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does i.MX6's GPIO have pull-up/pull-down resistance?

1,186 Views
9crkzhou
Contributor III

I'm using the interrupt function, the noise of a finger-touch will generats many times interrupts

did i.MX6 got a pull-up/down resistance ?

how to use it?

Labels (4)
0 Kudos
2 Replies

492 Views
Yuri
NXP Employee
NXP Employee

IMX6 IOMUX module allows to configure pad settings, in particular - resistor pull up / down options.

Please use Chapter 36 [IOMUX Controller (IOMUXC)] of the i.MX6 (Q) Reference Manual for more details.

" ...pad control registers (IOMUXC_SW_PAD_CTL_PAD_<PAD_NAME> or

IOMUXC_SW_PAD_CTL_GRP_<GROUP NAME>) to configure specific pad

settings of each pad, or a predefined group of pads."

Default settings are provided in Table 4-1 (Pin Assignments), column "Pad Settings".

0 Kudos

492 Views
9crkzhou
Contributor III

I tried to do like this:

      mxc_iomux_v3_setup_pad(IOMUX_PAD(0x0710, 0x0328, 5, 0x0000, 0, 0) | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP));

and also tried this:

      mxc_iomux_v3_setup_pad(IOMUX_PAD(0x0710, 0x0328, 5, PAD_CTL_PUS_22K_UP, 0, 0) | MUX_PAD_CTRL(NO_PAD_CTRL));

they are not work, and even worse, made the GPIO come to about 1.4V voltage, and keeping generate interrupt automatically.

I'v found this:

--------------------------------------------------------------------------------------------------------------------------

#define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _sel_input_ofs, \
  _sel_input, _pad_ctrl)     \
(((iomux_v3_cfg_t)(_mux_ctrl_ofs) << MUX_CTRL_OFS_SHIFT) | \
  ((iomux_v3_cfg_t)(_mux_mode) << MUX_MODE_SHIFT) | \
  ((iomux_v3_cfg_t)(_pad_ctrl_ofs) << MUX_PAD_CTRL_OFS_SHIFT) | \
  ((iomux_v3_cfg_t)(_pad_ctrl) << MUX_PAD_CTRL_SHIFT) | \
  ((iomux_v3_cfg_t)(_sel_input_ofs) << MUX_SEL_INPUT_OFS_SHIFT) | \
  ((iomux_v3_cfg_t)(_sel_input) << MUX_SEL_INPUT_SHIFT))

 
#define _MX6Q_PAD_GPIO_7__GPIO_1_7   \
  IOMUX_PAD(0x0610, 0x0240, 5, 0x0000, 0, 0)
 
#define PAD_CTL_PUS_100K_DOWN  (0 << 14)
#define PAD_CTL_PUS_47K_UP  (1 << 14)
#define PAD_CTL_PUS_100K_UP  (2 << 14)
#define PAD_CTL_PUS_22K_UP  (3 << 14)

-------------------------------------------------------------------------------------------------------------------------

so then how can I use it?

thx!

0 Kudos