JN5189 how to control pin pull-up and pull-down mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

JN5189 how to control pin pull-up and pull-down mode

743件の閲覧回数
liyouliu
Contributor II

Hello, I want to freely change the pull-up and pull-down modes of GPIO while running the program. Which corresponding function should be called, and how? It would be better if there were corresponding routines!!

0 件の賞賛
返信
3 返答(返信)

726件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @liyouliu

Hope you are doing well.

You can find the available APIs in MCUXpresso SDK API Reference Manual_JN5189 inside JN5189 SDK docs folder > docs. This documentation can be downloaded from the MCUXpresso SDK Builder. After building the JN5189 SDK, once the download dialog is shown, select "Download SDK Documentation":

EduardoZamora_0-1690212314580.png

Chapter 22 - IOCON: I/O Pin configuration provides information on function documentation, typical use cases, data structures and macros for this peripheral.

You may need to use IOCON_PinMuxSet() and IOCON_MODE_PULLUP / IOCON_MODE_PULLDOWN for modefunc parameter. You can find an example of the usage in some of the SDK example projects > boards folder > pin_mux.c file.

Regards,
Eduardo.

0 件の賞賛
返信

686件の閲覧回数
liyouliu
Contributor II

Thank you for your reply.

I have tried according to the functions and parameters you provided.

I want to implement in JN5189 what the following function does in JN5169.

vAHI_DioSetPullup(SCCB_DATA, 0);

vAHI_DioSetPullup(0, SCCB_DATA);

But there is no effect, my configuration in the program is shown below.

屏幕截图 2023-08-01 223848.jpg

Am I missing something?

Can I use IOCON_PullSet() to achieve the pull-up and pull-down function?

Can you provide a specific example of a setup pin pull-up or pull-down? To implement a pin variable pull-up and pull-down.
Looking forward to your reply!

 

0 件の賞賛
返信

668件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

What is the purpose of this functions in your application? Could you please describe a scenario where it is needed to change pull mode in run time?

Are you trying to retain the last known state on a pin? If that is the case, you can use the repeater mode. More information on this can be found in QN9090 User Manual, Section 12.4.2.3 Pin mode.

IOCON_PullSet can be used to set I/O pull select.

Regards,
Eduardo.

0 件の賞賛
返信