RT1050 Cortex M7 Pin Configuration Internal Pull Up/Down Help

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

RT1050 Cortex M7 Pin Configuration Internal Pull Up/Down Help

666 Views
kamal1
Contributor III

Hello,

I will have an open processor pin on my custom board. This pin will be an input and I want to configure it to have an internal pull up resistor to avoid leaving it floating.

 

I set the pin as in input in the pinmux.c using the following code:

         gpio_pin_config_t sw_config = {kGPIO_DigitalInput, 0, kGPIO_NoIntmode};

         GPIO_PinInit(GPIO2, 05, &sw_config);

 

Then I tried to adjust the IOMUXC, but I did not see any changes when probing the pin:

          #define IOMUXC_GPIO_B0_05_GPIO2_IO05 0x401F8150U, 0x5U, 0, 0, 0x401F8340U

 

  1. How can I configure the pin as an input and have an internal pull up resistor?
  2. If the pin is set up with an internal pull up and I probe that pin, will I see it as high? And low when pulled down?

 

0 Kudos
1 Reply

651 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

How can I configure the pin as an input and have an internal pull-up resistor?

You need to make the proper configurations in the IOMUXC_SW_PAD_CTL register of the desired pin. Let's say that you want to configure pin GPIO_B0_09. For this, you need to modify the register IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_09. Besides setting the corresponding value in the PUS bits, you also need to set the PUE and PKE bit to 1.

You also need to verify that you select the correct MUX_MODE in register IOMUXC_SW_MUX_CTL_PAD.

If the pin is set up with an internal pull-up and I probe that pin, will I see it as high? And low when pulled down?

Yes. 

Regards,
Victor 

0 Kudos