Difference between revisions of "RSB-3730 Yocto4.2 UIO Test"

From ESS-WIKI
Jump to: navigation, search
(CN3_GPIO)
Line 31: Line 31:
  
 
[[File:RSB-3730 UIO-4030 RS-232.png|RTENOTITLE]]
 
[[File:RSB-3730 UIO-4030 RS-232.png|RTENOTITLE]]
 +
  
  
Line 37: Line 38:
 
[[File:RSB-3730 UIO CN3 GPIO.png|500x300px|RSB-3730 UIO CN3 GPIO.png]]
 
[[File:RSB-3730 UIO CN3 GPIO.png|500x300px|RSB-3730 UIO CN3 GPIO.png]]
  
'''for example:Short GPIO pin1(in) 151 & pin6(out) 141'''
+
'''for example:Short GPIO pin1(in) 150 & pin6(out) 141'''
 
<pre># echo 150 > /sys/class/gpio/export
 
<pre># echo 150 > /sys/class/gpio/export
 
# echo 141 > /sys/class/gpio/export
 
# echo 141 > /sys/class/gpio/export

Revision as of 07:33, 8 July 2024


UIO-4030 Function

RSB-3730 UIO-4030 spec.pngRSB-3730 UIO-4030 specifications.png

Note:

Device:ttymxc0 - COM_3, ttyUSB0 - COM_4(RS-485)

Need one Adam-4520I module for RS-485.

The test method is as follows

RS-232 U-boot setting:

u-boot=> setenv uart_mode 2:0
u-boot=> saveenv
Saving Environment to MMC... Writing to MMC(2)... OK
u-boot=> reset 

RTENOTITLE


RS-232(COM_3)

# stty -F /dev/ttymxc0 -echo -onlcr 115200
# cat /dev/ttymxc0 &
[1] 653
# echo "Serial Port Test" > /dev/ttymxc0
Serial Port Test

RTENOTITLE


CN3_GPIO

RSB-3730 UIO CN3 GPIO.png

for example:Short GPIO pin1(in) 150 & pin6(out) 141

# echo 150 > /sys/class/gpio/export
# echo 141 > /sys/class/gpio/export
# echo in > /sys/class/gpio/gpio1/direction
# echo out > /sys/class/gpio/gpio2/direction
# echo 1 > /sys/class/gpio/gpio2/value
# cat /sys/class/gpio/gpio1/value
0
# cat /sys/class/gpio/gpio2/value
1

RTENOTITLE

RS-485

RS-485 U-boot Setting:

RTENOTITLE

RS-485(COM4_):

# stty -F /dev/ttyUSB0 speed 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
# cat /dev/ttyUSB0 &
# echo "Serial Test" > /dev/ttyUSB0

RSB-3730 UIO-4030 RS-485.png