A method for controlling a serial peripheral interface of a fingerprint sensor, wherein the fingerprint sensor is one of an optical and a capacitive fingerprint sensor, the method comprising: detecting (101, 201) a signal via the fingerprint sensor; wherein the detecting (101; 201) the signal via the fingerprint sensor comprises: detecting change of an induced capacitance value via the capacitive fingerprint sensor, and determining a change event of the induced capacitance value as the signal, or detecting brightness change of reflected light via the optical fingerprint sensor, and determining a brightness change event of the reflected light as the signal, in response to detecting the signal via the fingerprint sensor, sending an interrupt request via the fingerprint sensor to a processor over an interrupt request line, wherein the interrupt request is a request for activating the serial peripheral interface of the fingerprint sensor; after the processor has received the interrupt request, responding to the interrupt request, suspending an execution of a currently running program and turning to process the interrupt request, via the processor; wherein a master-slave port of the serial peripheral interface is connected to the processor, and an assistant-slave port of the serial peripheral interface is connected to the fingerprint sensor, such that only the processor can activate the serial peripheral interface of the fingerprint sensor; in a consecutive step, activating (102; 202; 302; 402) the serial peripheral interface of the fingerprint sensor via the processor through a corresponding instruction; and in a consecutive step, continuing to execute the suspended program via the processor. detecting (101, 201) a signal via the fingerprint sensor; wherein the detecting (101; 201) the signal via the fingerprint sensor comprises: detecting change of an induced capacitance value via the capacitive fingerprint sensor, and determining a change event of the induced capacitance value as the signal, or detecting brightness change of reflected light via the optical fingerprint sensor, and determining a brightness change event of the reflected light as the signal, in response to detecting the signal via the fingerprint sensor, sending an interrupt request via the fingerprint sensor to a processor over an interrupt request line, wherein the interrupt request is a request for activating the serial peripheral interface of the fingerprint sensor; after the processor has received the interrupt request, responding to the interrupt request, suspending an execution of a currently running program and turning to process the interrupt request, via the processor; wherein a master-slave port of the serial peripheral interface is connected to the processor, and an assistant-slave port of the serial peripheral interface is connected to the fingerprint sensor, such that only the processor can activate the serial peripheral interface of the fingerprint sensor; in a consecutive step, activating (102; 202; 302; 402) the serial peripheral interface of the fingerprint sensor via the processor through a corresponding instruction; and in a consecutive step, continuing to execute the suspended program via the processor. detecting change of an induced capacitance value via the capacitive fingerprint sensor, and determining a change event of the induced capacitance value as the signal, or detecting brightness change of reflected light via the optical fingerprint sensor, and determining a brightness change event of the reflected light as the signal, in response to detecting the signal via the fingerprint sensor, sending an interrupt request via the fingerprint sensor to a processor over an interrupt request line, wherein the interrupt request is a request for activating the serial peripheral interface of the fingerprint sensor; after the processor has received the interrupt request, responding to the interrupt request, suspending an execution of a currently running program and turning to process the interrupt request, via the processor; wherein a master-slave port of the serial peripheral interface is connected to the processor, and an assistant-slave port of the serial peripheral interface is connected to the fingerprint sensor, such that only the processor can activate the serial peripheral interface of the fingerprint sensor; in a consecutive step, activating (102; 202; 302; 402) the serial peripheral interface of the fingerprint sensor via the processor through a corresponding instruction; and in a consecutive step, continuing to execute the suspended program via the processor.