The PS2 pin of s912zvml64 cannot be output

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

The PS2 pin of s912zvml64 cannot be output

跳至解决方案
1,924 次查看
maxxu
Contributor IV

Hi

   I found a problem during debugging。The PS2 pin of s912zvml64 cannot be output

I use the following settings

   DDRS_DDRS2 = 1;

   DDRS_DDRS3 = 1;

   DDRS_DDRS4 = 1;

   PS3,PS4 Can output normally,But,PS2,The output is always out of control, and I / O seems to be in the input state all the time

  When I set these three I / O to the input mode, the function of reading Hall signal is normal. In another project, I use these three I / O for output. As a result, only PS3 and PS4 can be controlled. It's really strange

  

0 项奖励
1 解答
1,897 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Possible issues:

1) There is something connected to the pin externally what influences value at the pin
2) There is alternative function enabled and routed to the pin. For example RxD of the SCI. If alternative function(s) is enabled at the pin ten the function with highest priority takes precedence and controls the pin.
3) Somewhere in you SW you accidentaly change the direction of the pin.
4) The pin is destroyed (check behavior with simplified SW on another board)

Best regards,.
Ladislav

在原帖中查看解决方案

0 项奖励
4 回复数
1,898 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Possible issues:

1) There is something connected to the pin externally what influences value at the pin
2) There is alternative function enabled and routed to the pin. For example RxD of the SCI. If alternative function(s) is enabled at the pin ten the function with highest priority takes precedence and controls the pin.
3) Somewhere in you SW you accidentaly change the direction of the pin.
4) The pin is destroyed (check behavior with simplified SW on another board)

Best regards,.
Ladislav

0 项奖励
1,889 次查看
maxxu
Contributor IV

YES,Problem found, MODRR0 was accidentally set,thank you.

标记 (1)
0 项奖励
1,913 次查看
aaronlee
Contributor V

Hi,

 

	DDRS_DDRS2 = 1;		// Set PS2 as Output
  	for(;;)
  	{
		PTS_PTS2 = 1;				// Set PS2 to High
  		Cpu_Delay100US(5000);		// Delay 500ms
		PTS_PTS2 = 0;				// Set PS2 to Low
  		Cpu_Delay100US(5000);		// Delay 500ms
  	}

 

Best Regards,

Aaron

0 项奖励
1,904 次查看
maxxu
Contributor IV

As you said, PS2, PS3 and PS4 are configured in this way, but PS2 cannot be controlled, while PS3 and PS4 are normal

0 项奖励