S32K3配置PORT的输出模式

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

S32K3配置PORT的输出模式

Jump to solution
2,986 Views
WeiCh
Contributor III

我在使用EB配置S32K3的PORT输出时有点疑惑,按照图中的配置,GPIO的工作模式是什么输出模式,推挽输出还是开漏输出?

WeiCh_1-1755915485559.png

 

0 Kudos
Reply
1 Solution
2,834 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

RTD_PORT_UM.pdf里搜索NotUsedPortPin能看到相关介绍:

Driver usage and configuration tips RTD_PORT_UM.png

View solution in original post

0 Kudos
Reply
8 Replies
2,931 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

鉴于你现在PortPin Mode选择的是GPIO,而S32K3XXRM Rev11的Chapter 10 System Integration Unit Lite2 (SIUL2)章节提到了:
Does not implement the open-drain feature. LPI2C directly configures only the pads related to the I2C and LPUART functions in pseudo open-drain when these functions are muxed to the pads. See the LPI2C and LPUART chapters for more information.

所以配置成GPIO输出的情况下是push pull 推挽输出。

如果PortPin Mode选择LPI2CLPUART相关功能,那么还有额外的寄存器配置成开漏。比如LPI2C的寄存器71.7.1.9 Controller Configuration 1 (MCFGR1)的PINCFG位Configures the pin mode for LPI2C。


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
2,906 Views
WeiCh
Contributor III
我还有一个疑问:如果没在EB的PORT里配置引脚,初始化后引脚是什么配置,模式是GPIO吗?方向是IN、OUT、还是INOUT?初始电平是LOW还是HIGH,或者别的?
0 Kudos
Reply
2,849 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

如果没在EB的PORT里配置引脚,初始化后引脚处于高阻状态。

S32K3XXRM Rev114.2 Pad description章节的有一条NOTE:
The default state of GPIO pins on a reset event is high-Z. The high-Z state might settle to active high or active low at chip depending on the supply, temperature and other factors. Hence, it is recommended to use external pulls to ensure safe inactive state in event of a reset.

S32K3xx - Hardware Design Guidelines -- Rev_E2.pdf 的章节7 Unused pins 也有提到:
The DISABLED function is default state for all pins not initialized. For digital and analog pins, this means that the corresponding SSS, IBE and OBE bits, in the SIUL_MSCR register should not modified for that particular pin.
If the unused pin is connected to VSS, and the pin is unintentionally configured to output with a different state (high), then there could be a path that can increase current drastically and causes major damage in the MCU.

0 Kudos
Reply
2,847 Views
WeiCh
Contributor III

我在看RTD驱动的INIT函数里面,有关于这些未使用引脚的配置,如果调用了接口,应该会按照前一个图配置,是这样吗?

WeiCh_1-1756343299689.png

 

0 Kudos
Reply
2,835 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

RTD_PORT_UM.pdf里搜索NotUsedPortPin能看到相关介绍:

Driver usage and configuration tips RTD_PORT_UM.png

0 Kudos
Reply
2,792 Views
WeiCh
Contributor III

Dio_ReadChannel函数读的是GPDI寄存器,对于方向为INOUT的GPIO,PDI_n位能表示实际GPIO的状态吗?

 

WeiCh_0-1756517685939.png

 

0 Kudos
Reply
2,674 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

PDI_n位能表示实际GPIO的状态

0 Kudos
Reply
2,890 Views
WeiCh
Contributor III

WeiCh_0-1756264964639.png

如果我误修改了,和默认配置有差别,PortPin Level Value配置成HIGH了,会有影响吗,实质应该不起作用吧。

0 Kudos
Reply