DS ConfigTool - Port PCR ID

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

DS ConfigTool - Port PCR ID

跳至解决方案
414 次查看
speed999
Contributor I

Hello NXP team 

One question for pin PCR id. For the S32K144 PWM example project,  pin22 - PTS15 is configured as FTM0_CH0 muxing mode. But in port_cfg.h, FTM0_CH0 can be enabled for three port ID - 44, 64, 111.  Why is 111 the correct number? How can pin 22 be mapped to port PCR ID 111  in the port config setting of peripheral ?   (I chose 44, 64 while some error is reported and Port attribute is not correct)

#define PORT111_FTM0_CH0 (PORT_ALT2_FUNC_MODE)

speed999_0-1750068193229.png

 

0 项奖励
回复
1 解答
391 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @speed999

The "PortPin PCR" is a numeric value representing the Port Configuration Register. It can be calculated using the following formula:

PortPin Pcr = PinId + (PortId × 32)

Where:

  • PortId is the numeric identifier of the port (e.g., PortA = 0, PortB = 1, PortC = 2, etc.).
  • PinId is the index of the selected pin within the port.

For PTD15, the calculation would be:

PortPin Pcr = 15 + (3 × 32) = 111 

 

BR, VaneB

在原帖中查看解决方案

0 项奖励
回复
1 回复
392 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @speed999

The "PortPin PCR" is a numeric value representing the Port Configuration Register. It can be calculated using the following formula:

PortPin Pcr = PinId + (PortId × 32)

Where:

  • PortId is the numeric identifier of the port (e.g., PortA = 0, PortB = 1, PortC = 2, etc.).
  • PinId is the index of the selected pin within the port.

For PTD15, the calculation would be:

PortPin Pcr = 15 + (3 × 32) = 111 

 

BR, VaneB

0 项奖励
回复