We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:odroid-ups2 [2016/03/21 15:57]
ruppi [ODROID-C2]
en:odroid-ups2 [2016/04/20 17:16]
joy.cho [ODROID-C1/C2]
Line 96: Line 96:
   - Detailed connection picture between JP1 of UPS2 and the 40pin header(**J2**) of ODROID-C1.   - Detailed connection picture between JP1 of UPS2 and the 40pin header(**J2**) of ODROID-C1.
 | C1|{{:​en:​ups2:​odroid-c1_a_type_ups2-6_1..jpg?​300|}}||UPS2|{{:​en:​ups2:​odroid-c1_a_type_ups2-6_2.jpg?​300|}}| | C1|{{:​en:​ups2:​odroid-c1_a_type_ups2-6_1..jpg?​300|}}||UPS2|{{:​en:​ups2:​odroid-c1_a_type_ups2-6_2.jpg?​300|}}|
 + 
 +
 +Due to hardware limitations,​ in order to use the UPS2 on ODROID-C2\\
 +  - Extract the blue cable of the 3-pin socket,\\
 +  - Connect the 3-pin socket as shown in the figure above the 40 pin Header.\\
 +The extracted lines connect the pin #26 of the 40 pin header as shown below.\\
 +{{:​en:​connection_ups2_for_odroidc2.png?​400|}}
 +
  
-===== ODROID-C2 ===== 
-  - Detailed connection picture between JP1 of UPS2 and the 40pin header(**J2**) of ODROID-C2. 
  
 ====== ODROID safe shutdown in the event of a power outage ===== ====== ODROID safe shutdown in the event of a power outage =====
Line 107: Line 113:
 The BAT_OK signal is connected to GPIO #199.\\ The BAT_OK signal is connected to GPIO #199.\\
            
-==== ODROID-C1 ==== +==== ODROID-C1/C2 ==== 
-The AC_OK signal is connected to PIN#11(GPIO #88) in the 40pin header(**J2**) of ODROID-C1.\\+The AC_OK signal is connected to PIN#11(GPIO #88) in the 40pin header(**J2**) of ODROID-C1/C2.\\
 The BAT_OK signal is connected to PIN#13(GPIO #116).\\ The BAT_OK signal is connected to PIN#13(GPIO #116).\\
-The POWER_LATCH signal is connected to PIN#15(GPIO #115).\\+The POWER_LATCH signal is connected to PIN#15(GPIO #115) of ODROID-C1.\\ 
 +The POWER_LATCH signal is connected to PIN#26(GPIO #225) of ODROID-C2.\\
  
 **The BAT_OK pin is high when the battery voltage is higher than 3.7V.\\ **The BAT_OK pin is high when the battery voltage is higher than 3.7V.\\
Line 117: Line 124:
  
 The BAT_OK and AC_OK signals are used in the below simple shell script which runs in the background via crontab. The BAT_OK and AC_OK signals are used in the below simple shell script which runs in the background via crontab.
 +
 +
 +<WRAP left round important 50%>
 +Before using UPS3 on ODROID-C2, please check u-boot version. \\
 +If the version of yours is the one before Mar 18 2016, update boot loader.
 +</​WRAP>​
 +
 +=== Check U-Boot Version on C2 ===
 +
 +If you have a USB-UART console, you can easily check the u-boot version using '​ver'​ on u-boot stage. \\
 +
 +<​code>​
 +Hit [Enter] key twice quickly during u-boot loading and enter '​ver'​ or '​version'​.
 +
 +odroidc2# version
 +U-Boot 2015.01-00089-gdfb8216 (Apr 09 2016 - 06:20:43)
 +</​code>​
 +
 +Or you can check it after kernel booting on userspace using a simple shell script.
 +<file sh getUbootVer.sh>​
 +#!/bin/sh
 +dd if=/​dev/​mmcblk0 of=/​tmp/​temp.bin bs=512 skip=97 count=1334 status=none
 +grep -a -r -E -o "​.{0,​0}U-Boot 2015.01.{0,​50}"​ /​tmp/​temp.bin | grep -a "​("​
 +rm /​tmp/​temp.bin
 +</​file>​
 +
 +<​code>​
 +root@odroid64:​~#​ vi getUbootVer.sh
 +root@odroid64:​~#​ sudo chmod a+x getUbootVer.sh
 +root@odroid64:/​home/​odroid#​ ./​getUbootVer.sh
 +         ​U-Boot 2015.01-00089-gdfb8216 (Apr 09 2016 - 06:20:43)
 +</​code>​
 +
 +=== Update U-Boot on C2 ===
 +If your U-Boot version is not the latest one, you can update it using apt-get command.
 +<​code>​
 +sudo apt-get install u-boot
 +</​code>​
  
 ==== Auto shutdown Script ==== ==== Auto shutdown Script ====
 This script checks the status of power and battery.\\ This script checks the status of power and battery.\\
 Save the following code as ups2.sh in home directory.\\ ​ Save the following code as ups2.sh in home directory.\\ ​
-Note that this script can be used with U3 as well as C1 without modification.\\+Note that this script can be used with U3 as well as C1/C2 without modification.\\
 <​code>​ <​code>​
 #!/bin/sh #!/bin/sh
Line 179: Line 224:
         if [ $retval -eq 0 ]         if [ $retval -eq 0 ]
         then         then
-                echo "​battery is low than 3.7V"​ +                echo "​battery is lower than 3.7V"​ 
-                ​if test $MODEL = "​ODROID-C2"​ +                /​sbin/​shutdown -P 1
-                then +
-                        /​sbin/​poweroff +
-                else +
-                        ​/​sbin/​shutdown -P 1 +
-                fi +
         else         else
                 echo "​battery is good"                 echo "​battery is good"
en/odroid-ups2.txt · Last modified: 2016/04/21 13:20 by joy.cho
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0