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.

No RTS on NanoPi Neo UART2

Featured Replies

Hi,
 
I'm fairly new to SBCs and Linux and try to get RS485 working on a NanoPi NEO running Armbian (Legacy 3.4.113).

I build a custom shield for the NanoPi Neo with a MAX3485 taht is connected to the UART2 (TX,RX,RTS) but so far only transmission works.

This is because the RTS pin which I planned to use for toggling the direction pins is always high.

 

I tried to use ioctrl to have it been toggled automatically, but had no success so far.

 

I'm tried to figure out whats the problem and I believe that the configuration of the UART2 does not include the RTS signal:  

cat /proc/tty/driver/uart  |head -8
serinfo:1.0 driver revision:
0: uart:SUNXI mmio:0x01C28000 irq:32 tx:8500 rx:0 RTS|DTR
1: uart:SUNXI mmio:0x01C28400 irq:33 tx:0 rx:0 CTS
2: uart:SUNXI mmio:0x01C28800 irq:34 tx:0 rx:0 CTS
3: uart:SUNXI mmio:0x01C28C00 irq:35 tx:0 rx:0 CTS

I also figured out that i can decompile the /boot/script.bin to the original fex file:

 

bin2fex script.bin > script.fex

 

In there I can see that no RTS signal is configured for uart2 (for some reason the is also none configured for uart0 which doesn't match with the output above for som reason!?)

[uart2]
uart_used = 1
uart_port = 2
uart_type = 2
uart_tx = port:PA00<2><1><default><default>
uart_rx = port:PA01<2><1><default><default>
 
On the linux-sunxi website I found out that I could add RTS to this configuration:
 
 
Am I correct in assuming that I only need to change the config for UART2 like this:

[uart2]
uart_used = 1
uart_port = 2
uart_type = 4
uart_tx = port:PA00<3><1><default><default>
uart_rx = port:PA01<3><1><default><default>
uart_rts = port:PA02<3><1><default><default>
uart_cts = port:PA03<3><1><default><default>

The compile it again, replace the current script.bin with the new one and reboot in order to get RTS working?

 

Any help is highly appreciated!

 

Guest
This topic is now closed to further replies.

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.