Sensing chip with multiplexing pin and pin multiplexing method
By designing a sensing chip with multiplexed pins, using internal units to work together to achieve pin multiplexing, the problems of high system complexity, high development cost and mode switching delay in the prior art are solved, and the pin multiplexing effect of high reliability and fast response is achieved.
Patent Information
- Application Number
- CN202510646325.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-05-20
AI Technical Summary
When realizing chip pin multiplexing, the prior art relies on software configuration registers, resulting in high system complexity, high development costs, and insufficient mode switching delay and reliability.
Design a sensing chip with multiplexed pins, through the coordinated work of the input judgment unit, detection unit, signal generation unit and pin multiplexing unit, and realize pin multiplexing using the internal functions of the sensing chip, without the need to set up registers or establish a communication mechanism.
It reduces the system complexity and cost, improves the mode switching reliability and response speed of multiplexed pins, reduces manual intervention, realizes scenario adaptive control, and has good applicability.
Smart Images

Figure CN120160666A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuit technology, and particularly relates to a sensing chip with multiplexed pins and a pin multiplexing method. Background Art
[0002] As the functions and applications of chips are increasing, the number of pins required for chips is also increasing. To reduce the number of chip pins and the chip package volume, some current chip designs adopt the pin multiplexing technology, that is, the same pin can be used for different functions in different modes. Common pin multiplexing technologies are usually implemented by configuring registers or state machines. For example, when a certain pin is used as a general-purpose input / output (GPIO), its function can be changed by setting bits in the configuration register, such as input mode, output mode, or interrupt mode.
[0003] Although the existing solutions can achieve pin multiplexing and reduce the number of pins to a certain extent, however, the existing solutions usually rely on software to configure registers to switch the functions of pins, with high software configuration complexity. Complex program codes need to be written to set the functions of pins, resulting in high development costs. Moreover, when switching the functions of pins, not only do we need to configure the bits in the register through software programming operations, but also data transmission based on the communication between interfaces is required to achieve the configuration of the bits in the register, increasing the system complexity and possibly introducing certain delays. Summary of the Invention
[0004] The purpose of this application is to provide a sensing chip with multiplexed pins and a pin multiplexing method, which is beneficial to reducing system complexity and cost, and improving the reliability and response speed of mode switching of multiplexed pins.
[0005] In a first aspect, this application provides a sensing chip with multiplexed pins, which is characterized by including: multiplexed pins, an input judgment unit, a detection unit, a signal generation unit, a pin multiplexing unit, a first functional unit, and a second functional unit; the input judgment unit is configured to receive the input signal of the multiplexed pins and output an enabling signal according to whether the input signal meets the triggering condition; the detection unit is configured to detect the target environmental parameter and generate a detection signal corresponding to the target environmental parameter, where the target environmental parameter is the detection object of the sensing chip; the signal generation unit is configured to read the detection signal of the detection unit every preset time and generate a multiplexed signal according to the read detection signal; the pin multiplexing unit is configured to output a control signal according to the multiplexed signal and the enabling signal, and the control signal is used to enable the target functional unit, and the target functional unit is the first functional unit or the second functional unit.
[0006] As can be seen from the above, in the present application, by multiplexing the pins of the sensing chip, the mode switching of the multiplexed pins is realized. For the existing sensing chips with fewer pins, usually less than 8 pins, and even only three pins of power supply, ground and output, without supporting other redundant pins, through the multiplexing of pins, a data pin can implement multiple working modes, which is beneficial to improving the working performance of the sensing chip. Moreover, the pin multiplexing of the sensing chip is realized by using the functions of the sensing chip itself. Specifically, according to the change of the detection signal corresponding to the target environmental parameters detected by the detection unit, a multiplexing signal is generated, and combined with the input signal of the pin, a control signal is output. Compared with the related art where the software operates to configure the bits of the register to realize pin multiplexing, the present application does not require a dedicated register to configure pin multiplexing; and when switching the pin function, compared with the related art where the software configures the bits of the register to change the pin function and needs to transmit signals based on the communication function between interfaces to configure the register, the present application realizes pin multiplexing through the functional cooperation between the internal units of the sensing chip, without the need to establish a communication mechanism based on a communication protocol, which is beneficial to reducing the system complexity, reducing the operation complexity during the pin function switching process, and reducing the response delay.
[0007] Moreover, in the present application, the mode switching of the multiplexed pins is determined by the signal detected by the sensing chip, which is beneficial to reducing manual intervention during the pin multiplexing process and improving the reliability of the mode switching of the multiplexed pins.
[0008] In addition, the multiplexing of the pin functions in the present application combines the target environmental parameters (such as magnetic field, temperature, pressure) collected by the sensing chip to realize scene adaptive control, can be flexibly applied based on different sensing chips, and the pin multiplexing scheme can also have good applicability.
[0009] In summary, the solution of the present application is beneficial to reducing the system complexity and cost on the basis of realizing pin multiplexing, improving the reliability and response speed of the mode switching of the multiplexed pins, and the pin multiplexing scheme can also have good applicability.
[0010] In one implementable manner, the signal generation unit is specifically configured to determine the difference of the detection signals within a specified time interval, and generate a multiplexing signal according to whether the difference of the detection signals within the specified time interval is greater than or equal to a preset threshold.
[0011] In one implementable manner, the multiplexing signal includes a first signal and a second signal; the control signal includes a first control signal and a second control signal, wherein the first control signal is used to enable the first functional unit, and the second control signal is used to enable the second functional unit; the pin multiplexing unit is specifically configured to output the first control signal when the enabling signal is a preset signal and the multiplexing signal is the first signal, and output the second control signal when the enabling signal is a preset signal and the multiplexing signal is the second signal.
[0012] In one implementable manner, the multiplexing pin is connected to an external triggering device; when the triggering device is triggered, a preset level is output to the multiplexing pin; the input determination unit is specifically configured to determine whether the input signal is the preset level, and if the input signal is the preset level, an enabling signal is output.
[0013] In one implementable manner, the sensing chip is a magnetic angle sensing chip; the target environmental parameter is a magnetic field angle; the detection unit is specifically configured to detect the magnetic field angle and generate a detection signal corresponding to the detected magnetic field angle.
[0014] In one implementable manner, the first functional unit is used to enable linear calibration or non-linear calibration; the second functional unit is used to set the zero angle value.
[0015] In one implementable manner, both the enabling signal and the multiplexing signal are digital signals; the multiplexing signal includes a first signal and a second signal; the signal generation unit is specifically configured to read the detection signal of the detection unit at every preset time, determine the difference between the detection signals within a specified time interval, generate the first signal when the difference between the detection signals within the specified time interval is greater than or equal to a preset threshold, and generate the second signal when the difference between the detection signals within the specified time interval is less than the preset threshold; the pin multiplexing unit at least includes a logic gate circuit, the logic gate circuit has an enabling terminal, and the pin multiplexing unit is specifically configured to input the enabling signal and the multiplexing signal into the logic gate circuit and input the enabling signal to the enabling terminal of the logic gate circuit; when the enabling signal is a preset signal, the logic gate circuit is enabled to work, and when the multiplexing signal is the first signal, a first control signal is output, and when the multiplexing signal is the second signal, a second control signal is output, the first control signal is used to enable the first functional unit, and the second control signal is used to enable the second functional unit.
[0016] As can be seen from the above, the present application uses a digital signal processing circuit module in the sensing chip to implement the multiplexing of the multiplexing pin. The digital signal processing circuit has a relatively fast response speed and a relatively simple processing logic, which is beneficial to further simplifying the system complexity of the sensing chip and improving the response speed of the mode switching of the multiplexing pin.
[0017] In a second aspect, the present application provides a pin multiplexing method applied to a sensing chip with multiplexing pins. The method includes: receiving an input signal input by the multiplexing pin and outputting an enabling signal according to whether the input signal meets a triggering condition; detecting a target environmental parameter and generating a detection signal corresponding to the detected target environmental parameter, where the target environmental parameter is the detection object of the sensing chip; reading the detection signal at every preset time and generating a multiplexing signal according to the read detection signal; outputting a control signal according to the multiplexing signal and the enabling signal, and the control signal is used to enable the sensing chip to execute a target function, and the target function is a first function or a second function.
[0018] In one implementable manner, a multiplexing signal is generated according to the read detection signal, which specifically includes: determining the difference of the detection signals within a specified time interval, and generating a multiplexing signal according to whether the difference of the detection signals within the specified time interval is greater than or equal to a preset threshold.
[0019] In one implementable manner, the multiplexing signal includes a first signal and a second signal, and a control signal is output according to the multiplexing signal and an enable signal, which specifically includes: outputting a first control signal when the enable signal is a preset signal and the multiplexing signal is the first signal; outputting a second control signal when the enable signal is a preset signal and the multiplexing signal is the second signal; the first control signal is used to enable the sensing chip to execute a first function, and the second control signal is used to enable the sensing chip to execute a second function.
[0020] In one implementable manner, the sensing chip is a magnetic angle sensing chip; the target environmental parameter is a magnetic field angle.
[0021] In one implementable manner, the first function is to enable linear calibration or non-linear calibration; the second function is to set a zero angle value; In one implementable manner, the multiplexing signal includes a first signal and a second signal; generating a multiplexing signal according to the read detection signal specifically includes: reading the detection signal of the detection unit at every preset time, determining the difference of the detection signals within a specified time interval, generating the first signal when the difference of the detection signals within the specified time interval is greater than or equal to a preset threshold, and generating the second signal when the difference of the detection signals within the specified time interval is less than the preset threshold; outputting a control signal according to the multiplexing signal and the enable signal specifically includes: processing the multiplexing signal and the enable signal by using a digital signal processing circuit, wherein when the enable signal is a preset signal, enabling the digital signal processing circuit to work, and when the multiplexing signal is the first signal, enabling the digital signal processing circuit to output a first control signal, and when the multiplexing signal is the second signal, enabling the digital signal processing circuit to output a second control signal, the first control signal is used to enable the sensing chip to execute a first function, and the second control signal is used to enable the sensing chip to execute a second function. Description of the Drawings
[0022] Figure 1 is a schematic structural diagram of a sensing chip with multiplexed pins provided by an embodiment of the present application; Figure 2 is a flowchart of a pin multiplexing method provided by an embodiment of the present application. Detailed Embodiments
[0023] With the development of chip functions, the number of pins required for the chip is also increasing. To reduce the chip package volume, the number of pins that can be set on the chip is correspondingly reduced. Especially in sensor chips, the number of pins is relatively small, usually only 3 - 8 pins. For example, some sensors only have three pins for power supply, ground, and output, and do not support other redundant pins. At this time, it is necessary to multiplex the pins of the chip to ensure the chip functions.
[0024] Taking the magnetic angle sensing chip designed with 8 pins as an example, the magnetic angle sensing chip generally can choose the serial peripheral interface output mode (hereinafter referred to as the SPI mode) or the incremental encoder output format (hereinafter referred to as the ABZ mode). In the magnetic angle sensing chip, 3 pins can be designed for ABZ mode output or SPI mode output, and 1 pin is designed for switching between ABZ mode and SPI mode output. In addition, the power interface and the ground wire interface also need to occupy 2 pins. The remaining 2 pins of the magnetic angle sensing chip can be configured for other functions. However, the technical personnel of this application found that during the actual mass production test of the manufacturer, due to using the SPI mode for communication calibration, it will lead to an increase in the mass production test cost. What the manufacturer needs during the mass production test is to complete the calibration with the button and display calibration. Therefore, many manufacturers will not use SPI communication during the mass production test. It can be seen that the pin design of the sensing chip needs to take into account the mass production test requirements and the package size of the magnetic angle sensing chip. To take into account the mass production test requirements and reduce the development and test cost of the sensing chip, these 2 pins need to complete three functions in the mass production test scenario: 1. Enable linear calibration or non - linear calibration; 2. Set the current angle value as the zero - point angle value; 3. Display the calibration completion or calibration failure signal. Among them, function 3 "display the calibration completion or calibration failure signal" is the output signal of the chip. It is preferably to allocate 1 pin to implement this function. In this way, 1 pin needs to be multiplexed to implement function 1 "enable linear calibration or non - linear calibration" and function 2 "set the current angle value as the zero - point angle value".
[0025] In the related art, pin multiplexing is usually achieved by configuring registers or state machines. For example, one or more registers dedicated to switching pin functions are configured in the chip, and the bits of the registers are configured through software (writing programs / codes) to switch the functions of each multiplexed pin. However, the software configuration has a high complexity. It is necessary to write complex program codes to set the functions of the pins, and the development cost is relatively high. Moreover, when switching the pin functions, not only does it need to configure the bits in the register through software programming operations, but also data transmission based on the communication between interfaces is required to achieve the configuration of the bits in the register, which increases the complexity of the system and may have a certain delay.
[0026] To address issues such as the high complexity of systems with pin multiplexing and the slow response speed of mode switching for multiplexed pins in related technologies, the embodiments of this application provide a sensing chip with multiplexed pins. The embodiments of this application will be described below with reference to the accompanying drawings. As is known to those of ordinary skill in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0027] First, refer to Figure 1 , the embodiments of this application provide a sensing chip with multiplexed pins. The sensing chip includes a multiplexed pin 11, an input judgment unit 12, a detection unit 13, a signal generation unit 14, a pin multiplexing unit 15, a first functional unit 161, and a second functional unit 162. Each unit in the sensing chip will be specifically described below.
[0028] In the embodiments of this application, the input judgment unit 12 is connected to the multiplexed pin 11, and is used to receive the input signal of the multiplexed pin 11, judge whether the input signal meets the trigger condition, and output an enable signal according to whether the input signal meets the trigger condition.
[0029] In the embodiments of this application, the multiplexed pin 11 is connected to an external trigger device 2. When the trigger device 2 is triggered, a specified signal is output to the multiplexed pin 11. By judging the input signal of the multiplexed pin 11 and the trigger condition, it is determined whether the trigger device 2 is triggered and whether the input is valid. Among them, the trigger device 2 can be a device such as a button or a switch that does not require communication interaction based on a communication protocol. Different trigger devices correspond to different input signals.
[0030] For example, when the trigger device is a button, the input signal of the multiplexed pin is a level signal. When the button is pressed, the level input to the multiplexed pin changes. For example, when the button is pressed, the level of the input multiplexed pin changes from high level to low level. At this time, it can be determined whether the input signal is valid by judging whether the input signal of the multiplexed pin corresponds to the level change from high to low. For example, it can be determined whether the input signal is valid by detecting whether there is a falling edge in the input signal. It can be understood that the trigger condition can be detecting the falling edge of the input signal. Another example is to determine whether the input signal is valid by detecting whether the input signal is at a low level. It can be understood that the trigger condition can be that the input signal is at a low level. Another example is when the multiplexed pin uses a digital IO pin, to determine whether the input signal is valid by detecting whether the input signal is a digital signal 0. It can be understood that the trigger condition can be that the input signal is a digital signal 0.
[0031] In the embodiment of the present application, the input judgment unit 12 is preferably implemented by a digital processing circuit. At this time, the input signal needs to be processed into a digital signal. For example, the multiplexing pin can use a digital IO pin. After the triggering device is triggered, the multiplexing pin reads the state of the triggering device, and judges the logic value by detecting whether the voltage (specified signal) is higher / lower than the threshold. The input signal of the multiplexing pin will be a digital signal of 0 or 1. Another example is that when the multiplexing pin is an analog IO pin and the input signal is an analog signal, the input signal can be converted from an analog signal to a digital signal through a comparison circuit. Adopting the digital signal processing method is beneficial to eliminating noise and distortion in analog signal processing, improving the reliability of the sensing chip, and the circuit design method is implemented, which is beneficial to simplifying the system operation of the sensing chip, reducing the system complexity, beneficial to reducing the delay of software operation, and beneficial to improving the response speed of the sensing chip.
[0032] It should be noted that the above is only an example for illustration and does not limit the protection scope of the present application. Of course, the triggering component can also be other components, which will not be listed one by one here.
[0033] In the embodiment of the present application, the detection unit 13 is used to detect the target environmental parameter and generate a detection signal corresponding to the target environmental parameter, where the target environmental parameter is the detection object of the sensing chip. It can be understood that the sensing chip is used to convert non-electrical quantities such as physical quantities, chemical quantities, and biological quantities in the environment into electrical signals. Each different sensing chip has its corresponding detection object. Specifically, for example, if the sensing chip is a magnetic angle sensing chip, the magnetic angle sensing chip is used to detect the magnetic field angle. It can be understood that the target environmental parameter is the magnetic field angle; another example is that if the sensing chip is a temperature sensing chip, the temperature sensing chip is used to detect the temperature, then the target environmental parameter is the temperature; and another example is that if the sensing chip is an optical encoder, the target environmental parameter can be the luminous flux.
[0034] Specifically, the detection unit 13 may include an induction module, an analog-to-digital conversion module, and a signal processing module. The induction module in the detection unit 13 generates a change in current or voltage corresponding to the detected target environmental parameter. The analog-to-digital conversion module converts the current / voltage into a digital quantity, and the signal processing module calculates the corresponding detection signal from the digital quantity through digital processing. Among them, taking the sensing chip as a magnetic angle sensing chip as an example, the induction module is a Hall disk; taking the sensing chip as an optical encoder as an example, the induction module is composed of an optical code disk and a photosensitive element.
[0035] In the embodiment of the present application, the signal generation unit 14 is connected to the detection unit 13. The signal generation unit 14 is configured to read the detection signal of the detection unit at every preset time interval, and generate a multiplexed signal based on the read detection unit. Specifically, the signal generation unit 14 may generate a multiplexed signal based on the change of the detection signal within a specified time interval. For example, the signal generation unit 14 may generate a multiplexed signal according to whether the difference between the detection signals read within a specified time interval is greater than or equal to a preset threshold. For another example, the signal generation unit 14 may generate a multiplexed signal based on the change rate of the detection signals read within a specified time interval. The signal generation unit 14 may also generate a multiplexed signal based on whether the deviation between the detection signal read at every preset time and the initial signal is greater than a first value. It should be noted that this is only for illustrative purposes and does not limit the protection scope of the present application.
[0036] Among them, the specified time interval may be different from the preset time or the same as the preset time. The preset time and the specified time interval can be set according to actual requirements, and the preset threshold can also be set according to specific requirements. Of course, the shorter the preset time, the faster the sampling frequency, and the more timely the monitoring of the change of the detection signal. Combining with a suitable specified time interval can save the computing resources of the sensing chip. If the sampling frequency is too low, it may occur that the change amount of the detection signal is very small, but the object for generating the target environmental parameter has changed greatly. For example, for a magnetic angle sensing chip to detect the rotation angle of a magnet, when the preset time is 1 second, the magnet may rotate at a high speed and rotate many circles, but the sampled angle change is very small.
[0037] When the sensing chip is a magnetic angle sensing chip, for example, the signal generation unit reads the detection signal of the detection unit every 1 microsecond (an example of the preset time), and generates a multiplexed signal according to whether the difference between the detection signals within 1 second (an example of the specified time interval) is greater than 5° (an example of the preset threshold). For another example, the signal generation unit reads the detection signal every 1 microsecond, and determines whether the difference between the detection signals within 1.5 seconds is greater than or equal to 7° to generate a multiplexed signal. For still another example, the signal generation unit reads the detection signal of the detection unit every 1 microsecond, and generates a multiplexed signal according to whether the change rate of the detection signals within 1 millisecond is greater than or equal to 0.5° / millisecond.
[0038] In the embodiment of the present application, the signal generation unit 14 generates a multiplexed signal according to the read detection signal. Among them, the signal generation unit 14 can be implemented by a digital signal processing circuit, and the multiplexed signal output after being processed by the signal generation unit 14 is a digital signal; the signal generation unit 14 can also be implemented by software instructions. At this time, the output multiplexed signal is an instruction signal. It can be understood that a microcontroller unit (MCU) is configured in the sensing chip, and the signal generation unit is implemented through the MCU. Of course, in the embodiment of the present application, the signal generation unit of the sensing chip preferably adopts a digital circuit processing method, and the transmission between units preferably uses digital signals for transmission. This is beneficial to reducing the operation cost of the system for complex data, simplifying the system complexity, further improving the response speed of the sensing chip, and improving the noise resistance ability and reliability.
[0039] In the embodiment of the present application, the input terminals of the pin multiplexing unit 15 are respectively connected to the output terminals of the input determination unit 12 and the signal generation unit 14, and the output terminals of the pin multiplexing unit 15 are respectively connected to the first functional unit 161 and the second functional unit 162. The pin multiplexing unit 15 is used to output a control signal according to the multiplexed signal and the enable signal, and the control signal is used to enable the target functional unit, and the target functional unit is the first functional unit 161 or the second functional unit 162. It can be understood that the pin multiplexing unit 15 combines the enable signal and the multiplexed signal to switch the function of the multiplexed pin 11. If the current multiplexed pin 11 operates in the first functional mode (that is, the input state of the multiplexed pin is used to enable the sensing chip to implement the first function), when the control signal output after being processed by the pin multiplexing unit 15 is to enable the second functional unit 162, the multiplexed pin 11 operates in the second functional mode; when the control signal output after being processed by the pin multiplexing unit 15 is to enable the first functional unit 161, the multiplexed pin 11 still operates in the first functional mode.
[0040] In the embodiment of the present application, the multiplexed signal includes a first signal and a second signal; the control signal includes a first control signal and a second control signal. Among them, the first control signal is used to enable the first functional unit 161, and the second control signal is used to enable the second functional unit 162; the pin multiplexing unit 15 is specifically used to output the first control signal when the enable signal is a preset signal and the multiplexed signal is the first signal; output the second control signal when the enable signal is a preset signal and the multiplexed signal is the second signal.
[0041] Specifically, in the embodiment of the present application, the pin multiplexing unit 15 receives an enable signal, and when the enable signal is a preset signal, the pin multiplexing unit 15 is enabled to work. Among them, the pin multiplexing unit can be implemented by configuring an MCU in the sensing chip. It can be understood that the pin multiplexing unit 15 determines whether the enable signal is valid through software instruction operation. For example, when the enable signal is an instruction signal, the pin multiplexing unit 15 is used to determine whether the enable signal is a preset instruction (at this time, the preset signal is a preset instruction). If the enable signal is a preset instruction, the enable signal is valid, and the pin multiplexing unit 15 is enabled to work. The pin multiplexing unit can also determine whether the enable signal is valid through a hardware circuit (such as a digital signal processing circuit) processing method. For example, the enable signal is input to the enable terminal of the circuit in the pin multiplexing unit 15. The pin multiplexing unit can be enabled to work when the enable signal is a digital signal 0, then the preset signal is a digital signal 0, or it can be enabled to work when the enable signal is a digital signal 1, then the preset signal is a digital signal 1. In the embodiment of the present application, the preset signal can be set according to the type of the enable signal and the enable logic of the pin multiplexing unit.
[0042] When the enable signal is valid (i.e., the enable signal is a preset signal), the pin multiplexing unit 15 can output a control signal only according to the multiplexing signal, or can output a control signal according to the enable signal and the multiplexing signal.
[0043] Specifically, in the embodiment of the present application, the control signal can be an instruction signal or a digital signal. For example, when the control signal is a digital signal, the digital signal is sent to the enable terminal corresponding to the target functional unit to enable the target functional unit; the control signal can also be an instruction signal, and the target functional unit is triggered to work through the instruction. For example, when the control signal is a digital signal, the pin multiplexing unit can be respectively connected to the enable terminals of the first functional unit and the second functional unit. The first functional unit is enabled when the digital signal 0 is received at the enable terminal, and the second functional unit is enabled when the digital signal 1 is received at the enable terminal. At this time, the first control signal is the digital signal 0, and the second control signal is the digital signal 1; in this way, different functional units can be enabled according to the output control signal.
[0044] As can be seen from the above, the embodiment of the present application utilizes the functions of the sensing chip itself to achieve pin multiplexing of the sensing chip. Specifically, the multiplexing signal is generated according to the change of the detection signal corresponding to the target environmental parameter detected by the detection unit. Compared with the related art in which the bits of the software operation configuration register are used to achieve pin multiplexing, the embodiment of the present application does not require a dedicated register to configure pin multiplexing; and when switching the pin function, compared with the related art in which the bits of the software configuration register are used to change the pin function and the signal transmitted based on the communication function between interfaces is used to configure the register, the present application realizes pin multiplexing through the functional cooperation between the internal units of the sensing chip, without establishing a communication mechanism, which is beneficial to reducing the system complexity, reducing the operation complexity in the process of pin function switching, and reducing the response delay.
[0045] Moreover, in the present application, the multiplexing signal is directly generated according to the change of the detection signal corresponding to the target environmental parameter detected by the sensing chip. The mode switching of the multiplexing pin is determined by the signal detected by the sensing chip, which is beneficial to reducing manual intervention in the process of pin multiplexing and improving the reliability of the mode switching of the multiplexing pin. In addition, the multiplexing of the pin function in the present application combines the target environmental parameters (such as magnetic field, temperature, pressure) collected by the sensing chip to achieve scene adaptive control, and can be flexibly applied based on different sensing chips, and the pin multiplexing scheme can also have good applicability.
[0046] Next, taking the aforementioned sensing chip as a magnetic angle sensing chip as an example, the multiplexing pins of the magnetic angle sensing chip are multiplexed through digital circuit processing to enable the multiplexing pins to work in the "enable linear calibration or non-linear calibration" mode (the first function mode) and the "set zero angle value" mode (the second function mode) respectively, and an example description of the multiplexing scheme of the multiplexing pins in the embodiment of the present application is given.
[0047] The multiplexing pins of the magnetic angle sensing chip are digital IOs, and the multiplexing pins are connected to an external button (trigger device). When the button is pressed / triggered, a low level (input signal) is sent to the multiplexing pins. At this time, the multiplexing pins will transmit a digital signal 0 (input signal) to the input judgment unit. When the button is not pressed / triggered, the multiplexing pins will receive a high level, and at this time, the multiplexing pins will input an input signal of 1 to the input judgment unit.
[0048] The input judgment unit will receive the input signal input from the multiplexing pins. The input judgment unit receives the input signal of the multiplexing pins, and processes the input signal and the digital signal 0 (trigger condition) through a logic gate circuit (such as an OR gate) and other circuits to output an enable signal; among them, if the input signal is a digital signal 0, the input judgment unit correspondingly outputs a digital signal 0 (enable signal), and if the input signal is a digital signal 1, the input judgment unit correspondingly outputs a digital signal 1.
[0049] The detection unit of the magnetic angle sensing chip detects the magnetic field angle (target environmental parameter). After detecting a change in the magnetic field angle, there will be a corresponding change in current / voltage. The detection unit will convert the current / voltage into an angle value (detection signal) and then transmit the angle value to the signal generation unit. Specifically, the detection unit will convert the current / voltage into a digital quantity through ADC analog-to-digital conversion, calculate the angle value using digital processing methods, and then transmit the angle value to the signal generation unit.
[0050] The signal generation unit reads the angle value of the detection unit every 1 microsecond (preset time), and determines the difference in the angle value read within 1 second. When the difference in the angle value within 1 second is greater than or equal to 5° (preset threshold), a digital signal 0 (first signal) is generated. When the difference in the angle value within 1 second is less than 5°, a digital signal 1 (second signal) is generated.
[0051] The pin multiplexing unit includes at least a logic gate circuit (such as an OR gate). The logic gate circuit has an enable terminal. The enable signal and the multiplexing signal are input into the logic gate circuit, and the enable signal is input into the enable terminal of the logic gate circuit. When the enable signal is a digital signal 0 (preset signal), the logic gate circuit enables operation. The logic gate circuit performs logical processing on the enable signal and the multiplexing signal. When the multiplexing signal is a digital signal 0 (first signal), a digital signal 0 (first control signal) is output. When the multiplexing signal is a digital signal 1 (second signal), a digital signal 1 (second control signal) is output. The first control signal is used to enable the "enable linear calibration or non-linear calibration" functional unit (first functional unit), and the second control signal is used to enable the "set zero angle value" functional unit (second functional unit).
[0052] It should be noted that the circuits and specific examples involved in this example description are one implementation manner of the embodiments of the present application, and do not limit the solution of the present application. Specifically, it can be designed according to actual needs, and all are within the protection scope of the present application.
[0053] Another embodiment of the present application also provides a pin multiplexing method, which is applied to a sensing chip with multiplexed pins. The pin multiplexing method includes: Step S200: Receive the input signal input by the multiplexed pin, and output an enable signal according to whether the input signal meets the trigger condition; Step S201: Detect the target environmental parameter, and generate a detection signal according to the detected target environmental parameter, where the target environmental parameter is the detection object of the sensing chip; Step S202: Read the detection signal every preset time, and generate a multiplexing signal according to the read detection signal; Step S203: Output a control signal according to the multiplexed signal and the enable signal. The control signal is used to enable the sensing chip to execute a target function, where the target function is the first function or the second function.
[0054] In the embodiment of the present application, generating the multiplexed signal according to the detected signal read in step S202 may specifically include: determining the difference between the detected signals within a specified time interval, and generating the multiplexed signal according to whether the difference between the detected signals within the specified time interval is greater than or equal to a preset threshold.
[0055] In the embodiment of the present application, the multiplexed signal includes a first signal and a second signal. Outputting the control signal according to the multiplexed signal and the enable signal may specifically include: outputting a first control signal when the enable signal is a preset signal and the multiplexed signal is the first signal; outputting a second control signal when the enable signal is a preset signal and the multiplexed signal is the second signal; the first control signal is used to enable the sensing chip to execute the first function, and the second control signal is used to enable the sensing chip to execute the second function.
[0056] In the embodiment of the present application, the sensing chip may be a magnetic angle sensing chip, and the target environmental parameter is the magnetic field angle; detecting the target environmental parameter and generating the detected signal according to the detected target environmental parameter specifically includes: detecting the magnetic field angle and generating the detected signal according to the detected magnetic field angle.
[0057] In the embodiment of the present application, the first function may be to enable linear calibration or non-linear calibration; the second function may be to set the zero angle value.
[0058] The multiplexed signal includes a first signal and a second signal; generating the multiplexed signal according to the detected signal read may specifically include: reading the detected signal of the detection unit at preset time intervals, determining the difference between the detected signals within a specified time interval, generating the first signal when the difference between the detected signals within the specified time interval is greater than or equal to the preset threshold, and generating the second signal when the difference between the detected signals within the specified time interval is less than the preset threshold; outputting the control signal according to the multiplexed signal and the enable signal specifically includes: processing the multiplexed signal and the enable signal by a digital signal processing circuit. Wherein, when the enable signal is a preset signal, the digital signal processing circuit is enabled to work, and when the multiplexed signal is the first signal, the digital signal processing circuit outputs the first control signal, and when the multiplexed signal is the second signal, the digital signal processing circuit outputs the second control signal. The first control signal is used to enable the sensing chip to execute the first function, and the second control signal is used to enable the sensing chip to execute the second function.
[0059] In the embodiment of the present application, the pin multiplexing method corresponds to the implementation process of each unit function in the sensing chip with multiplexed pins in the foregoing embodiments of the present application. For the parameters and related detailed solutions involved in the embodiment of the present application, reference may be made to the specific descriptions in the foregoing embodiments of the present application, which will not be elaborated herein.
[0060] As can be seen from the above, the embodiments of the present application utilize the functions of the sensing chip itself to achieve pin multiplexing of the sensing chip. Specifically, by the change situation of the detection signal corresponding to the target environmental parameters detected by the sensing chip, a multiplexing signal is generated, and a control signal is output in combination with the input signal of the multiplexing pin. Compared with the prior art where the software operates to configure the bits of the register to achieve pin multiplexing, the present application does not require a dedicated register to configure pin multiplexing; moreover, when switching the pin function, compared with the prior art where the software configures the bits of the register to change the pin function and the signals transmitted based on the communication function between interfaces are used to configure the register, the embodiments of the present application do not require external communication to configure during the mode switching of the multiplexing pin, which is beneficial to reducing the system complexity, reducing the operation complexity during the pin function switching process, and reducing the response delay.
[0061] Furthermore, in the embodiments of the present application, the mode switching of the multiplexing pin is determined by the signals detected inside the sensing chip, which is beneficial to reducing manual intervention during the pin multiplexing process and improving the reliability of the mode switching of the multiplexing pin. In addition, the multiplexing of the pin functions in the embodiments of the present application combines the target environmental parameters (such as magnetic field, temperature, pressure) collected by the sensing chip to achieve scene adaptive control, can be flexibly applied based on different sensing chips, and the pin multiplexing scheme can also have good applicability.
[0062] Finally, it should be emphasized that the above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A sensor chip with multiplexed pins, characterized in that: include: A multiplexing pin, an input judgment unit, a detection unit, a signal generating unit, a pin multiplexing unit, a first functional unit, and a second functional unit; The input judgment unit is used to receive the input signal of the multiplexed pin, and output an enable signal according to whether the input signal meets the trigger condition; The detection unit is used to detect a target environmental parameter and generate a detection signal according to the target environmental parameter, wherein the target environmental parameter is a detection object of the sensor chip; The signal generating unit is used for reading the detection signal of the detection unit at a preset time interval, and generating a multiplexed signal according to the read detection signal; The pin multiplexing unit is used to output a control signal according to the multiplexing signal and the enable signal, and the control signal is used to enable a target functional unit, and the target functional unit is the first functional unit or the second functional unit.
2. The sensor chip with multiplexed pins according to claim 1, characterized in that: The signal generating unit is specifically used to determine the difference of the detection signal within a specified time interval, and generate a multiplexed signal according to whether the difference of the detection signal within the specified time interval is greater than or equal to a preset threshold.
3. The sensor chip with multiplexed pins according to claim 1, characterized in that: The multiplexed signal includes a first signal and a second signal; The control signal includes a first control signal and a second control signal, wherein the first control signal is used to enable the first functional unit, and the second control signal is used to enable the second functional unit; The pin multiplexing unit is specifically configured to output the first control signal when the enable signal is a preset signal and the multiplexing signal is a first signal, and to output the second control signal when the enable signal is a preset signal and the multiplexing signal is a second signal.
4. The sensor chip with multiplexed pins according to any one of claims 1 to 3, characterized in that: The multiplexed pin is connected to an external trigger device; When the trigger device is triggered, a preset level is output to the multiplexed pin; The input determination unit is specifically configured to determine whether the input signal is at the preset level, and output an enable signal if the input signal is at the preset level.
5. The sensor chip with multiplexed pins according to any one of claims 1 to 3, characterized in that: The sensor chip is a magnetic angle sensor chip; the target environmental parameter is a magnetic field angle; The detection unit is specifically used to detect the magnetic field angle, and generate a detection signal according to the detected magnetic field angle; The first functional unit is used to start linear calibration or nonlinear calibration; The second functional unit is used to set a zero point angle value.
6. The sensor chip with multiplexed pins according to claim 5, characterized in that: The enable signal and the multiplexed signal are both digital signals; The multiplexed signal includes a first signal and a second signal; the signal generating unit is specifically used to read the detection signal of the detection unit at preset time intervals, determine the difference of the detection signals within a specified time interval, generate a first signal when the difference of the detection signals within the specified time interval is greater than or equal to a preset threshold, and generate a second signal when the difference of the detection signals within the specified time interval is less than the preset threshold; The pin multiplexing unit at least includes a logic gate circuit, and the logic gate circuit has an enable end. The pin multiplexing unit is specifically used to input the enable signal and the multiplexing signal into the logic gate circuit, and input the enable signal to the enable end of the logic gate circuit; when the enable signal is a preset signal, the logic gate circuit is enabled to work, and when the multiplexing signal is a first signal, the logic gate circuit outputs a first control signal, and when the multiplexing signal is a second signal, the logic gate circuit outputs a second control signal, the first control signal is used to enable the first functional unit, and the second control signal is used to enable the second functional unit.
7. A pin multiplexing method, applied to a sensor chip with multiplexed pins, characterized in that: The method comprises: receiving an input signal inputted by the multiplexed pin, and outputting an enable signal according to whether the input signal meets a trigger condition; Detecting a target environmental parameter, and generating a detection signal according to the detected target environmental parameter, wherein the target environmental parameter is a detection object of the sensor chip; Reading the detection signal at preset intervals, and generating a multiplexed signal according to the read detection signal; A control signal is output according to the multiplexing signal and the enable signal, wherein the control signal is used to enable the sensor chip to execute a target function, where the target function is the first function or the second function.
8. The pin multiplexing method according to claim 7, characterized in that: Generating a multiplexed signal according to the read detection signal specifically includes: The difference of the detection signal within a specified time interval is determined, and a multiplexed signal is generated according to whether the difference of the detection signal within the specified time interval is greater than or equal to a preset threshold.
9. The pin multiplexing method according to claim 7, characterized in that: The multiplexed signal includes a first signal and a second signal, and outputting a control signal according to the multiplexed signal and the enable signal specifically includes: outputting a first control signal when the enable signal is a preset signal and the multiplexed signal is a first signal; outputting a second control signal when the enable signal is a preset signal and the multiplexed signal is a second signal; The first control signal is used to enable the sensor chip to perform a first function, and the second control signal is used to enable the sensor chip to perform a second function.
10. The pin multiplexing method according to any one of claims 7 to 9, characterized in that: The sensor chip is a magnetic angle sensor chip; the target environmental parameter is a magnetic field angle; The first function is to start linear calibration or nonlinear calibration; The second function is to set the zero angle value; The multiplexed signal includes a first signal and a second signal; the generating of the multiplexed signal according to the read detection signal specifically includes: determining a difference of the detection signals within a specified time interval, generating a first signal when the difference of the detection signals within the specified time interval is greater than or equal to a preset threshold, and generating a second signal when the difference of the detection signals within the specified time interval is less than a preset threshold; The outputting of the control signal according to the multiplexing signal and the enable signal specifically includes: using a digital signal processing circuit to process the multiplexing signal and the enable signal, wherein when the enable signal is a preset signal, the digital signal processing circuit is enabled to work, and when the multiplexing signal is a first signal, the digital signal processing circuit is enabled to output a first control signal, and when the multiplexing signal is a second signal, the digital signal processing circuit is enabled to output a second control signal, the first control signal is used to enable the sensor chip to perform a first function, and the second control signal is used to enable the sensor chip to perform a second function.
Citation Information
Patent Citations
Multi-parameter sensing system integrated chip
CN103528620A
Device and method for protecting sensitive information of chip system
CN104850805A
Detection device and method for pin multiplexing function, electronic equipment and storage medium
CN116302759A
Double-usage of integrated circuit tube pin and signal switch over on the pin
CN1414632A
Digital signal interface circuit, chip and electronic equipment
CN210986071U