LS1046 PPS on GPIO

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

LS1046 PPS on GPIO

跳至解决方案
1,764 次查看
srogers
Contributor II

I'm trying to connect a GPS 1PPS signal to a FRWY-LS1046 via a GPIO line.

I've done the following:

Kernel config:

CONFIG_PPS=y
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PPS_DEBUG=y

 

fsl-ls1046a.dtsi:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-falling-edge;
	};

 

The kernel logs show pps1 fails to get setup:

[  941.608348] genirq: Setting trigger mode 1 for irq 83 failed (mpc8xxx_irq_set_type+0x0/0xf8)
[  941.616823] pps_core: unregistering pps1
[  941.617053] pps_core: deallocating pps1
[  941.617063] pps-gpio pps: failed to acquire IRQ 83
[  941.621915] pps-gpio: probe of pps failed with error -22

 

Is there a problem with using GPIO3_11 (427) for this? Is it on a GPIO expander or something?

I can read the PPS signal on the GPIO so I know I've got the correct pin.

 

0 项奖励
回复
1 解答
1,736 次查看
srogers
Contributor II

Apologies - I had made a mistake - my .dtsi looked like this when it failed:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-rising-edge;
	};

This is evidently wrong - for rising edge you remove the assert-falling-edge line.

It looks like pps1 is now registered.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,737 次查看
srogers
Contributor II

Apologies - I had made a mistake - my .dtsi looked like this when it failed:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-rising-edge;
	};

This is evidently wrong - for rising edge you remove the assert-falling-edge line.

It looks like pps1 is now registered.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1862802%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGPIO%20%E4%B8%8A%E7%9A%84%20LS1046%20PPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862802%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E5%B0%9D%E8%AF%95%E9%80%9A%E8%BF%87%20GPIO%20%E7%BA%BF%E5%B0%86%20GPS%201PPS%20%E4%BF%A1%E5%8F%B7%E8%BF%9E%E6%8E%A5%E5%88%B0%20FRWY-LS1046%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E5%AE%8C%E6%88%90%E4%BB%A5%E4%B8%8B%E6%93%8D%E4%BD%9C%EF%BC%9A%3C%2FP%3E%3CP%3EKernel%20config%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3ECONFIG_PPS%3Dy%0ACONFIG_PPS_CLIENT_GPIO%3Dm%0ACONFIG_PPS_DEBUG%3Dy%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3Efsl-ls1046a.dtsi%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3E%09pps%20%7B%0A%09%09compatible%20%3D%20%22pps-gpio%22%3B%0A%09%09gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2011%200%26gt%3B%3B%0A%09%09assert-falling-edge%3B%0A%09%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E5%86%85%E6%A0%B8%E6%97%A5%E5%BF%97%E6%98%BE%E7%A4%BA%20pps1%20%E6%97%A0%E6%B3%95%E8%AE%BE%E7%BD%AE%EF%BC%9A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3E%5B%20%20941.608348%5D%20genirq%3A%20Setting%20trigger%20mode%201%20for%20irq%2083%20failed%20(mpc8xxx_irq_set_type%2B0x0%2F0xf8)%0A%5B%20%20941.616823%5D%20pps_core%3A%20unregistering%20pps1%0A%5B%20%20941.617053%5D%20pps_core%3A%20deallocating%20pps1%0A%5B%20%20941.617063%5D%20pps-gpio%20pps%3A%20failed%20to%20acquire%20IRQ%2083%0A%5B%20%20941.621915%5D%20pps-gpio%3A%20probe%20of%20pps%20failed%20with%20error%20-22%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E4%BD%BF%E7%94%A8%20GPIO3_11%EF%BC%88427%EF%BC%89%E6%9C%89%E9%97%AE%E9%A2%98%E5%90%97%EF%BC%9F%E5%AE%83%E6%98%AF%E5%9C%A8%20GPIO%20%E6%89%A9%E5%B1%95%E5%99%A8%E8%BF%98%E6%98%AF%E5%88%AB%E7%9A%84%E4%BB%80%E4%B9%88%E4%B8%9C%E8%A5%BF%E4%B8%8A%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E5%8F%AF%E4%BB%A5%E8%AF%BB%E5%8F%96%20GPIO%20%E4%B8%8A%E7%9A%84%20PPS%20%E4%BF%A1%E5%8F%B7%EF%BC%8C%E6%89%80%E4%BB%A5%E6%88%91%E7%9F%A5%E9%81%93%E6%88%91%E6%9C%89%E6%AD%A3%E7%A1%AE%E7%9A%84%E5%BC%95%E8%84%9A%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1863341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ALS1046%20PPS%20%E4%B8%8A%E7%9A%84%20GPIO%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1863341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%8A%B1%E6%AD%89%20-%20%E6%88%91%E7%8A%AF%E4%BA%86%E4%B8%80%E4%B8%AA%E9%94%99%E8%AF%AF%20-%20%E6%88%91%E7%9A%84%20.dtsi%E5%A4%B1%E8%B4%A5%E6%97%B6%E7%9C%8B%E8%B5%B7%E6%9D%A5%E5%83%8F%E8%BF%99%E6%A0%B7%EF%BC%9A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3E%09pps%20%7B%0A%09%09compatible%20%3D%20%22pps-gpio%22%3B%0A%09%09gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2011%200%26gt%3B%3B%0A%09%09assert-rising-edge%3B%0A%09%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E8%BF%99%E6%98%BE%E7%84%B6%E6%98%AF%E9%94%99%E8%AF%AF%E7%9A%84%E2%80%94%E2%80%94%E5%AF%B9%E4%BA%8E%E4%B8%8A%E5%8D%87%E6%B2%BF%EF%BC%8C%E6%82%A8%E5%88%A0%E9%99%A4%E4%BA%86%E6%96%AD%E8%A8%80%E4%B8%8B%E9%99%8D%E6%B2%BF%E7%BA%BF%E3%80%82%3C%2FP%3E%3CP%3E%E7%9C%8B%E8%B5%B7%E6%9D%A5%20pps1%20%E7%8E%B0%E5%9C%A8%E5%B7%B2%E7%BB%8F%E6%B3%A8%E5%86%8C%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E