How to configure and enable pulldown resistor in the GPIO pins of Kinetis DSC?

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

How to configure and enable pulldown resistor in the GPIO pins of Kinetis DSC?

1,540 Views
cesarrabak
Contributor III

I understand Kinetis family of MCU/DSC have a Portx_PCR register for configuring and enabling pulldown or pullup resistors.

However this does not appear to be available in the configuration of the component (at least if one is interested in an individual bit I/O pin) be it in the High Level BitIO component or the logical LDD bit IO one, not even in Advanced mode.

Is there a means of achieving this via PE software or the only recourse is to write to the register in the main routine after the call to PE_low_level_init()?

Thanks in advance,

--

Cesar Rabak

5 Replies

977 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Cesar:

You are correct, such settings cannot be configured with BitIO components. For this you can use the Init_GPIO component.

:smileyinfo: Heads-up: You may receive an error when using the same pin in both: Init_GPIO and BitIO components. Just right click in the pin on any of the components and select "Pin Sharing Enabled".

A very good tutorial by Erich Styger covering this topic:

http://mcuoneclipse.com/2012/11/12/tutorial-bits-and-pins-with-kinetis/

PS. Always post to specialized community spaces, such as Processor Expert Software.This way your questions have more visibility.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

977 Views
cesarrabak
Contributor III

On the specifics of the link which offer a path for the solution, I've two comments:

It is somewhat unintuitive that you have to configure (by two different means) the same peripheral!

The tool itself has not an easy path for finding this in the embedded documentation.

My suggestion is that these possibilities be include in the configuration of the pin itself! I think it will help with the rationale of the Processor Expert SW!

my 0.019999....

Regards,

--

Cesar Rabak

0 Kudos

977 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Cesar:

Somehow I agree with you. However it is not the same peripheral. We are talking about two different modules: PORT and GPIO. You can find a dedicated chapter for each of them in the Reference Manual.

PORT: Controls the particular physical pin settings (muxing, pull resistors, slew rate, drive strength, etc).

GPIO: As the name indicates this module handles input/output digital states. Think of it as the logical interface with the hardware layer (PORT module).

Nonetheless, thanks for your feedback and suggestions. Unfortunately LDD components are not being updated, unless a bug is detected. This is because all development is focused on the new KSDK platform.

PS. About the posting spaces, you can even move a thread once you posted it. I recommend you to check the next link:

Where to post a Discussion?


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

977 Views
cesarrabak
Contributor III

Dear Jorge,

I see your points.

Thanks for the link, will check it later as I get some spare timeQ

Regards,

--

Cesar Rabak

0 Kudos

977 Views
cesarrabak
Contributor III

Thank you for your reply Jorge!

Best regards,

--

Cesar Rabak

PS.: :smileyblush: I really thought this time I'd made this right on posting in the correct space, but I see I still have mileage to go on using this interface...!

0 Kudos