您尚未登录。

楼主 # 2022-01-29 00:28:19

droptop
会员
注册时间: 2022-01-26
已发帖子: 17
积分: 20

f1c200s spi not working

Hi everyone,

I can't seem to get spi1 on the  f1c200s to work. My board is the MangoPi R3.  Was wondering if anyone had configured a device for the second SPI controller before.

Here are the additions I made to the file here,

&pio {
	spi1_pins: spi1-pins {
		pins = "PE9", "PE7", "PE10", "PE8";
		function = "spi1";
	};
			
	spi1_cs_pins: spi1-cs-pins {
        pins = "PE7";
        function = "gpio_out";
	};
};


&spi1 {
	status = "okay";
	
	pinctrl-names = "default";	
	pinctrl-0 = <&spi1_pins &spi1_cs_pins>;
	num_chipselect = <1>;
	cs-gpios = <&pio 4 7 GPIO_ACTIVE_HIGH>;
	
	spidev@0 {
            compatible = "spidev";
            reg = <0>;   
            spi-max-frequency = <0x2625a00>;
   	};
};

Loopback tests with this code work. So it looks like the issue may be the chip select (PE7) ??. The device I'm trying to connect to the board is the RFID-MFRC522.

Any help with very much appreciated.

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn