Device turns on when charger attached

Post Reply
crashoverride
Posts: 4716
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 191 times
Contact:

Device turns on when charger attached

Unread post by crashoverride » Tue Jan 07, 2020 7:10 am

With the ODROID-GO in the 'off' state, attaching a charger causes the device to power on. The expected behavior is that the device remains off.

joy
Posts: 1052
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 58 times
Been thanked: 110 times
Contact:

Re: Device turns on when charger attached

Unread post by joy » Tue Jan 07, 2020 9:03 am

I agree with you, crashoverride.

How about this flow?
1. Attach a charger
2. GO Advanced will boot automatically.
-->> Let me check RK817 spec... if it's available only power key makes device boot, not from charger event.
3. Show charging animation on u-boot (stay here and keep charging) / in some seconds, turn off backlight
4. When press power button again, go on next boot stage

Or at step [3], the following can be one scenario, but this scenario is only available when RK817 supports.
3. Enter power off state again
4. When charging is done, RK817 makes an interrupt and wake up go advanced device.

User avatar
AreaScout
Posts: 1215
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 44 times
Been thanked: 112 times
Contact:

Re: Device turns on when charger attached

Unread post by AreaScout » Wed Jan 08, 2020 4:05 am

    Showing charging animation + actual percentage would be cool :)

    RG

    User avatar
    odroid
    Site Admin
    Posts: 33297
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 376 times
    Been thanked: 449 times
    Contact:

    Re: Device turns on when charger attached

    Unread post by odroid » Wed Jan 08, 2020 9:37 am

    AreaScout wrote:
    Wed Jan 08, 2020 4:05 am
      Showing charging animation + actual percentage would be cool :)

      RG
      With minimum backlight brightness to shorten the charging time if possible. ;)

      joy
      Posts: 1052
      Joined: Fri Oct 02, 2015 1:44 pm
      languages_spoken: english
      ODROIDs: ODROID-C1+, XU4, X
      Has thanked: 58 times
      Been thanked: 110 times
      Contact:

      Re: Device turns on when charger attached

      Unread post by joy » Wed Jan 15, 2020 11:31 am

      odroid wrote:
      Wed Jan 08, 2020 9:37 am
      AreaScout wrote:
      Wed Jan 08, 2020 4:05 am
        Showing charging animation + actual percentage would be cool :)

        RG
        With minimum backlight brightness to shorten the charging time if possible. ;)
        OK. I see. :)
        I'm working it based on u-boot charge_animation and rockchip power fuel_gauge driver.
        https://github.com/hardkernel/u-boot/bl ... nimation.c

        But fancy animation may not be available because we don't use rockchip resource image on go advanced ubuntu image and there is not enough area for bmp images in spi flash, too.

        User avatar
        rooted
        Posts: 7259
        Joined: Fri Dec 19, 2014 9:12 am
        languages_spoken: english
        Location: Gulf of Mexico, US
        Has thanked: 452 times
        Been thanked: 127 times
        Contact:

        Re: Device turns on when charger attached

        Unread post by rooted » Wed Jan 15, 2020 5:28 pm

        joy wrote:
        odroid wrote:
        Wed Jan 08, 2020 9:37 am
        AreaScout wrote:
        Wed Jan 08, 2020 4:05 am
          Showing charging animation + actual percentage would be cool :)

          RG
          With minimum backlight brightness to shorten the charging time if possible. ;)
          OK. I see. :)
          I'm working it based on u-boot charge_animation and rockchip power fuel_gauge driver.
          https://github.com/hardkernel/u-boot/bl ... nimation.c

          But fancy animation may not be available because we don't use rockchip resource image on go advanced ubuntu image and there is not enough area for bmp images in spi flash, too.
          Black and White BMP should be tiny in size.

          joy
          Posts: 1052
          Joined: Fri Oct 02, 2015 1:44 pm
          languages_spoken: english
          ODROIDs: ODROID-C1+, XU4, X
          Has thanked: 58 times
          Been thanked: 110 times
          Contact:

          Re: Device turns on when charger attached

          Unread post by joy » Thu Feb 13, 2020 9:06 am

          Hi @crashoverride.
          One commit related to u-boot charge function has been included in Hardkernel github. :)
          https://github.com/hardkernel/u-boot/co ... 907bcb341e

          With the commit, booting and charging logic on u-boot will be adjusted.
          Here is a brief function list.

          Code: Select all

          a. In case of having both of a DC charger attached and a battery connected, u-boot runs this charging logic.
          
          b. After booting, charge animation and battery voltage level will be shown on display.
          
          c. After 10 seconds without any key input, display and backlight turn off. (currently only display off without entering suspend mode)
          
          d. Using power key (short key), switches to display on.
          
          e. Using long power key (1~2 seconds), u-boot will run a normal booting process.
          
          f. Max battery charge current is 1.5A that is a same value with kernel charge driver.
          
          g. 100% reference is 4.2V battery voltage and charge animation steps depends on its percentage. 
              It means when battery level gets 4.2V (actual value is about 4.17~4.2), animation will show only a full-charged display image. 
          
          To run this logic, we need to update both of (1) u-boot on SD card and (2) spi flash using recovery image.
          [Step 1] First, update u-boot of SD Card including the related commit.
          [Step 2] Update spi flash image using a new recovery image here. You can build it by yourself from the latest version of Hardkernel u-boot.
          https://github.com/hardkernel/u-boot/co ... A-v2017.09
          https://dn.odroid.com/RK3326/ODROID-GO- ... 200211.img

          @crashoverride,
          Please include the commit and other latest ones in your next release image. ;)

          crashoverride
          Posts: 4716
          Joined: Tue Dec 30, 2014 8:42 pm
          languages_spoken: english
          ODROIDs: C1
          Has thanked: 0
          Been thanked: 191 times
          Contact:

          Re: Device turns on when charger attached

          Unread post by crashoverride » Thu Feb 13, 2020 11:04 am

          The next release will include the change.

          Post Reply

          Return to “Issues”

          Who is online

          Users browsing this forum: notime2d8 and 2 guests