Untronix Posted October 29 Posted October 29 Hello! I have orange pi one, and i need to connect 2-ch rs232 hat from waveshare, i tried to do something similar to instruction for raspberry only with replacement to armbianEnv.txt, but it’s not worked. I’m newbie, can anyone describe how i can connect this hat? 0 Quote
going Posted October 29 Posted October 29 30 минут назад, Untronix сказал: i need to connect 2-ch rs232 hat from waveshare Question. Can you publish any technical documentation for this device? 0 Quote
Untronix Posted October 29 Author Posted October 29 (edited) 41 minutes ago, going said: Question. Can you publish any technical documentation for this device? Here is all source files https://www.waveshare.com/wiki/2-CH_RS232_HAT SC16IS752_datasheet.pdf 2-CH_RS232_HAT_SchDoc.pdf Edited October 29 by Untronix 0 Quote
going Posted October 29 Posted October 29 1 час назад, Untronix сказал: Here is all source files https://www.waveshare.com/wiki/2-CH_RS232_HAT First, you need to connect the pins correctly. They will be different for your board: Hardware Connection 232 PIN Raspberry Pi (BCM) Description VCC 5V 3.3/5V Power Input GND GND Ground SCLK P21 (SPI1 SCLK) SPI Clock Signal Input MOSI P20 (SPI1 MOSI) SPI Data Input MISO P19 (SPI1 MISO) SPI Data Output CS P18 (SPI1 CS) SPI Chip Select IRQ P24 Interrupt Output . Цитата Software setup Open the terminal and modify the config.txt file by commands: sudo nano /boot/config.txt Add the line below to the file, the int_pin should be set according to the actual welding: dtoverlay=sc16is752-spi1,int_pin=24 You need to write the correct overlay file and compile it. Then this instruction. 0 Quote
Untronix Posted November 7 Author Posted November 7 /dts-v1/; /plugin/; /{ compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&spi0>; // Targeting SPI0 bus (corrected) overlay { status = "okay"; sc16is752: sc16is752@0 { compatible = "nxp,sc16is752"; reg = <0>; clocks = <&sc16is752_clk>; interrupt-parent = <&pio>; interrupts = <0 7 2>; gpio-controller; #gpio-cells = <2>; spi-max-frequency = <4000000>; status = "okay"; sc16is752_clk: sc16is752_clk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <14745600>; // Clock frequency for SC16IS752 }; }; }; }; }; created this overlay for this hat, but i have such logs from dmesg [ 2.533014] spi spi0.0: Fixed dependency cycle(s) with /soc/spi@1c68000/sc16is752@0/sc16is752_clk [ 2.533163] sun6i-spi 1c68000.spi: chipselect 0 already in use [ 2.533175] spi_master spi0: spi_device register error /soc/spi@1c68000/spidev@0 [ 2.533206] spi_master spi0: Failed to create SPI device for /soc/spi@1c68000/spidev@0 [ 8.704292] spi0.0: ttySC0 at I/O 0x0 (irq = 48, base_baud = 921600) is a SC16IS752 [ 8.708394] spi0.0: ttySC1 at I/O 0x1 (irq = 48, base_baud = 921600) is a SC16IS752 Based on this i thought that interfaces are created but not, how i can fix it? 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.