Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LicheeRVNano can't user ttyS1 ttyS2 ttyS3 ttyS4 #39

Open
winitboonkliang opened this issue Oct 27, 2024 · 1 comment
Open

LicheeRVNano can't user ttyS1 ttyS2 ttyS3 ttyS4 #39

winitboonkliang opened this issue Oct 27, 2024 · 1 comment

Comments

@winitboonkliang
Copy link

winitboonkliang commented Oct 27, 2024

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
Copy link
Author

winitboonkliang commented Jan 9, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant