CN115665714B - Near field communication method and device, master control equipment, NFC chip and NFC equipment - Google Patents
Near field communication method and device, master control equipment, NFC chip and NFC equipment Download PDFInfo
- Publication number
- CN115665714B CN115665714B CN202211442680.3A CN202211442680A CN115665714B CN 115665714 B CN115665714 B CN 115665714B CN 202211442680 A CN202211442680 A CN 202211442680A CN 115665714 B CN115665714 B CN 115665714B
- Authority
- CN
- China
- Prior art keywords
- nfc chip
- nfc
- abnormal
- chip
- wake
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Transceivers (AREA)
Abstract
The application provides a near field communication method and device, a master control device, an NFC chip and an NFC device, which can effectively solve communication abnormity caused by non-hardware damage in the NFC chip and do not influence user experience. The method is applied to an NFC chip, the NFC chip is connected with a main control device, and the method comprises the following steps: determining that the NFC chip is abnormal; controlling the NFC chip to enter a standing standby state, and restarting a hardware module with an abnormal condition in the NFC chip in the standing standby state; setting a wake-up source to wake up the NFC chip from the standing standby state after a preset time; sending abnormal indication information to the master control equipment, wherein the abnormal indication information is used for indicating that the NFC chip is abnormal; and receiving the configuration parameters sent by the master control equipment in response to the abnormal indication information so that the NFC chip carries out near field communication according to the configuration parameters after being awakened.
Description
Technical Field
The embodiment of the application relates to the field of near field communication, and more particularly to a method and an apparatus for near field communication, a master device, an NFC chip and an NFC device.
Background
Near Field Communication (NFC) technology has better security and convenience, and has been widely applied in the fields of door control, transportation, electronic payment, and the like. When communication is abnormal due to the fact that an NFC chip is not damaged by hardware, an NFC system is already in an unexpected running state, and cannot correctly respond to an NFC Controller Interface (NCI) instruction issued by a host device, such as a Device Host (DH), and the DH terminates a current application process and powers off and restarts the NFC system, so that a user feels an obvious jam when using an application program, thereby affecting user experience. Therefore, how to effectively solve the communication abnormality caused by the non-hardware damage in the NFC chip without affecting the user experience becomes a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a near field communication method and device, a master control device, an NFC chip and an NFC device, which can effectively solve communication abnormity caused by non-hardware damage in the NFC chip and do not influence user experience.
In a first aspect, a method for near field communication is provided, where the method is applied to an NFC chip, and the NFC chip is connected to a master device, and the method includes: determining that the NFC chip is abnormal; controlling the NFC chip to enter a standing standby state, and restarting a hardware module with an abnormal condition in the NFC chip in the standing standby state; setting a wake-up source to wake up the NFC chip from the standing standby state after a preset time; sending abnormal indication information to the master control equipment, wherein the abnormal indication information is used for indicating that the NFC chip is abnormal; and receiving the configuration parameters sent by the master control equipment in response to the abnormal indication information so that the NFC chip carries out near field communication according to the configuration parameters after being awakened.
In one implementation, the determining that the NFC chip is abnormal includes: detecting a state machine of a hardware module of the NFC chip; and if the state of the state machine is different from the expected state, determining that the NFC chip is abnormal.
In one implementation, the determining that the NFC chip is abnormal includes: detecting a state register of the NFC chip; and if the value of the status register is different from the expected value, determining that the NFC chip is abnormal.
In one implementation, the method further comprises: and when the NFC chip is determined to be abnormal, closing the started clock and functions in the NFC chip so as to enable the NFC chip to enter a low power consumption mode.
In one implementation, the method further comprises: and when the NFC chip is determined to be abnormal, controlling a hardware module which is not abnormal in the NFC chip to enter an initial state.
In one implementation, before the controlling the NFC chip to enter a stand-by state, the method further includes: and clearing the configuration parameters used by the NFC chip before the abnormity occurs.
In one implementation, before the controlling the NFC chip to enter a stand-by state, the method further includes: the operation currently being performed is finished.
In one implementation manner, the NFC chip employs an RTOS, and the processing finishes an operation currently being performed, including: the currently executing message or event is processed.
In one implementation, the restarting, in the standby state, the hardware module in which the abnormality occurs in the NFC chip includes: resetting the power supply of the abnormal hardware module in the NFC chip so as to enable the abnormal hardware module to enter an initial state.
In an implementation manner, the abnormality indication information carries a reason why the NFC chip has an abnormality.
In one implementation, the master device is configured to, after receiving the exception indication information, reset a protocol stack for near field communication and send the configuration parameter, and in the process, maintain a connection between an application and a service process of the near field communication.
In one implementation manner, the wake-up source includes a timer, and the wake-up source is configured to wake up the NFC chip from the standing-by state after the timing duration of the timer is over.
In one implementation manner, the wake-up source is configured to wake up the NFC chip from the standing-by state when a field strength of a radio frequency signal during near field communication meets a predetermined condition.
In one implementation manner, the wake-up source includes a wake-up message sent by the master device, where after it is determined that the NFC chip is abnormal, the method further includes: and sending a wakeup notification to the master control device so that the master control device sends the wakeup message to the NFC chip after the preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation manner, the wake-up source is configured to trigger the NFC chip to wake up from the standing-by state according to a change of a power supply level of the NFC chip.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
In one implementation, before determining that the NFC chip is abnormal, the method further includes: and testing the hardware module of the NFC chip, and determining that the hardware module of the NFC chip is not physically damaged according to a test result.
In one implementation, the NFC chip is applied to an NFC device in a CE mode, a RW mode, or a P2P mode.
In one implementation, the master device includes a DH, a SE, a UICC, or a SIM card.
In a second aspect, a near field communication method is provided, and is applied to a master device, where the master device is connected to an NFC chip, and the method includes: receiving abnormal indication information sent by the NFC chip, wherein the abnormal indication information is used for indicating that the NFC chip is abnormal, the NFC chip enters a standing standby state after the abnormality occurs, and the abnormal hardware module in the NFC chip is restarted in the standing standby state; and responding to the abnormal indication information, sending configuration parameters to the NFC chip so as to enable the NFC chip to carry out near field communication according to the configuration parameters after being awakened from the standing standby state.
In an implementation manner, the abnormality indication information carries a reason why the NFC chip has an abnormality.
In one implementation, the sending configuration parameters to the NFC chip includes: resetting a protocol stack for near field communication and sending the configuration parameters after resetting the protocol stack, wherein the master device maintains the connection between the application program and the service process of the near field communication in the process of resetting the protocol stack and sending the configuration parameters.
In one implementation manner, the NFC chip enters a standing-by state after an exception occurs, so as to restart a hardware module in the NFC chip, where the exception occurs, in the standing-by state, and the method further includes: receiving a wake-up notice sent by the NFC chip; and sending a wakeup message to the NFC chip after a preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
In one implementation, the NFC chip is applied to an NFC device in a CE mode, a RW mode, or a P2P mode.
In one implementation, the master device includes a DH, a SE, a UICC, or a SIM card.
In a third aspect, an apparatus for near field communication is provided, where the apparatus is applied to an NFC chip, and the NFC chip is connected to a master device, and the apparatus includes: the abnormality detection unit is used for determining that the NFC chip is abnormal; the processing unit is used for controlling the NFC chip to enter a standing standby state and restarting a hardware module with abnormality in the NFC chip in the standing standby state; the processing unit is further configured to set a wake-up source to wake up the NFC chip from the standing standby state after a predetermined time; the receiving and sending unit is used for sending abnormal indication information to the main control equipment, and the abnormal indication information is used for indicating that the NFC chip is abnormal; the transceiver unit is further configured to receive a configuration parameter sent by the master device in response to the abnormal indication information, so that the NFC chip performs near field communication according to the configuration parameter after being awakened.
In one implementation, the anomaly detection unit is specifically configured to: detecting a state machine of a hardware module of the NFC chip; and if the state of the state machine is different from the expected state, determining that the NFC chip is abnormal.
In one implementation, the anomaly detection unit is specifically configured to: detecting a state register of the NFC chip; and if the value of the status register is different from the expected value, determining that the NFC chip is abnormal.
In one implementation, the processing unit is further configured to: and when the NFC chip is determined to be abnormal, closing the started clock and functions in the NFC chip so as to enable the NFC chip to enter a low power consumption mode.
In one implementation, the processing unit is further configured to: and when the NFC chip is determined to be abnormal, controlling a hardware module which is not abnormal in the NFC chip to enter an initial state.
In one implementation, the processing unit is further configured to: before the NFC chip is controlled to enter a standing standby state, clearing the configuration parameters used by the NFC chip before the abnormity occurs.
In one implementation, the processing unit is further configured to: and before the NFC chip is controlled to enter the standing standby state, finishing the operation currently executed.
In one implementation, the NFC chip employs an RTOS, and the processing unit is specifically configured to: and before the NFC chip is controlled to enter the standing standby state, finishing processing the currently executed message or event.
In one implementation, the processing unit is specifically configured to: and resetting the power supply of the abnormal hardware module in the NFC chip so as to enable the abnormal hardware module to enter an initial state.
In an implementation manner, the abnormality indication information carries a reason why the NFC chip has an abnormality.
In one implementation, the master device is configured to, after receiving the exception indication information, reset a protocol stack for near field communication and send the configuration parameter, and in the process, maintain a connection between an application and a service process of the near field communication.
In one implementation manner, the wake-up source includes a timer, and the wake-up source is configured to wake up the NFC chip from the standing-by state after the timing duration of the timer is ended.
In one implementation manner, the wake-up source is configured to wake up the NFC chip from the standing-by state when a field strength of a radio frequency signal during near field communication meets a predetermined condition.
In one implementation manner, the wake-up source includes a wake-up message sent by the master device, where the transceiver unit is further configured to: and after determining that the NFC chip is abnormal, sending a wakeup notification to the main control equipment so that the main control equipment sends the wakeup message to the NFC chip after the preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation manner, the wake-up source is configured to trigger the NFC chip to wake up from the standing-by state according to a change of a power supply level of the NFC chip.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
In one implementation, the apparatus further includes a testing module configured to: before the NFC chip is determined to be abnormal, testing the hardware module of the NFC chip, and determining that the hardware module of the NFC chip is not physically damaged according to a test result.
In one implementation, the NFC chip is applied to an NFC device in a CE mode, a RW mode, or a P2P mode.
In one implementation, the master device includes a DH, a SE, a UICC, or a SIM card.
In a fourth aspect, a master device is provided, where the master device is connected to an NFC chip, and the master device includes: the NFC chip is used for entering a standing standby state after the NFC chip is abnormal, and restarting a hardware module in the NFC chip, wherein the hardware module is abnormal; and the processing unit is used for responding to the abnormal indication information and sending configuration parameters to the NFC chip so as to enable the NFC chip to carry out near field communication according to the configuration parameters after being awakened from the standing standby state.
In an implementation manner, the abnormality indication information carries a reason why the NFC chip has an abnormality.
In one implementation, the processing unit is further configured to reset a protocol stack for near field communication, and the transceiver unit is specifically configured to send the configuration parameters after resetting the protocol stack; and the master control equipment keeps the connection between the application program of the near field communication and the service process in the process of resetting the protocol stack and sending the configuration parameters.
In one implementation manner, the NFC chip enters a standing-by state after the occurrence of the abnormality, so as to restart the hardware module in the NFC chip in which the abnormality occurs in the standing-by state, and the transceiver unit is further configured to: receiving a wake-up notice sent by the NFC chip; and sending a wakeup message to the NFC chip after a preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
In one implementation, the NFC chip is applied to an NFC device in a CE mode, a RW mode, or a P2P mode.
In one implementation, the master device includes a DH, a SE, a UICC, or a SIM card.
In a fifth aspect, an NFC chip is provided, which includes the apparatus for near field communication according to the third aspect or any possible implementation manner of the third aspect.
A sixth aspect provides an NFC device, including the master device in any implementation manner of the fourth aspect or the fourth aspect, and the NFC chip in any implementation manner of the fifth aspect or the fifth aspect.
In one implementation, the NFC device is a CE mode, RW mode, or P2P mode NFC device.
Based on the technical scheme, when the NFC chip is determined to be abnormal, the abnormal indication information is sent to the master control device, the NFC chip is controlled to enter the standing standby state, the abnormal hardware module in the NFC chip is restarted in the standing standby state, and the NFC chip is awakened from the standing standby state after the preset time length by setting the awakening source. And the master control equipment responds to the abnormal indication information and re-issues the configuration parameters for near field communication to the NFC chip, so that the NFC chip continues to carry out near field communication according to the configuration parameters after awakening. Therefore, the NFC chip reports the abnormal state of the NFC chip through the abnormal indication information and obtains the configuration parameters from the master control device again, meanwhile, the abnormal hardware module is restarted in the standing standby state of the NFC chip, so that the NFC chip can continue to carry out near field communication according to the configuration parameters after awakening from the standing standby state, the whole NFC chip is restarted without power failure, the NFC chip can be recovered to the state before the abnormality, the process enables a user to be unaware, and user experience is greatly improved.
Drawings
Fig. 1 is a schematic flow chart of a method of near field communication of an embodiment of the present application.
FIG. 2 is a flow interaction diagram of one possible implementation of the method shown in FIG. 1.
Fig. 3 is a schematic block diagram of an apparatus for near field communication according to an embodiment of the present application.
Fig. 4 is a schematic block diagram of a master device according to an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
NFC technology has been widely used in people's lives. Generally, the NFC device has three working modes, the first mode is an active mode, also called a card reader/writer (RW) mode, and the NFC device working in the RW mode is used as a card reader to actively send a radio frequency signal to identify and read and write other NFC devices, for example, the NFC device is applied to a POS machine, a door access, and the like; the second mode is a passive mode, also called a Card Emulation (CE) mode, and an NFC device operating in the CE mode may be read and written as a card, and passively responds in a radio frequency field emitted by other NFC devices, for example, applied to mobile payment; the third is a peer to peer (P2P) mode. Hereinafter, for the sake of brevity, an NFC device operating in RW mode is referred to as an RW device, an NFC device operating in CE mode is referred to as a CE device, and an NFC device operating in P2P mode is referred to as a PSP device.
In the use process of three modes of NFC, communication abnormity caused by reasons such as non-hardware damage and the like can occur, so that communication failure is caused, and even an NFC chip is hung up. The reasons for these non-hardware failures include, but are not limited to, the following:
1) Sampling or decoding errors of electromagnetic waves in a normal frequency range such as a 13.56Mhz range by a hardware module of the NFC chip;
2) The clock of the hardware of the NFC chip is inaccurate, so that the running time sequence of the NFC chip is abnormal;
3) Signal sources with other frequencies or foreign matter interference sources and the like exist outside the NFC chip, so that a hardware module of the NFC chip is in an abnormal working state;
4) The configuration of register parameters or feature values of the hardware of the NFC chip does not conform to expected values of the current scenario, but the NFC chip will still operate in this scenario.
For communication abnormality caused by non-hardware damage and the like, a hardware module of an NFC chip cannot work normally, a software module in the NFC chip falls into an unexpected running state due to abnormal reply of the hardware module, and a command issued by a Device Host (DH) or a security chip (SE) and other master devices cannot normally respond at this time, and the master devices terminate a current application process and power off to restart the NFC system, so that the NFC system can be restored to an available state for a long time, and a user feels obvious stutter when using an application program, thereby affecting user experience.
Therefore, the scheme of near field communication aims at solving the problem of communication abnormity caused by non-hardware damage in an NFC chip, and due to the fact that the hardware module which is abnormal is restarted in the standing standby state of the NFC chip, the whole NFC system is not required to be restarted after power failure, so that the NFC chip can be recovered to the state before abnormity under the condition that a user does not sense the NFC chip, and user experience is greatly improved.
Fig. 1 is a flowchart of a method 100 of near field communication according to an embodiment of the present application. The method 100 is applied to the NFC chip 200, and the NFC chip 200 may be applied to an NFC device in a CE mode, an NFC device in a RW mode, or an NFC device in a P2P mode. The NFC chip 200 is connected to a host device 300, and the host device 300 may be, for example, a Device Host (DH), a security chip (SE), a Universal Integrated Circuit Card (UICC), a Subscriber Identity Module (SIM), or other read heads and gates.
The method 100 may be performed by the master device 300 and the NFC chip 200. Specifically, the NFC chip 200 includes the apparatus 210 for near field communication, and the method 100 may be performed by the apparatus 210 for near field communication and the master device 300. It should be understood that the apparatus 210 described in the embodiment of the present application refers to a software module or a software portion of the NFC chip 200, for example, the apparatus 210 may be a firmware 210 of the NFC chip 200. Further, the NFC chip 200 includes a hardware module 220 connected to the apparatus 210. The device 210 in the NFC chip 200 and the hardware module 220 may interact with each other, so that the hardware module 220 is controlled by the device 210 to implement corresponding functions. Hereinafter, the device 210 is also referred to as a software module 210. The hardware module 220 may include, for example, a field detection module, a sampling module, a coding/decoding module, an analog-to-digital conversion module, and other hardware modules of the NFC chip 200.
As shown in fig. 1, the method 100 may include some or all of the following steps.
In step 110, the software module 210 of the NFC chip 200 determines that an abnormality occurs in the NFC chip 200.
In step 120, the software module 210 controls the NFC chip 200 to enter a standby state (standby state), and restarts the hardware module 220 in which the abnormality occurs in the NFC chip 200 in the standby state.
In step 130, the software module 210 sets a wake-up source to wake up the NFC chip 200 from the standing-by state after a predetermined time.
In step 140, the software module 210 transmits abnormality indication information to the master device 300.
The abnormality indication information is used to indicate that the NFC chip 200 is abnormal. The abnormal indication information may be carried in a notification or a message having a specific format agreed between the NFC chip 200 and the host device 300, for example.
Optionally, the abnormality indication information may also carry a reason why the NFC chip 200 is abnormal, and after the reason is reported to the master control device 300, a technician may obtain the reason for the abnormality, so as to improve the design of the NFC chip 200 in the following process.
In step 150, the master device 300 receives the abnormality indication information,
in step 160, in response to the exception indication information, the master device 300 sends configuration parameters to the software module 210.
In step 160, the software module 210 receives the configuration parameters.
The configuration parameters may be carried in the NCI instruction of the master device 300, for example. By setting the configuration parameter, the NFC chip 200 can continue to perform near field communication according to the configuration parameter after waking up.
The configuration parameters may include, for example, at least one of the following parameters: an identifier of NFC (NFC identity, NFCID), a parameter for indicating an NFC technology, a parameter for indicating a transmission rate or a frame length, and a Radio Frequency (RF) characteristic parameter of an antenna. NFC technologies include, for example, NFC technology a, technology B, NFC technology F, and the like, also referred to as mode or protocol information. These configuration parameters are used for the hardware module 220 to implement corresponding functions, thereby completing the near field communication of the NFC chip 200. In practical protocols, these configuration parameters are carried by signaling, for example, by selecting information of a technology as a response (SKA), reply to a Select command (ATS), and so on.
Therefore, the NFC chip 200 reports its abnormal state through the abnormal indication information and reacquires the configuration parameters from the main control device 300, and at the same time, restarts the abnormal hardware module 220 in the standby state of the NFC chip 200, so that the NFC chip continues near field communication according to the configuration parameters after awakening from the standby state, without powering off and restarting the entire NFC chip 200, the NFC chip 200 can be restored to the state before the abnormality, and the process can make the user unaware, thereby greatly improving the user experience.
The method 100 is applied to an abnormal scene caused by non-hardware damage to solve the abnormality caused by the non-hardware damage of the NFC chip 200. Thus, in one implementation, prior to step 110, method 100 further comprises: and testing the hardware module 220 of the NFC chip 200, and determining that the hardware module 220 of the NFC chip 200 has no physical damage according to the test result.
For example, the antenna of the NFC chip 200 may be self-tested by simply sending a pulse waveform, etc., so as to eliminate the influence of the antenna module on the NFC chip 200, and ensure that the hardware module 220 of the NFC chip 200 and the host device 300 is not physically damaged before interaction.
Typically, a state machine includes several state registers and associated combinational logic circuitry. In this embodiment of the present application, whether an abnormality occurs in the NFC chip 200 may be determined by detecting a state register or a state machine of the NFC chip 200.
For example, in step 110, a status register of the NFC chip 200 may be detected, and when a value of the status register is different from an expected value, it may be determined that the NFC chip 200 is abnormal. Taking the example that the NFC chip 200 includes 8 registers, the NFC device 210 queries the values of the status registers before sending or receiving a command, and if the current expected values of the status registers are 11000000, respectively, and finds that the values of the status registers are not 11000000 after querying, it is considered that the NFC chip 200 is abnormal.
For another example, in step 110, a state machine of a hardware module of the NFC chip 200 may be detected, and when the state of the state machine is different from an expected state, it may be determined that the NFC chip 200 is abnormal. Taking three possible states of the NFC chip 200, i.e., the state S0, the state S1, and the state S2 as an example, the NFC device 210 queries the state of the state machine before sending or receiving a command, and if the current expected state of the state is assumed to be S0, and finds that the current state of the state machine is not S0 after querying, it is considered that the NFC chip 200 is abnormal.
Once it is determined that the NFC chip 200 is abnormal, a recovery process of the NFC chip 200 is entered, and steps 120 to 160 are performed, for example.
The NFC chip 200 supports a Low Power Mode (LPM), and the NFC chip 200 may implement a stand-by state in the low power mode. Thus, in one implementation, the method 100 further comprises: when it is determined that the NFC chip 200 is abnormal, the clock and the function that have been turned on in the NFC chip 200 are turned off, so that the NFC chip 200 enters the low power consumption mode, and the hardware module that is not abnormal in the NFC chip is controlled to enter an initial state, that is, an IDLE state.
In one implementation, in step 120, restarting, in the standby state, the hardware module 220 in which the exception occurs in the NFC chip 200 includes: the power supply of the hardware module 220 in which the abnormality occurs in the NFC chip 200 is reset, so that the hardware module 220 in which the abnormality occurs enters an initial state.
Specifically, before the NFC chip 200 enters the standing standby state, all the enabled clocks (timers) in the NFC chip 200 need to be actively turned off, and various functions of the NFC chip 200 need to be turned off, in preparation for entering the low power consumption mode, and then entering the standing standby state; meanwhile, the NFC chip needs to be set to an initial state. However, the hardware module 220 with the exception cannot be controlled by the software module 210 to enter the initial state, and therefore, a power reset operation needs to be performed in the standing-by state to reset the power of the hardware module 220 with the exception, so as to restore the hardware module 220 with the exception to the initial state. For example, the power domain associated with the abnormal hardware module 220 is rebooted, i.e., powered down and powered up, in the stand-by state.
In one implementation, before controlling the NFC chip 200 to enter the standing-by state, the method 100 further includes: the currently executing operation is completed, i.e. the software module 210 completes the currently executing statement. For example, for a real-time operating system (RTOS), the software module 210 finishes processing a message (message) or an event (event) currently being executed according to an original sequence, so as to avoid memory leakage.
After the NFC chip 200 enters the standing-by state and completes the power reset of the abnormal hardware module 220 in the standing-by state, it needs to be woken up from the standing-by state by using a wake-up source, and exits from the low power consumption mode.
Generally, the wake-up source can be implemented by setting a timer, detecting field intensity, receiving a wake-up message sent by the master control device through the communication interface, detecting level variation of a chip power supply, and the like.
The timer is a software timer in the NFC chip 200, and is configured with a timing duration, for example, 100 us, and the timer counts time and triggers the NFC chip 200 to wake up from the standing standby state after the timing duration is reached. The timer has the advantages of wide application scene, simplicity in operation, easiness in implementation and the like.
The wake-up mode for detecting the field strength is to trigger the NFC chip 200 to wake up from a standing standby state according to the field strength change of the RF signal. For example, when the field strength is detected to satisfy a predetermined condition, such as greater than a preset value, the NFC chip 200 is triggered to wake up from the standing-by state.
The wake-up mode for detecting the level change of the chip power supply means that the NFC chip 200 is triggered to wake up from a standing standby state according to the change of the power supply level of the NFC chip 200. For example, pulling up the power supply of the NFC chip 200, such as pulling up the voltage of the corresponding pin from 1.3-1.8V to 2.7-3.3V, triggers the NFC chip 200 to wake up from the standing-by state.
The NFC chip 200 may be connected to the host device 300 through a corresponding communication interface, for example, the NFC chip 200 is connected to the DH through an inter integrated circuit (I2C) communication interface, or connected to the SE through a Serial Peripheral Interface (SPI) communication interface, or connected to the UICC or the SIM card through a Single Wire Protocol (SWP) communication interface. Optionally, after it is determined that the NFC chip 200 is abnormal, the software module 210 may send a wake-up notification to the master device 300, for example, send the wake-up notification to the master device 300 when the NFC chip is about to enter the standing-by state; after receiving the wakeup notification, the main control device 300 sends a wakeup message to the NFC chip 200 after a predetermined time according to the wakeup notification, so as to wake up the NFC chip from the standing-by state. For different master devices, the wake-up message may be passed through different communication interfaces, for example, the wake-up message may be a message of an I2C communication interface sent by DH, a message of an SPI communication interface sent by SE, a message of an SWP communication interface sent by UICC or SIM card, a message of a GPIO communication interface sent by other readers and a gate guard, and the like.
A plurality of wake-up sources are usually configured in different devices, and for electronic devices such as a mobile phone, two wake-up sources are usually configured, for example, a wake-up source based on field intensity detection and a wake-up source based on I2C interface information; for a security device, three wake-up sources are typically configured, such as a wake-up source based on field strength detection, a wake-up source based on SPI interface messages, a wake-up source based on SWP interface messages. These wake-up sources may also be used in the recovery flow of NFC chip 200.
In order to avoid the situation that a single wake-up source is abnormal and cannot wake up, a plurality of wake-up sources may be configured for the recovery process of the NFC chip 200. At this time, optionally, the wake-up sources may be executed in order from high priority to low priority; and if the priorities of the wake-up sources are the same, executing the wake-up sources according to a preset triggering sequence.
In this embodiment, after the NFC chip 200 is abnormal, the software module 210 sends the abnormal indication information to the main control device 300, and the active device 300 re-issues the configuration parameters for the NFC chip 200 based on the abnormal indication information, so as to configure the NFC chip 200 to the state before the abnormality. Therefore, optionally, before controlling the NFC chip 200 to enter the standing-by state, the method 200 may further include: configuration parameters used by the NFC chip 200 before the occurrence of the abnormality are cleared.
It should be understood that the configuration parameters re-issued by the master device 300 to the NFC chip 200 may be the same as the configuration parameters used before the NFC chip 200 enters the standing-by state; or, the configuration parameter re-issued by the main control device 300 to the NFC chip 200 may also be different from the configuration parameter used before the NFC chip 200 enters the standing standby state, for example, the configuration parameter may be adjusted according to an abnormal reason to obtain a new configuration parameter, and then issued to the NFC chip 200.
Optionally, the method 100 further comprises: after the NFC chip 200 wakes up from the standing-by state, the software module 210 clears all the state bits and data to prevent the existence of residues when the configuration parameters are cleared, thereby improving the reliability of the NFC system.
After the NFC chip 200 wakes up from the standing-by state and acquires the configuration parameters sent by the master device 300 under the trigger of the wake-up source, the NFC chip 200 may immediately continue the near field communication according to the configuration parameters, for example, for a CE device, after the NFC chip 200 wakes up successfully, the NFC chip may enter a discovery (discovery) procedure according to the configuration parameters, so that the CE device recovers the interaction procedure between the CE device and the RW device.
In one implementation manner, in step 160, the master device 300 sends the configuration parameters to the NFC chip 200, including: the protocol stack for near field communication is reset and the configuration parameters are sent after the protocol stack is reset. It should be noted that the master device 300 maintains a connection between the application and the service process of the near field communication in the process of resetting the protocol stack and transmitting the configuration parameters.
That is, after receiving the abnormality indication information, the master device 300 needs to reset the protocol stack used for near field communication, that is, reset the protocols of the layers of the entire NFC network, and send the configuration parameters to the NFC chip 200 after resetting the protocol stack. In this process, the main control device 300 should maintain the connection between the application program and the service process of the nfc, i.e. not restart the running application program, so that the user does not feel that the application program in use is restarted.
The application does not set any limit on how the master device 300 maintains the connection between the application program and the service process of the near field communication. During the process of the master device 300 restarting, i.e., resetting, the protocol stack, the master device 300 may maintain the connection between the application and the service process based on any possible manner.
When the NFC chip 200 is abnormal, if the entire NFC chip 200 is powered off and restarted to recover its hardware state, a user may feel a sense of use break, and the application program being used must be restarted. In the near field communication method 100 of the present application, the nfc chip 200 only controls the abnormal hardware module 220 to power off and restart in the standby state, and sends the abnormal indication information to the main control device 300 to enable the main control device 300 to issue the configuration parameters for near field communication again for the main control device, so that the main control device 300 keeps the connection between the application program and the service process in the process, the current application process is not terminated, the application program being used by the user is not restarted, and the user only experiences the operation delay within a very short period of time, which greatly improves the user experience.
Hereinafter, a recovery process of the NFC chip 200 will be described in detail by taking the NFC chip 200 as an example of applying the NFC chip 200 to an RW device in conjunction with a possible flow interaction diagram shown in fig. 2. The flow is performed by the DH 300, the NFC chip 200 applied to the RW device, and the NFC chip 400 applied to the CE device, where the NFC chip 200 includes a software module 210 and a hardware module 220. As shown in fig. 2, the flow includes some or all of the following steps.
In step 401, the DH 300 sends configuration parameters to the software module 210 of the NFC chip 200.
The configuration parameters include, for example, RF feature parameters and NFC parameters (RF feature and NFC parameter) including, for example, NFCID, SAK, ATS, and the like.
In step 402, the DH 300 sends an RF discovery command (RF DISCOVER CMD) to the software module 210.
The RF discovery command is used to indicate that the NFC chip 200 of the RW device is in a discovery state, so that the NFC chip 400 of the CE device performs field detection to perform a discovery (discovery) procedure.
In step 403, the software module 210 sends an instruction to the hardware module 220 to turn on the RW (RW-up>A) mode based on the NFC technology up>A.
In step 404, communication is established between NFC chip 200 and NFC chip 400.
Here, assuming that the NFC chip 200 and the NFC chip 400 communicate with each other based on NFC technology a (type a), communication based on protocol layer 3 of technology a (Tech a layer-3 communication) is established between the NFC chip 200 and the NFC chip 300 in step 404.
In step 405, the hardware module 220 sends a corresponding reply message to the software module 210.
In step 406, software module 210 sends an RF activation notification to DH 300 (RF ACTIVATED NTF).
The RF activation notification is used to indicate that the RF field is activated, enabling near field communication between the RW device and the CE device based on the RF field.
In step 407, the DH 300 sends a communication instruction to the software module 210.
In step 408, the software module 210 sends a communication instruction to the hardware module 220.
In step 409, the hardware module 220 sends a communication instruction to the NFC chip 400.
The communication instruction in steps 407 to 409 is, for example, an RW-4 instruction (RW-4 command), which refers to all instructions for establishing communication of the technology up>A based protocol layer 4 (Tech up>A layer-4 communication), or all instructions for establishing communication of the technology up>A based Application Protocol Datup>A Unit (APDU) (Tech up>A APDU communication), and is also referred to as an RWA layer 4 instruction or an RW-up>A instruction.
In step 410, NFC chip 400 sends a corresponding reply message to hardware module 220.
In step 411, hardware module 220 sends the reply message to software module 210.
In step 412, the software module 210 sends the reply message to the DH 300.
If an abnormality, i.e., an abnormal position shown in fig. 2, occurs in the NFC chip 200 during the step 411, due to interference or the like, the subsequent steps 411 and 412 cannot be normally performed. Then DH 300 may perform step 413 because a corresponding reply message was not received.
In step 413, the DH 300 sends a command to deactivate NFC (inactive NFC) to the software module.
It should be understood that, whether the DH 300 performs step 413 or not, the software module 210 directly performs step 414 after detecting that the NFC chip 200 is abnormal.
In step 414, software module 210 sends an instruction to terminate NFC operations (abort NFC operation) to hardware module 220.
For example, the software module 210 finishes executing the currently executed statement, turns off the turned-on clock and various functions, and prepares to enter the low power mode.
Of course, the abnormality may also occur in other locations, and in this case, the software module 210 directly performs step 414 after detecting that the NFC chip 200 is abnormal.
Next, in step 415, the configuration parameters of the hardware module 220, i.e. the configuration parameters obtained in step 401, are cleared.
In step 416, software module 210 controls hardware module 220 to enter a rest state and set a wake source (enter stub and enable timer source).
The software module 210 may control the hardware module 220 in the NFC chip 200 that is not abnormal to be in the initial state, and the abnormal hardware module 220 is not controlled by the initial state, so that the power domain associated with the abnormal hardware module 220 can only be restarted in the standby state, that is, the power is turned off and then the power is turned on, so that the abnormal hardware module 220 also enters the initial state.
In step 417, the NFC chip 200 wakes up from a standby state based on the wake-up source.
In step 418, the software module 210 sends an exception indication message, which may also be referred to as a RESET _ NTF, to the DH 300.
In step 419, the DH 300 restarts a protocol stack (reset android protocol stack).
Thereafter, the above steps, e.g., steps 401 through 405, may be re-executed to resume near field communication between the CE device and the RW device.
As can be seen, when detecting that the NFC chip 200 is abnormal, the software module 210 sends the abnormal indication information to the master control device 300, and controls the NFC chip 200 to enter the standby state, so as to restart the hardware module 220 in the NFC chip 200, where the abnormality occurs, in the standby state, and by setting the wakeup source, the NFC chip 200 is awakened from the standby state after a predetermined length of time. The main control device 300 re-issues the configuration parameters for near field communication to the NFC chip 200 in response to the abnormal indication information, so that the NFC chip 200 continues near field communication according to the configuration parameters after waking up.
Therefore, the NFC chip 200 reports the abnormal state of the NFC chip through the abnormal indication information and obtains the configuration parameters from the master control device again, and meanwhile, the abnormal hardware module is restarted in the standing standby state of the NFC chip 200, so that the NFC chip continues to perform near field communication according to the configuration parameters after being awakened from the standing standby state, the whole NFC chip 200 is not required to be restarted after power failure, the NFC chip 200 can be recovered to the state before the abnormality, the process can enable a user to be unaware, and user experience is greatly improved.
Fig. 2 is an example, and the method 100 for near field communication according to the embodiment of the present application may also be applied to an NFC chip 400 of a CE device to implement recovery of the NFC chip 400, and can be applied to recovery of near field communication of various NFC technologies including technology a, technology B, and technology F.
The application also provides a near field communication device 210, the device 210 is applied to the NFC chip 200, the NFC chip 200 is connected with a host device 300, and the host device 300 comprises DH, SE, UICC or SIM card, for example. The NFC chip 200 can be applied to an NFC device in a CE mode, a RW mode, or a P2P mode. As shown in fig. 3, the apparatus 210 includes an abnormality detection unit 2101, a processing unit 2101, and a transmission/reception unit 2103.
The anomaly detection unit 2101 is configured to determine that the NFC chip 200 is anomalous;
the processing unit 2102 is configured to: controlling the NFC chip 200 to enter a standing standby state, and restarting the hardware module 220 in which the abnormality occurs in the NFC chip 200 in the standing standby state; setting a wake-up source to wake up the NFC chip 200 from a standing standby state after a preset time; a transceiver unit, configured to send abnormality indication information to the master device 300, where the abnormality indication information is used to indicate that the NFC chip 200 is abnormal;
the transceiving unit 2103 is configured to: and receiving the configuration parameters sent by the master device 300 in response to the abnormal indication information, so that the NFC chip 200 performs near field communication according to the configuration parameters after waking up.
In one implementation, the anomaly detection unit 2101 is specifically configured to: detecting a state machine of the hardware module 220 of the NFC chip 200; if the state of the state machine is different from the expected state, it is determined that the NFC chip 200 is abnormal.
In one implementation, the anomaly detection unit 2101 is specifically configured to: detecting a status register of the NFC chip 200; if the value of the status register is different from the expected value, it is determined that the NFC chip 200 is abnormal.
In one implementation, the processing unit 2102 is further configured to: when it is determined that the NFC chip 200 is abnormal, the clock and the function that have been turned on in the NFC chip 200 are turned off, so that the NFC chip 200 enters the low power consumption mode.
In one implementation, the processing unit 2102 is further configured to: when it is determined that the NFC chip 200 is abnormal, the hardware module 220 in the NFC chip 200, which is not abnormal, is controlled to enter an initial state.
In one implementation, the processing unit 2102 is further configured to: before controlling the NFC chip 200 to enter the standing-by state, the configuration parameters used by the NFC chip 200 before the occurrence of the abnormality are cleared.
In one implementation, the processing unit 2102 is further configured to: before controlling the NFC chip 200 to enter the standing-by state, the operation currently being executed is completed.
In one implementation, the NFC chip 200 employs an RTOS, and the processing unit 2102 is specifically configured to: and processing the currently executed message or event before controlling the NFC chip to enter a standing standby state.
In one implementation, the processing unit 2102 is specifically configured to: the power supply of the hardware module 220 in which the abnormality occurs in the NFC chip 200 is reset, so that the hardware module 220 in which the abnormality occurs enters an initial state.
In one implementation, the abnormality indication information carries a reason why the NFC chip 200 has an abnormality.
In one implementation, the master device 300 is configured to reset the protocol stack for near field communication and send the configuration parameter after receiving the exception indication information, and in this process, maintain a connection between the application and the service process of the near field communication.
In one implementation, the wake-up source includes a timer, and the wake-up source is configured to wake up the NFC chip 200 from the standby state after the timing duration of the timer is over.
In one implementation, the wake-up source is configured to wake up the NFC chip 200 from a standing-by state when the field strength of the radio frequency signal during near field communication satisfies a predetermined condition.
In one implementation manner, the wake-up source includes a wake-up message sent by the master device 300, wherein the transceiving unit 2103 is further configured to: after determining that the NFC chip 200 is abnormal, sending a wakeup notification to the main control device 300, so that the main control device 300 sends a wakeup message to the NFC chip 200 after the predetermined time according to the wakeup notification, where the wakeup message is used to trigger the NFC chip 200 to wake up from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation, the wake-up source is configured to trigger the NFC chip 200 to wake up from the standing-by state according to a change in a power supply level of the NFC chip 200.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
In one implementation, the apparatus 210 further includes a testing module configured to: before it is determined that the NFC chip 200 is abnormal, the hardware module 220 of the NFC chip 200 is tested, and it is determined that the hardware module 220 of the NFC chip 200 is not physically damaged according to a test result.
The present application further provides a host device, where the host device 300 is connected to the NFC chip 200, the host device 300 may be, for example, a DH, an SE, an UICC, or a SIM card, and the NFC chip 200 may be, for example, an NFC device in a CE mode, an RW mode, or a P2P mode. As shown in fig. 4, the main control device 300 includes a transceiving unit 310 and a processing unit 320.
The transceiving unit 310 is configured to: receiving abnormal indication information sent by the NFC chip 200, where the abnormal indication information is used to indicate that the NFC chip 200 is abnormal, where the NFC chip 200 enters a standing standby state after the abnormality occurs, and restarts the hardware module 220 in the NFC chip 200, where the abnormality occurs, in the standing standby state;
the processing unit 320 is configured to: and responding to the abnormal indication information, sending configuration parameters to the NFC chip 200, so that the NFC chip 200 is awakened from a standing standby state and then carries out near field communication according to the configuration parameters.
In one implementation, the abnormality indication information carries a reason why the NFC chip 200 has an abnormality.
In one implementation, the processing unit 320 is further configured to reset a protocol stack for near field communication, and the transceiver unit is specifically configured to send the configuration parameters after the protocol stack is reset; the master control device 300 maintains the connection between the application program and the service process of the near field communication during the process of resetting the protocol stack and sending the configuration parameters.
In one implementation, the transceiving unit 310 is further configured to: receiving a wake-up notification sent by the NFC chip 200; according to the wakeup notification, a wakeup message is sent to the NFC chip 200 after the predetermined time, where the wakeup message is used to wake up the NFC chip 200 from the standing standby state.
In one implementation, the wake-up message includes at least one of the following messages: messages of the I2C communication interface, messages of the SPI communication interface, messages of the SWP communication interface and messages of the GPIO communication interface.
In one implementation, the configuration parameters include at least one of the following parameters: an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and an RF characteristic parameter of an antenna.
The present application further provides an NFC chip 200 including the apparatus 210 for near field communication described in any of the above embodiments. Optionally, the NFC chip 200 further includes a hardware module 220 connected to the apparatus 210.
The present application further provides an NFC device, which includes the NFC chip 200 and the master device 300 described in any of the above embodiments, where the NFC chip 200 includes the near field communication apparatus 210 described in any of the above embodiments. Optionally, the NFC chip 200 further includes a hardware module 220 connected to the apparatus 210. The NFC device may be, for example, a CE mode, RW mode or P2P mode NFC device.
It should be noted that, without conflict, the embodiments and/or technical features in the embodiments described in the present application may be arbitrarily combined with each other, and the technical solutions obtained after the combination also fall within the protection scope of the present application.
The system, apparatus and method disclosed in the embodiments of the present application can be implemented in other ways. For example, some features of the method embodiments described above may be omitted or not performed. The above-described device embodiments are merely illustrative, the division of the unit is only one logical functional division, and there may be other divisions when the actual implementation is performed, and a plurality of units or components may be combined or may be integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling includes electrical, mechanical or other connections.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and the generated technical effects of the above-described apparatuses and devices may refer to the corresponding processes and technical effects in the foregoing method embodiments, and are not described herein again.
It should be understood that the specific examples in the embodiments of the present application are for the purpose of promoting a better understanding of the embodiments of the present application, and are not intended to limit the scope of the embodiments of the present application, and that various modifications and variations can be made by those skilled in the art based on the above embodiments and fall within the scope of the present application.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (38)
1. A Near Field Communication (NFC) method is applied to an NFC chip, the NFC chip is connected with a master device, and the method comprises the following steps:
determining that the NFC chip is abnormal;
controlling the NFC chip to enter a standing standby state, and restarting a hardware module with an abnormal condition in the NFC chip in the standing standby state;
setting a wake-up source to wake up the NFC chip from the standing standby state after a preset time;
sending abnormal indication information to the master control equipment, wherein the abnormal indication information is used for indicating that the NFC chip is abnormal;
receiving configuration parameters sent by the master control device in response to the abnormal indication information so that the NFC chip performs near field communication according to the configuration parameters after being awakened;
wherein, restarting the hardware module in which the abnormality occurs in the NFC chip in the standing-by state includes:
and resetting the power supply of the abnormal hardware module in the NFC chip so as to enable the abnormal hardware module to enter an initial state.
2. The method of claim 1, wherein the determining that the NFC chip is abnormal comprises:
detecting a state machine of a hardware module of the NFC chip;
and if the state of the state machine is different from the expected state, determining that the NFC chip is abnormal.
3. The method of claim 1, wherein the determining that the NFC chip is abnormal comprises:
detecting a state register of the NFC chip;
and if the value of the status register is different from the expected value, determining that the NFC chip is abnormal.
4. The method according to any one of claims 1 to 3, further comprising:
and when the NFC chip is determined to be abnormal, closing the started clock and functions in the NFC chip so as to enable the NFC chip to enter a low power consumption mode.
5. The method according to any one of claims 1 to 3, further comprising:
and when the NFC chip is determined to be abnormal, controlling a hardware module which is not abnormal in the NFC chip to enter an initial state.
6. The method according to any of claims 1 to 3, wherein before said controlling said NFC chip into a rest standby state, said method further comprises:
and clearing the configuration parameters used by the NFC chip before the abnormity occurs.
7. The method according to any of claims 1 to 3, characterized in that before said controlling said NFC chip into a rest standby state, said method further comprises:
the operation currently being performed is finished.
8. The method of claim 7, wherein the NFC chip employs a real-time operating system (RTOS), and wherein the processing completes a currently executed operation, comprising:
the currently executing message or event is processed.
9. The method according to any one of claims 1 to 3, wherein the abnormality indication information carries a reason why the NFC chip has the abnormality.
10. The method according to any of claims 1 to 3, wherein the master device is configured to, after receiving the exception indication information, reset a protocol stack for near field communication and send the configuration parameters, and during this process, maintain a connection between an application and a service process of near field communication.
11. The method according to any one of claims 1 to 3, wherein the wake-up source comprises a timer, and the wake-up source is configured to wake up the NFC chip from the rest standby state after the timing duration of the timer is over.
12. The method according to any one of claims 1 to 3, wherein the wake-up source is configured to wake up the NFC chip from the rest state when a field strength of a radio frequency signal during near field communication satisfies a predetermined condition.
13. The method according to any one of claims 1 to 3, wherein the wake-up source includes a wake-up message sent by the master device, and wherein after determining that the NFC chip is abnormal, the method further includes:
and sending a wakeup notification to the master control device so that the master control device sends the wakeup message to the NFC chip after the preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
14. The method of claim 13, wherein the wake-up message comprises at least one of the following messages:
the information of the I2C communication interface of the internal integrated circuit, the information of the SPI communication interface of the serial peripheral interface, the information of the SWP communication interface of the single wire protocol and the information of the GPIO communication interface of the general purpose input and output.
15. The method according to any one of claims 1 to 3, wherein the wake-up source is configured to trigger the NFC chip to wake up from the rest state according to a change in a power supply level of the NFC chip.
16. The method according to any of claims 1 to 3, wherein the configuration parameters comprise at least one of the following parameters:
an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and a radio frequency, RF, characteristic parameter of an antenna.
17. The method according to any one of claims 1 to 3, wherein before determining that the NFC chip is abnormal, the method further comprises:
and testing the hardware module of the NFC chip, and determining that the hardware module of the NFC chip is not physically damaged according to a test result.
18. The method according to any one of claims 1 to 3, wherein the NFC chip is applied to an NFC device in a card emulation CE mode, a card reader RW mode or a peer-to-peer P2P mode.
19. The method according to any of claims 1 to 3, wherein the master device comprises a device host DH, a secure chip SE, a Universal Integrated Circuit card UICC, or a subscriber identity Module SIM card.
20. A Near Field Communication (NFC) method is applied to a master device, wherein the master device is connected with an NFC chip, and the method comprises the following steps:
receiving abnormal indication information sent by the NFC chip, wherein the abnormal indication information is used for indicating that the NFC chip is abnormal, the NFC chip enters a standing standby state after the abnormal indication occurs, and the abnormal hardware module in the NFC chip is restarted in the standing standby state;
responding to the abnormal indication information, sending configuration parameters to the NFC chip so that the NFC chip can carry out near field communication according to the configuration parameters after being awakened from the standing standby state;
wherein restarting the hardware module in which the abnormality occurs in the NFC chip in the stand-by state includes:
and resetting the power supply of the abnormal hardware module in the NFC chip so as to enable the abnormal hardware module to enter an initial state.
21. The method according to claim 20, wherein the abnormality indication information carries a reason why the NFC chip has an abnormality.
22. The method according to claim 20 or 21, wherein the sending configuration parameters to the NFC chip comprises:
resetting a protocol stack for near field communication and sending the configuration parameters after resetting the protocol stack, wherein the master device maintains the connection between the application program and the service process of the near field communication in the process of resetting the protocol stack and sending the configuration parameters.
23. The method according to claim 20 or 21, further comprising:
receiving a wake-up notice sent by the NFC chip;
and sending a wakeup message to the NFC chip after a preset time according to the wakeup notification, wherein the wakeup message is used for waking up the NFC chip from the standing standby state.
24. The method of claim 23, wherein the wake-up message comprises at least one of the following messages:
the information of the I2C communication interface of the internal integrated circuit, the information of the SPI communication interface of the serial peripheral interface, the information of the SWP communication interface of the single wire protocol and the information of the GPIO communication interface of the general purpose input and output.
25. The method according to claim 20 or 21, wherein the configuration parameters comprise at least one of the following parameters:
an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and a radio frequency, RF, characteristic parameter of an antenna.
26. The method according to claim 20 or 21, wherein the NFC chip is applied to an NFC device in a card emulation CE mode, a card reader RW mode or a peer-to-peer P2P mode.
27. The method according to claim 20 or 21, wherein the host device comprises a device host DH, a secure chip SE, a universal integrated circuit card UICC, or a subscriber identity module SIM card.
28. An apparatus for Near Field Communication (NFC), wherein the apparatus is applied to an NFC chip, the NFC chip is connected with a master control device, and the apparatus comprises:
the abnormality detection unit is used for determining that the NFC chip is abnormal;
the processing unit is used for controlling the NFC chip to enter a standing standby state and restarting a hardware module with abnormality in the NFC chip in the standing standby state;
the processing unit is further used for setting a wake-up source so that the NFC chip is woken up from the standing standby state after a preset time;
the receiving and sending unit is used for sending abnormal indication information to the main control equipment, and the abnormal indication information is used for indicating that the NFC chip is abnormal;
the transceiver unit is further configured to receive a configuration parameter sent by the master control device in response to the abnormal indication information, so that the NFC chip performs near field communication according to the configuration parameter after being awakened;
wherein the processing unit is specifically configured to:
and resetting the power supply of the abnormal hardware module in the NFC chip so as to enable the abnormal hardware module to enter an initial state.
29. The apparatus as claimed in claim 28, wherein said processing unit is further configured to:
and when the NFC chip is determined to be abnormal, closing the started clock and functions in the NFC chip so as to enable the NFC chip to enter a low power consumption mode.
30. The apparatus according to claim 28 or 29, wherein the processing unit is further configured to:
and when the NFC chip is determined to be abnormal, controlling a hardware module which is not abnormal in the NFC chip to enter an initial state.
31. The apparatus according to claim 28 or 29, wherein the processing unit is further configured to:
before the NFC chip is controlled to enter a standing standby state, clearing configuration parameters used by the NFC chip before abnormity occurs.
32. The apparatus according to claim 28 or 29, wherein the configuration parameters comprise at least one of the following parameters:
an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and a radio frequency, RF, characteristic parameter of an antenna.
33. A master device, wherein the master device is connected to an NFC chip, the master device comprising:
the NFC chip is used for entering a standing standby state after the NFC chip is abnormal, and restarting a hardware module in the NFC chip, wherein the hardware module is abnormal;
and the processing unit is used for responding to the abnormal indication information and sending configuration parameters to the NFC chip so as to enable the NFC chip to carry out near field communication according to the configuration parameters after being awakened from the standing standby state.
34. The master device of claim 33,
the processing unit is further configured to reset a protocol stack for near field communication,
the transceiver unit is specifically configured to send the configuration parameter after resetting the protocol stack;
and the master control equipment keeps the connection between the application program and the service process of the near field communication in the process of resetting the protocol stack and sending the configuration parameters.
35. The master device of claim 33 or 34, wherein the configuration parameters comprise at least one of the following parameters:
an identifier of NFC, a parameter for indicating NFC technology, a parameter for indicating a transmission rate or frame length, and a radio frequency, RF, characteristic parameter of an antenna.
36. A near field communication, NFC, chip characterized in that it comprises means of near field communication according to any of claims 28 to 32.
37. A near field communication, NFC, device comprising a master device according to any of claims 33 to 35 and an NFC chip according to claim 36.
38. The NFC device according to claim 37, wherein the NFC device is a card emulation CE mode, a card reader RW mode or a peer-to-peer P2P mode NFC device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442680.3A CN115665714B (en) | 2022-11-18 | 2022-11-18 | Near field communication method and device, master control equipment, NFC chip and NFC equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211442680.3A CN115665714B (en) | 2022-11-18 | 2022-11-18 | Near field communication method and device, master control equipment, NFC chip and NFC equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115665714A CN115665714A (en) | 2023-01-31 |
CN115665714B true CN115665714B (en) | 2023-04-07 |
Family
ID=85019615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211442680.3A Active CN115665714B (en) | 2022-11-18 | 2022-11-18 | Near field communication method and device, master control equipment, NFC chip and NFC equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115665714B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115884144A (en) * | 2022-11-18 | 2023-03-31 | 深圳市汇顶科技股份有限公司 | Near field communication method and device, NFC chip and NFC equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115442586A (en) * | 2021-06-01 | 2022-12-06 | Oppo广东移动通信有限公司 | Image processing chip and exception handling method applied to image processing chip |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7809992B2 (en) * | 2005-07-27 | 2010-10-05 | Ati Technologies Ulc | Device and method for malfunction monitoring and control |
US8335913B2 (en) * | 2008-09-08 | 2012-12-18 | Dell Products, LLP | Method and system for restoring system configuration after disorderly shutdown |
CN104950775A (en) * | 2015-06-29 | 2015-09-30 | 小米科技有限责任公司 | Circuit, method and device for waking up main MCU (micro control unit) |
WO2018195671A1 (en) * | 2017-04-28 | 2018-11-01 | Klashwerks Inc. | In-vehicle monitoring system and devices |
CN112867107B (en) * | 2019-11-28 | 2022-09-23 | 华为技术有限公司 | Wireless fidelity WIFI chip control method and related equipment thereof |
CN113329379B (en) * | 2020-02-29 | 2023-04-18 | 华为技术有限公司 | Communication method, device and system based on NFC |
-
2022
- 2022-11-18 CN CN202211442680.3A patent/CN115665714B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115442586A (en) * | 2021-06-01 | 2022-12-06 | Oppo广东移动通信有限公司 | Image processing chip and exception handling method applied to image processing chip |
Also Published As
Publication number | Publication date |
---|---|
CN115665714A (en) | 2023-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7364083B2 (en) | IC card with built-in coprocessor for auxiliary arithmetic, and control method thereof | |
US8015428B2 (en) | Processing device and clock control method | |
US10120427B1 (en) | Multi-chip reference counting power management | |
CN102739293B (en) | Management of secure element deadlock | |
JP6279646B2 (en) | Protocol management method for passive RF identification device capable of capturing power from different power sources | |
US9940489B2 (en) | Radiofrequency transponder circuit | |
CN115665714B (en) | Near field communication method and device, master control equipment, NFC chip and NFC equipment | |
US9336418B2 (en) | System and method for polling NFC-A devices alongside RF barcode devices | |
JP5166927B2 (en) | Processing equipment | |
EP1892645B1 (en) | Smart card | |
US20090166419A1 (en) | Systems, methods, and computer program products for mitigating signal noise at a wireless smart device reader | |
CN115956236A (en) | Host device and memory system | |
US10706241B2 (en) | Method for keeping active state of smart card until re-entering field, and smart card | |
CN112559082B (en) | Terminal device, NFC clock control method, NFC module and medium | |
CN106274805B (en) | Automotive electronic key and its method, automobile controller and its method and system | |
CN111445000B (en) | Fingerprint card and processing method based on fingerprint card | |
CN115884144A (en) | Near field communication method and device, NFC chip and NFC equipment | |
JPH11102419A (en) | Reader/writer | |
CN115002660B (en) | UWB communication method, chip and device | |
KR102438148B1 (en) | Abnormality detection apparatus, system and method for detecting abnormality of embedded computing module | |
KR101351703B1 (en) | Terminal device and power control device | |
JP6096497B2 (en) | Communication program, information processing apparatus, communication system, and communication method | |
JP7085918B2 (en) | Information processing equipment and information processing method | |
JP2012033019A (en) | Information processor and rfid tag | |
CN115599616A (en) | Stability test method, system, device and medium for power-on startup strategy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |