Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

t 2-ch rs232 hat

Featured Replies

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?

  • Werner changed the title to t 2-ch rs232 hat
1 час назад, Untronix сказал:

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.

  • Author

/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?

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.