Difference between revisions of "AIR 020 Development"

From ESS-WIKI
Jump to: navigation, search
Line 30: Line 30:
  
 
<span style="color:#FF0000;">'''JP5.1.0'''</span>
 
<span style="color:#FF0000;">'''JP5.1.0'''</span>
 +
 +
==== '''Camera''' ====
 +
 +
The imx219 mode:<br/> Size: Discrete 3280x2464 Interval: Discrete 0.048s (21.000 fps)<br/> Size: Discrete 3280x1848 Interval: Discrete 0.036s (28.000 fps)<br/> Size: Discrete 1920x1080 Interval: Discrete 0.033s (30.000 fps)<br/> Size: Discrete 1640x1232 Interval: Discrete 0.033s (30.000 fps)<br/> Size: Discrete 1280x720 Interval: Discrete 0.017s (60.000 fps)<br/> <br/> Preview command:<br/> 3280x2464
 +
<pre>$ gst-launch-1.0 nvarguscamerasrc&nbsp;! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=NV12, framerate=21/1'&nbsp;! nv3dsink</pre>
 +
 +
3280x1848
 +
<pre>$ gst-launch-1.0 nvarguscamerasrc&nbsp;! 'video/x-raw(memory:NVMM), width=3280, height=1848, format=NV12, framerate=28/1'&nbsp;! nv3dsink</pre>
 +
 +
1920x1080
 +
<pre>$ gst-launch-1.0 nvarguscamerasrc&nbsp;! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=29/1'&nbsp;! nv3dsink</pre>
 +
 +
1640x1232
 +
<pre>$ gst-launch-1.0 nvarguscamerasrc&nbsp;! 'video/x-raw(memory:NVMM), width=1640, height=1232, format=NV12, framerate=29/1'&nbsp;! nv3dsink</pre>
 +
 +
1280x720
 +
<pre>$ gst-launch-1.0 nvarguscamerasrc&nbsp;! 'video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=59/1'&nbsp;! nv3dsink</pre>
 +
 +
&nbsp;
  
 
==== '''GPIO Expander''' ====
 
==== '''GPIO Expander''' ====

Revision as of 04:56, 25 May 2023

Flash Mac Address

GBE in eeprom

$ sudo ./eeprom $SOC $mac_address

Where SOC

  186 : TX2-NX
  194 : XavierNX
  210 : Nano 

Intel I210

$ sudo -s
$ BDF=`lspci | grep 210 | awk '{print $1}'`
$ setpci -s $BDF COMMAND=0007

Get NIC

$./EepromAccessTool

Flash I210 address with mac_address = D4E5F6123456 ( If mac address = D4:E5:F6:12:34:56 )

$ ./EepromAccessTool -nic=<NIC> -f=Dev_Start_I210_Copper_NOMNG_8Mb_A2_3.25_0.03.hex -mac=$mac_address

Cold reboot the device.

Tools

Test Command

JP5.1.0

Camera

The imx219 mode:
Size: Discrete 3280x2464 Interval: Discrete 0.048s (21.000 fps)
Size: Discrete 3280x1848 Interval: Discrete 0.036s (28.000 fps)
Size: Discrete 1920x1080 Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1640x1232 Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720 Interval: Discrete 0.017s (60.000 fps)

Preview command:
3280x2464

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=NV12, framerate=21/1' ! nv3dsink

3280x1848

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=1848, format=NV12, framerate=28/1' ! nv3dsink

1920x1080

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=29/1' ! nv3dsink

1640x1232

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1640, height=1232, format=NV12, framerate=29/1' ! nv3dsink

1280x720

$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=59/1' ! nv3dsink

 

GPIO Expander

Test GPIO high/low
air020gpio.png

  • GPIO0 (228) : gpio-419 (PN.01)
  • GPIO1 (118) : gpio-440 (PQ.05)
  • GPIO2 (127) : gpio-318 (PCC.01)
  • GPIO3 (206) : gpio-443 (PR.00)
  • GPIO4 (208) : gpio-437 (PQ.02)
  • GPIO5 (211) : gpio-453 (PS.04)
  • GPIO6 (212) : gpio-436 (PQ.01)
  • GPIO7 (218) : gpio-321 (PCC.04)


1).Switch to root

ubuntu@localhost:~ sudo -s

2).Commnad : where <GPIO> : gpio number and <LEVEL> : high(1)/low(0)
For example, pull up GPIO0 to high.

root@localhost:/home/ubuntu# echo 419 > /sys/class/gpio/export
root@localhost:/home/ubuntu# echo out > /sys/class/gpio/PN.01/direction
root@localhost:/home/ubuntu# echo 1 > /sys/class/gpio/PN.01/value

UART

RS-232

Xavier-NX
COM1 : COM1_SW1 OFF-OFF-OFF-OFF

stty -F /dev/ttyTHS1 speed 115200 raw -echo
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS1

COM2 : COM2_SW1 OFF-OFF-OFF-OFF

stty -F /dev/ttyTHS0 speed 115200 raw -echo
cat /dev/ttyTHS0 &
echo "1234" > /dev/ttyTHS0
RS-422

Xavier-NX
COM1 : COM1_SW1 ON-OFF-ON-OFF
COM2 : COM2_SW1 ON-OFF-ON-OFF
COM2 -> COM1

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS0

COM1 -> COM2

stty -F /dev/ttyTHS0 speed 115200
stty -F /dev/ttyTHS1 speed 115200
cat /dev/ttyTHS0 &
echo "1234" > /dev/ttyTHS1
RS-485

調整COM的dip switch皆是調整_SW1那組
COM1 : COM1_SW1
COM2 : COM2_SW2
Jetson air020 board com.jpg AIR 020 COM.jpeg
 

Xavier-NX

COM1 : /dev/ttyTHS1
COM2 : /dev/ttyTHS0
[硬體控制]
COM2 -> COM1
COM1_SW1 ON-ON-ON-ON, COM2_SW1 ON-ON-ON-OFF

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS0

COM1 -> COM2
COM1_SW1 ON-ON-ON-OFF, COM2_SW1 ON-ON-ON-ON

stty -F /dev/ttyTHS0 speed 115200
stty -F /dev/ttyTHS1 speed 115200
cat /dev/ttyTHS0 &
echo "1234" > /dev/ttyTHS1


[軟體控制]

COM1_SW1/COM2_SW1 ON-ON-OFF-OFF
COM2 -> COM1
UART0_RTS (103) : gpio-482 (PX.06)

echo 482 > /sys/class/gpio/export
echo out > /sys/class/gpio/PX.06/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS1 &
echo 1 > /sys/class/gpio/PX.06/value
echo "1234" > /dev/ttyTHS0
echo 0 > /sys/class/gpio/PX.06/value

COM1 -> COM2
UART1_RTS (207) : gpio-447 (PR.04)

echo 447 > /sys/class/gpio/export
echo out > /sys/class/gpio/PR.04/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS0 &
echo 1 > /sys/class/gpio/PR.04/value
echo "1234" > /dev/ttyTHS1
echo 0 > /sys/class/gpio/PR.04/value

Reference

JP 4.5.1 / JP 4.6.1
AIR-020-RS-485
Calculate GPIO value from pin number