Electronic device and a control method for operating with external power supplies having different power supply capabililties

An electronic device includes a determination unit that determines whether or not an operation of the electronic device can be maintained, based on power supplied from an external device to the electronic device and power supplied from a battery, in a case the power supplied from the external device to the electronic device changes, and a notification unit that notifies information corresponding to a result of the determination.

BACKGROUND

Field of the Disclosure

Aspects of the disclosure generally relate to an electronic device capable of receiving power supplied from an external device, and a control method.

Description of the Related Art

A device that is compliant with a USB (Universal Serial Bus) PD (Power Delivery) standard can supply more power via USB than the USB 2.0 standard.

In the USB PD standard, supply of up to 100 W (20V@5A) is possible, but a source device for supplying power does not have to be able to supply up to 100 W (20V@5A). However, a source device capable of supplying power according to a certain power supply capability is required to be capable of supplying power according to a power supply capability lower than this power supply capability. For example, a source device capable of supplying power according to a power supply capability of 27V (9V@3A) needs to be capable of supplying power according to a power supply capability of 27 W or less. Power supply capability of 27 W or less include 27 W (9V@3A), 15 W (5V@3A), and 7.5 W (5V@5A).

A source device capable of supplying power according to a 27V power supply capability may change the 27 W power supply capability to a power supply capability of less than 27 W (for example, a 15 W power supply capability) when the source device is operating at a 27 W power supply capability. Conversely, when the source device is operating at a power supply capability of less than 27 W (for example, a power supply capability of 15 W), the source device may change a power supply capability of less than 27 W to a power supply capability of 27 W.

As described above, in the USB PD standard, when power is being supplied from a source device to a sink device, it is assumed that the power being supplied from the source device to the sink device is changed.

Japanese Patent Laid-Open No. 2013-109410 describes an electronic device for determining a type of a charger and charging a battery with a charging current according to the type of the charger.

The USB PD standard has the following problems. For example, in an electronic device that has a battery, a state in which the electronic device is operated while the battery is charged with power supplied from an external device is assumed. In such a state, when the supplied power is lowered, power from the battery is used when only the power supplied from the external device is insufficient for the operation of the electronic device. However, if the battery is not sufficiently charged, there may be cases in which the operation of the electronic device is going to be unavailable when power supplied from the external device is lowered.

SUMMARY

According to an aspect of the embodiments, an electronic device that receives power supplied from an external device to the electronic device is improved or facilitated.

According to an aspect of the embodiments, there is provided an electronic device comprising: a determination unit that determines whether or not an operation of the electronic device can be maintained, based on power supplied from an external device to the electronic device and power supplied from a battery, in a case the power supplied from the external device to the electronic device changes; and a notification unit that notifies information corresponding to a result of the determination.

According to an aspect of the embodiments, there is provided a method comprising: determining whether or not an operation of an electronic device can be maintained, based on power supplied from an external device to the electronic device and power supplied from a battery, in a case the power supplied from the external device to the electronic device changes; and notifying information corresponding to a result of the determination.

According to an aspect of the embodiments, there is provided a non-transitory storage medium storing a program that causes a computer to execute a method, the method comprising: determining whether or not an operation of an electronic device can be maintained, based on power supplied from an external device to the electronic device and power supplied from a battery, in a case the power supplied from the external device to the electronic device changes; and notifying information corresponding to a result of the determination.

Further aspects of the embodiments will become apparent from the following embodiments.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments, features, and aspects of the disclosure will be described below with reference to the drawings. However, aspects of the disclosure are not limited to the following embodiments.

First Embodiment

In the first embodiment, an electronic device100that receives power supplied from a source device (corresponding to an external device) that is compliant with a USB (Universal Serial Bus) PD (Power Delivery) standard will be described. As described below, the electronic device100according to the first embodiment can supply power to components of the electronic device100using power received from the source device, and can charge a battery106using the power received from the source device.

Under the USB PD standard, a source device that supplies power to the electronic device100can supply power according to a predetermined power supply capability (one of 7.5 W (5V@1.5 Å), 15 W (5V@3 Å), or 27 W (9V@3 Å)).

