sophgo-sg200x-debian icon indicating copy to clipboard operation
sophgo-sg200x-debian copied to clipboard

LicheeRVNano can't user ttyS1 ttyS2 ttyS3 ttyS4

Open winitboonkliang opened this issue 1 year ago • 1 comments

LicheeRVNano can't user ttyS1 ttyS2 ttyS3 ttyS4

test on ttyS0 serial terminal work

test python3 code send data on ttyS1 ttyS2 ttyS3 ttyS4 not work how to config pin as serial port ?

import serial import time try : print_ser = serial.Serial('/dev/ttyS1', 115200, timeout=1) while True : print_ser.write(b'test send') time.sleep(1) except : print("Fail open port") print_ser.close()

  1. I try change serial "disable" to "okay" in dts and complier to dtb
  2. how to write register pin function in chip turn GPIO to TX or RX function ?

1730057778820

https://raw.githubusercontent.com/sophgo/sophgo-hardware/refs/heads/master/SG200X/03_SG2000/04_SG2000_PINOUT.xlsx

winitboonkliang avatar Oct 27 '24 08:10 winitboonkliang

fix it sudo busybox devmem 0x03001070 32 0x2 # GPIOA 28 UART2 TX sudo busybox devmem 0x03001074 32 0x2 # GPIOA 29 UART2 RX sudo busybox devmem 0x03001068 32 0x6 # GPIOA 18 UART1 RX sudo busybox devmem 0x03001064 32 0x6 # GPIOA 19 UART1 TX

UART 2 Disable port edit by convert sg2002_licheervnano_sd.dtb to sg2002_licheervnano_sd.dts sg2002_licheervnano_sd.dts change disable to okay complier to dtb file and replace original dtb file and reboot

winitboonkliang avatar Jan 09 '25 03:01 winitboonkliang