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.

RS485 automatically to control DE pin

Featured Replies

Hi,

 

I am using Nanopi Neo board and I need RS485 driver to control DE pin automatically.

I have prepared DTS Overlay file:

 

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";

    fragment@0 {
        target = <&uart1>;
        __overlay__ {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&uart1_pins &uart1_de_pin>;
            rs485-rts-gpios = <&gpio6 8 0>;  /* PG8 active-low */
            linux,rs485-enabled-at-boot-time;
            rs485-rts-delay = <0 300>;
        };
    };

    fragment@1 {
        target = <&uart2>;
        __overlay__ {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&uart2_pins &uart2_de_pin>;
            rs485-rts-gpios = <&gpio0 2 0>;  /* PA2 active-low */
            linux,rs485-enabled-at-boot-time;
            rs485-rts-delay = <0 300>;
        };
    };
};
 

I produced dtbo file from dts one with the command: dtc -@ -I dts -O dtb -o rs485.dtbo rs485.dts

 

I copied this rs485.dtbo file to /boot/dtb/overlay. Also I added rs485 string to ArmbianEnv.txt and rebooted. 

But only TX works, RX doesn't. 

 

What should  I do else to make it work?

Edited by ABK

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.