After the source device has supplied power to the electronic device100, the source device can reduce power supplied to the electronic device100in a case such as where power supplied to the electronic device100cannot be maintained. For example, although the source device supplies 27 W (9V@3 Å) of power to the electronic device100at a time of starting the supply of power, there are cases where the source device cannot maintain power supply at 27 W (9V@3 Å). In such a case, the source device can notify the electronic device100of a change to power of 15 W (5V@3 Å), and then change the power supplied to the electronic device100.

Hereinafter, an example of components of the electronic device100according to the first embodiment will be described with reference toFIG. 1. However, the component of the electronic device100are not limited to the components illustrated inFIG. 1.

The electronic device100is a sink device that supports the USB PD standard. The electronic device100can also act as a digital camera, a mobile phone (for example: a smart phone), or a mobile terminal (for example: a tablet terminal), or at least one of these.

A USB control unit101is configured as a dedicated hardware processor, for example, and, if a device that supports USB PD is connected in accordance with a USB interface111, detects that connection and performs communication control with a source device, or the like. The USB interface111has an VBUS terminal and a CC (Configuration Channel) terminal. The VBUS terminal is a terminal for receiving power supply from a source device. The CC terminal is a terminal for acquiring information on power supply capability of the source device.

The USB control unit101includes an input power detection unit102, a PD communication unit103, an internal communication unit104, and a power control unit105.

The input power detection unit102detects a VBUS voltage (a voltage of the VBUS terminal) and power that is supplied from the source device to the electronic device100.

The PD communication unit103performs communication that is compliant with the USB PD standard with the source device via the USB interface111.

The internal communication unit104performs a communication inside the device with a system control unit109that controls the components of the electronic device100.

The power control unit105is connected to the input power detection unit102, the PD communication unit103, and the internal communication unit104. The power control unit105controls charging of the battery106, and controls supply of power to the components of the electronic device100.

Battery106is a rechargeable battery, such as a lithium ion battery, and can be removed from the electronic device100. The battery106is connected to the USB control unit101and supplies power for causing the components of the electronic device100to operate.

A power supply unit107is connected to the USB control unit101. The power supply unit107converts power supplied from the power control unit105into a voltage necessary for the components of the electronic device100, and power resulting from this conversion is supplied to the components.

A remaining amount detection unit108is connected to the battery106and detects a remaining amount of the battery106.

The system control unit109includes a processor (for example: a hardware processor) that controls the components of the electronic device100. The system control unit109can control various processes to be described later by executing a program stored in a memory (not illustrated). Note that the system control unit109is connected to the internal communication unit104and the remaining amount detection unit108of the USB control unit101.

