A power supply switching circuit includes a detection circuit which detects a reduction in a voltage level of the main power supply and outputs a detection signal; a first switch circuit which connects a main power supply to an internal power supply node before a reduction in voltage level is detected and disconnects the main power supply from the internal power supply node when the reduction in voltage level to the predetermined detection level is detected; and a second switch circuit which disconnects the subordinate power supply from the internal power supply node before a reduction in voltage level is detected, connects the subordinate power supply to the internal power supply node from when the reduction in voltage level is detected to when the data backup is completed and subsequently disconnects the subordinate power supply from the internal power supply node when the data backup is completed.
展开▼