A display unit110displays a GUI (Graphical User Interface such as characters, graphics, and symbols for interactive operation, and displays images. The display unit110is, for example, a display device such as a liquid crystal display or an organic EL display. Configuration may be such that the display unit110is integrated with the electronic device100or is an external device connected to the electronic device100. The electronic device100may be connected to the display unit110and may have a function of controlling display of the display unit110. The display unit110is connected to the system control unit109, and the system control unit109controls display of the display unit110.

Next, an example of an operation state of the electronic device100will be described with reference toFIG. 2.

Hereinafter, an example of an operation state when the electronic device100acts as a digital camera will be described. In order to simplify the description, a case of two modes: a still image mode and a moving image mode, will be described as an example of operation modes of the electronic device100. The moving image mode is a first operation mode that can operate with power consumption of 7.5 W or more. The still image mode is a second operation mode that can operate with power consumption of less than 7.5 W.

First, the terms written inFIG. 2will be described.

“Discharge” indicates a state in which the electronic device100operates only by power of the battery106.

“Power supply” indicates a state in which the electronic device100operates with only power supplied from the source device and charging of the battery106is not performed.

“Power supply+charge” indicates an operation state in which the electronic device100operates with only power from the source device and charging of the battery106is not performed.

“Power supply+discharge” indicates a state in which power from the source device is insufficient for the operation of the electronic device100, and the electronic device100is operating by also using power from the battery106.

Next, with reference toFIG. 2, description is given for a relationship between a power supply capability of a source device, an operation mode of the electronic device100, and a power supply state.

InFIG. 2, a state in which charging of the battery106is complete and recharging is unnecessary and a remaining amount in a full state is referred to as “fully charged”, and a state in which there is a remaining amount of the battery106and charging is available is referred to as “not fully charged”.

A “power supply+charge”201is when the battery106is in a not fully charged state, the power supply capability of the source device is 27 W (9V@3 Å) or 15 W (5V@3 Å), and the operation mode of the electronic device100is the still image mode or the moving image mode. In this case, this is a state in which the electronic device100is operating while charging the battery106.

A “power supply”202is when the battery106is in a not fully charged state, the power supply capability of the source device is 7.5 W (5V@1.5 Å), and the operation mode of the electronic device100is the still image mode. In this case, this is a state in which the electronic device100is operating from only power from the source device, without charging the battery106.

A “power supply+discharge”203is when the battery106is in a not fully charged state, the power supply capability of the source device is 7.5 W (5V@1.5 Å), and the operation mode of the electronic device100is the moving image mode. In this case, this is a state in which the electronic device100is operating in accordance with power supplied from the source device and power output from the battery106.

A “discharge”204is a case where the source device is a state of not being connected to the electronic device100, and where the operation mode of the electronic device100is the still image mode or the moving image mode. In this case, this is a state in which the electronic device100is operating with only power outputted from the battery106.

A “power supply”205is when the battery106is in a fully charged state, the power supply capability of the source device is 27 W (9V@3 Å) or 15 W (5V@3 Å), and the operation mode of the electronic device100is the still image mode or the moving image mode. In this case, this is a state in which the electronic device100is operating with only power supplied from the source device. Note that the “power supply”205includes the case where the battery106is in a fully charged state, the power supply capability of the source device is 7.5 W (5V@1.5 Å), and the operation mode of the electronic device100is the still image mode.

A “power supply+discharge”206is when the battery106is in a fully charged state, the power supply capability of the source device is 7.5 W (5V@1.5 Å), and the operation mode of the electronic device100is the moving image mode. In this case, this is a state in which the electronic device100is operating in accordance with power supplied from the source device and power output from the battery106.

A “discharge”207is a case where the source device is a state of not connected to the electronic device100, and where the operation mode of the electronic device100is the still image mode or the moving image mode. In this case, this is a state in which the electronic device100is operating with only power outputted from the battery106.

Next, an example of a remaining amount display for the battery106of the electronic device100will be described with reference toFIG. 3.

A first icon301is displayed on the display unit110when the battery106is in the fully charged state. When the voltage of the battery106is greater than or equal to a threshold VHalf and the remaining amount of the battery106is greater than or equal to 50%, the battery106is determined to be in a fully charged state.

A second icon302is displayed on the display unit110when the battery106is in an intermediate charge state. When the voltage of the battery106is less than a first threshold VHalf and greater than or equal to a second threshold VWeak, and the remaining amount is 20% to 50%, the battery106is determined to be in the intermediate charge state.

A third icon303is displayed on the display unit110when the battery106is in a low charge state. When the voltage of the battery106is less than the second threshold VWeak and greater than or equal to a third threshold VLow, and the remaining amount is 10% to 20%, the battery106is determined to be in the low charge state. The third icon303is displayed to notify the user that the remaining amount of the battery106is low.

A fourth icon304is displayed on the display unit110when the battery106is in a no charge state. When the voltage of the battery106is less than or equal to the third threshold VLow and the remaining amount is less than or equal to 10%, the battery106is determined to be in the no charge state. The fourth icon304is displayed to perform a notification for prompting a user to shut down the electronic device100and charge the battery106.

A fifth icon306is displayed on the display unit110when the battery106is charging. The fifth icon306is displayed to notify the user that charging is underway in a case where the battery106is being charged by power supplied from a source device.

A sixth icon307is displayed on the display unit110when a source device is connected to the electronic device100. The sixth icon307is displayed to notify the user that a source device is connected to the electronic device100and power is being supplied from the source device.

Next, an example of a process performed by the electronic device100will be described with reference to flow charts ofFIGS. 4, 5A, 5B, 6A, 6B, and 7. A process400indicates an example of a process in which the electronic device100controls power supplied from a connected device in accordance with the type of the device which is connected over USB.

In the process400ofFIG. 4, the system control unit109communicates with the USB control unit101and controls the components of the electronic device100by executing a program. The process400is started when the source device and the electronic device100are connected over USB.

In step S401, the USB control unit101determines whether or not the source device is connected to the electronic device100via USB based on the voltage of a terminal connected to the PD communication unit103and the VBUS voltage detected by the input power detection unit102. If the USB control unit101determines in step S401that the USB control unit101is not connected to the source device, the process400proceeds to step S402.

In step S402, the USB control unit101performs control so as to supply power of the battery106to the power supply unit107, and the process400proceeds to step S403.

In step S403, the system control unit109acquires the voltage of the battery106from the remaining amount detection unit108, and compares it with the first threshold VHalf, the second threshold VWeak, and the third threshold VLow to determine the voltage of the battery106, and the process400proceeds to step S404.

In step S404, the system control unit109displays any one of the icons301to304according to the voltage of the battery106determined in step S403without displaying the sixth icon307, and the process400proceeds to step S405.

In step S405, the system control unit109starts operation in accordance with the operation mode of the electronic device100, and the process400proceeds to step S406. When the electronic device100acts as a digital camera, the operation mode of the electronic device100is a moving image mode or a still image mode.

In step S406, the USB control unit101determines whether or not the source device is connected to the electronic device100via USB based on the voltage of a terminal connected to the PD communication unit103and the VBUS voltage detected by the input power detection unit102. When the USB control unit101determines that a source device is not connected (NO in step S406), the present operation continues, and when the USB control unit101determines that a source device is connected (YES in step S406), the process400proceeds to step S407.

If the USB control unit101determines in step S401that the USB control unit101is connected to a source device, the process400proceeds to step S407.

In step S407, the USB control unit101performs communication with the source device in accordance with the PD communication unit103, and acquires power supply capability information indicating the power supply capability of the source device. Then, the USB control unit101determines the power supply capability of the source device in accordance with the power supply capability information acquired in step S407.

If the power supply capability of the source device is 27 W (9V@3 Å), the process400proceeds from step S407to step S408. If the power supply capability of the source device is 15 W (5V@3 Å), the process400proceeds from step S407to step S410. If the power supply capability of the source device is 7.5 W (5V@1.5 Å), the process400proceeds from step S407to step S412.

In step S408, the USB control unit101requests the PD communication unit103to supply power of 27 W (9V@3 Å) to the source device, and the process400proceeds to step S409.

In step S409, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 27 W (9V@3 Å), the USB control unit101confirms that power is supplied from the source device, and then a process500shown inFIGS. 5A and 5Bwill begin.

In step S410, the USB control unit101requests the PD communication unit103to supply power of 15 W (5V@3 Å) to the source device, and the process400proceeds to step S411.

In step S411, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 15 W (5V@3 Å), the USB control unit101confirms that power is supplied from the source device, and then a process600shown inFIGS. 6A and 6Bwill begin.

In step S412, the USB control unit101requests the PD communication unit103to supply power of 7.5 W (5V@1.5 Å) to the source device, and the process400proceeds to step S413.

In step S413, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 7.5 W (5V@1.5 Å), the USB control unit101confirms that power is supplied from the source device, and then a process700shown inFIG. 7will begin.

Next, referring toFIGS. 5A and 5B, the process500performed when the electronic device100receives power supply of 27 W (9V@3 Å) from the source device will be described.

In step S501, the system control unit109acquires the voltage of the battery106from the remaining amount detection unit108, and compares it with the first threshold VHalf, the second threshold VWeak, and the third threshold VLow to determine whether the battery106is in the fully charged state. If the system control unit109determines in step S501that the battery106is in the fully charged state (YES in step S501), the process500proceeds to step S502.

In step S502, the USB control unit101supplies power supplied from the source device to the power supply unit107, and the process500proceeds to step S503.

In step S503, the system control unit109displays, on the display unit110, the first icon301indicating the remaining battery level and the sixth icon307indicating a state where the source device is connected, and the process500proceeds to step S504.

In step S504, the system control unit109starts operation of the electronic device100, and the process500proceeds to step S505. When the electronic device100acts as a digital camera, the electronic device100starts operation in the moving image mode or the still image mode.

In step S505, the system control unit109determines the operation mode of the electronic device100, and in the case of the first operation mode, the process500proceeds to step S506, and in the case of the second operation mode, the process500proceeds to step S509. When the electronic device100acts as a digital camera, the first operation mode is the moving image mode and the second operation mode is the still image mode.

In step S506, the system control unit109sets a predetermined threshold VSC with respect to the voltage of the battery106detected by the remaining amount detection unit108, and the process500proceeds to step S507. When the electronic device100is in the “power supply+discharge” state, the value of the predetermined threshold VSC is a value at which the operation of the electronic device100cannot be maintained when the voltage of the battery106falls below the predetermined threshold VSC.

In step S507, the system control unit109compares the voltage of the battery106acquired from the remaining amount detection unit108with the predetermined threshold VSC. In step S507, if the voltage of the battery106is greater than the predetermined threshold VSC, the process500proceeds to step S509, and if the voltage is less than or equal to the predetermined threshold VSC, the process500proceeds to step S508.

In step S508, the system control unit109performs a warning display, and the process500proceeds to step S509. In the warning display, a message or the like is displayed on the display unit110to notify the user that, if the power supplied from the source device is changed to 7.5 W (5V@1.5 Å), the moving image mode currently in operation is going to be unavailable and the operation will end.

In step S509, the power control unit105determines whether or not the PD communication unit103has received a change notification indicating a change in the power supply capability of the source device from the source device. In step S509, when the power control unit105has received a change notification from the source device (YES in step S509), the process500proceeds to step S510, and when the power control unit105has not received a change notification (NO in step S509), the process500proceeds to step S505.

In step S510, the USB control unit101performs communication with the source device in accordance with the PD communication unit103, and acquires power supply capability information indicating the power supply capability of the source device, and the process500proceeds to step S511.

In step S511the USB control unit101determines the power supply capability of the source device in accordance with the power supply capability information acquired in step S510. If the power supply capability of the source device is 15 W (5V@3 Å), the process500proceeds to step S512. If the power supply capability of the source device is 7.5 W (5V@1.5 Å), the process500proceeds to step S514.

In step S512, the USB control unit101requests the PD communication unit103to supply power of 15 W (5V@3 Å) to the source device, and the process500proceeds to step S513.

In step S513, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 15 W (5V@3 Å), the USB control unit101confirms that power is supplied from the source device, and then the process600shown inFIGS. 6A and 6Bwill begin.

In step S514, the system control unit109compares the voltage of the battery106acquired from the remaining amount detection unit108with the predetermined threshold VSC. In step S514, if the voltage of the battery106is greater than the predetermined threshold VSC (YES in step S514), the process500proceeds to step S516, and if the voltage is equal to or lower than the predetermined threshold VSC (NO in step S514), the process500proceeds to step S515.

In step S515, the system control unit109performs a process to shutdown the electronic device100, and displays the fourth icon304on the display unit110. Note that charging of the battery106may be performed after the shutdown in step S515.

In step S516, the USB control unit101requests the PD communication unit103to supply power of 7.5 W (5V@1.5 Å) to the source device, and the process500proceeds to step S517.

In step S517, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 7.5 W (5V@1.5 Å), the USB control unit101confirms that power is supplied from the source device, and then the process700shown inFIG. 7will begin.

If the system control unit109determines in step S501that the battery106is not in the fully charged state (NO in step S501), the process500proceeds to step S518.

In step S518, the system control unit109communicates with the internal communication unit104, and performs a setting for charging the battery106with respect to the USB control unit101. The USB control unit101starts to charge the battery106, and the process500proceeds to step S519.

In step S519, the USB control unit101splits power supplied from the source device into power to be supplied to the power supply unit107and power for charging the battery106, and supplies these power to the power supply unit107and battery106.

Normally, the USB control unit101performs control to prioritize power supply to the power supply unit107, and charge the battery106with remaining surplus power.

In step S519, the system control unit109displays, on the display unit110, the fifth icon306indicating that charging of the battery is underway and the sixth icon307indicating a state where the source device is connected, and the process500proceeds to step S520.

In step S520, the system control unit109starts operation of the electronic device100, and the process500proceeds to step S521. When the electronic device100acts as a digital camera, the electronic device100starts operation in the moving image mode or the still image mode.

In step S521, the system control unit109determines the operation mode of the electronic device100, and in the case of the first operation mode, the process500proceeds to step S522, and in the case of the second operation mode, the process500proceeds to step S525. When the electronic device100acts as a digital camera, the first operation mode is the moving image mode and the second operation mode is the still image mode.

In step S522, the system control unit109sets a predetermined threshold VSC with respect to the voltage of the battery106detected by the remaining amount detection unit108, and the process500proceeds to step S523.

In step S523, the system control unit109compares the voltage of the battery106acquired from the remaining amount detection unit108with the predetermined threshold VSC. In step S523, if the voltage of the battery106is greater than the predetermined threshold VSC, the process500proceeds to step S525, and if the voltage is less than or equal to the predetermined threshold VSC, the process500proceeds to step S524.

In step S524, the system control unit109performs a warning display, and the process500proceeds to step S525. In the warning display, a message or the like is displayed on the display unit110to notify the user that, if the power supplied from the source device is changed to 7.5 W (5V@1.5 Å), the moving image mode currently in operation is going to be unavailable and the operation will end.

In step S525, the system control unit109communicates with the internal communication unit104, and, in accordance with the USB control unit101, determines whether charging of the battery106is complete. If the system control unit109determines in step S525that charging of the battery106is complete (YES in step S525), the process500proceeds to step S526.

In step S526, the system control unit109changes the icon to be displayed on the display unit110from the fifth icon306to the first icon301without changing the sixth icon307, and the process500proceeds to step S509.

If the system control unit109determines in step S525that charging of the battery106is not complete (NO in step S525), the process500proceeds to step S527.

In step S527, the power control unit105determines whether or not the PD communication unit103has received a change notification indicating a change in the power supply capability of the source device from the source device. In step S527, when the power control unit105has received a change notification from the source device (YES in step S527), the process500proceeds to step S510, and when the power control unit105has not received a change notification (NO in step S527), the process500returns to step S521.

Next, referring toFIGS. 6A and 6B, the process600performed when the electronic device100receives power supply of 15 W (5V@3 Å) from the source device will be described. Since the process600ofFIGS. 6A and 6Bis the same as the process500ofFIGS. 5A and 5Bwhen 27 W (9V@3 Å) is replaced with 15 W (5V@3 Å), description will be given for where the process600differs from the process500ofFIGS. 5A and 5B. Since processes of step S601to step S610in the process600are the same as the processes of step S501to step S510in the process500, the explanation thereof are omitted.

In step S611the USB control unit101determines the power supply capability of the source device in accordance with the power supply capability information acquired in step S610. If the power supply capability of the source device is 27 W (9V@3 Å), the process600proceeds to step S612. If the power supply capability of the source device is 7.5 W (5V@1.5 Å), the process600proceeds to step S614.

In step S612, the USB control unit101requests the PD communication unit103to supply power of 27 W (9V@3 Å) to the source device, and the process600proceeds to step S613.

In step S613, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 27 W (9V@3 Å), the USB control unit101confirms that power is supplied from the source device, and then the process500inFIGS. 5A and 5Bwill begin.

Since processes of step S614to step S617in the process600are the same as the processes of step S514to step S517in the process500, the explanation thereof are omitted.

Next, referring toFIG. 7, the process700performed when the electronic device100receives power supply of 7.5 W (5V@1.5 Å) from the source device will be described.

In step S701, the system control unit109determines the operation mode of the electronic device100, and in the case of the first operation mode, the process700proceeds to step S702, and in the case of the second operation mode, the process700proceeds to step S707. When the electronic device100acts as a digital camera, the first operation mode is the moving image mode and the second operation mode is the still image mode.

In step S702, the system control unit109sets a predetermined threshold VLB with respect to the voltage of the battery106detected by the remaining amount detection unit108, and compares the voltage of the battery106that is acquired from the remaining amount detection unit108with the predetermined threshold VLB. In step S702, if the voltage of the battery106is greater than the predetermined threshold VLB (YES in step S702), the process700proceeds to step S704, and if the voltage is equal to or lower than the predetermined threshold VLB (NO in step S702), the process700proceeds to step S703. When the electronic device100is in the “power supply+discharge” state, the value of the predetermined threshold VLB is a value at which the operation of the electronic device100cannot be maintained when the voltage of the battery106falls below the predetermined threshold VLB.

In step S703, the system control unit109performs a process to shutdown the electronic device100, and displays the fourth icon304on the display unit110. Note that charging may be performed after the shutdown in step S703.

In step S704, the system control unit109determines the voltage of the battery106by comparing the voltage of the battery106acquired from the remaining amount detection unit108with the predetermined threshold VLB. The system control unit109displays one of the icons301to303according to the voltage of the battery106determined in step S704as well as the sixth icon307on the display unit110, and the process700proceeds to step S705.

In step S705, the system control unit109starts operation in accordance with the operation mode of the electronic device100, and the process700proceeds to step S706. When the electronic device100acts as a digital camera, the operation mode of the electronic device100is the moving image mode.

In step S707, the system control unit109displays any one of the icons301to303according to the voltage of the battery106acquired from the remaining amount detection unit108, as well as the sixth icon307on the display unit110, and the process700proceeds to step S708.

In step S708, the system control unit109starts operation in accordance with the operation mode of the electronic device100, and the process700proceeds to step S706. When the electronic device100acts as a digital camera, the operation mode of the electronic device100is the still image mode.

In step S706, the power control unit105determines whether or not the PD communication unit103has received a change notification indicating a change in the power supply capability of the source device from the source device. In step S706, when the power control unit105has received a change notification from the source device (YES in step S706), the process700proceeds to step S709, and when the power control unit105has not received a change notification (NO in step S706), the process700returns to step S701.

In step S709, the USB control unit101performs communication with the source device in accordance with the PD communication unit103, and acquires power supply capability information indicating the power supply capability of the source device, and the process700proceeds to step S710.

In step S710the system control unit109determines the power supply capability of the source device in accordance with the power supply capability information acquired in step S709. If the power supply capability of the source device is 27 W (9V@3 Å), the process700proceeds to step S711. If the power supply capability of the source device is 15 W (5V@3 Å), the process700proceeds to step S713.

In step S711, the USB control unit101requests the PD communication unit103to supply power of 27 W (9V@3 Å) to the source device, and the process700proceeds to step S712.

In step S712, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 27 W (9V@3 Å), the USB control unit101confirms that power is supplied from the source device, and the process500shown inFIGS. 5A and 5Bwill begin.

In step S713, the USB control unit101requests the PD communication unit103to supply power of 15 W (5V@3 Å) to the source device, and the process700proceeds to step S714.

In step S714, when the USB control unit101receives, via the PD communication unit103, a response from the source device indicating that the source device will start supplying power of 15 W (5V@3 Å), the USB control unit101confirms that power is supplied from the source device, and then the process600shown inFIGS. 6A and 6Bwill begin.

As described above, according to the first embodiment, when power supplied from the source device changes, it is determined whether or not the operation of the electronic device100can be maintained by power supplied from the source device and power supplied from the battery106, and the result of the determination is notified. In particular, when power supplied from the source device changes in a decreasing direction during power supply, a notification that the operation of the electronic device100cannot be maintained is made, and an end process can be performed normally.

Note that embodiments of the present invention are not limited to the first embodiment described above. A first embodiment that is changed or modified within a scope that does not departing from the gist of the invention is also included in the embodiments of the present invention.

Second Embodiment

Various kinds of functions, processes, or methods described in the first embodiment can also be realized by a personal computer, a microcomputer, a CPU (Central Processing Unit), or the like with a program. In a second embodiment, a personal computer, a microcomputer, a CPU, or the like will be called a “computer X” below. Also, in the second embodiment, a program for controlling the computer X and realizing various kinds of functions, processes, or methods described in the first embodiment will be called a “program Y”.

Various kinds of functions, processes, or methods described in the first embodiment are realized by the computer X executing the program Y. In this case, the program Y is supplied to the computer X via a computer-readable storage medium. The computer-readable storage medium according to the second embodiment includes at least one of a hard disk device, a magnetic storage device, an optical storage device, a magneto-optical storage device, a memory card, a volatile memory (e.g., random access memory), a non-volatile memory (e.g., read only memory), or the like. The computer-readable storage medium according to the second embodiment is a non-transitory storage medium.

While aspects of the disclosure are described with reference to exemplary embodiments, it is to be understood that the aspects of the disclosure are not limited to the exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all modifications and equivalent structures.

This application claims priority from Japanese Patent Application No. 2018-245373, filed Dec. 27, 2018, which is hereby incorporated by reference herein in its entirety.