Trigger signal sending method, device, equipment and system

By storing SPC configuration data in the data buffer area of ​​the MCU and sending SPC trigger signals to the sensor based on these data, the problem of low processing efficiency in SPC communication in the prior art is solved, and more efficient data transmission is achieved.

CN119829487APending Publication Date: 2025-04-15JINAN BYD SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411046216.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The trigger mode of the existing sensors results in low processing efficiency during SPC communication, and it is impossible to effectively process subsequent trigger requests.

Method used

By setting a data buffer in the MCU, SPC configuration data is stored, including the send configuration parameters requested by the trigger request, and sending an SPC trigger signal to the sensor based on these configuration data.

Benefits of technology

This improves the processing efficiency of the MCU during SPC communication, avoids ignoring the trigger request, and ensures the integrity of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829487A_ABST
    Figure CN119829487A_ABST
Patent Text Reader

Abstract

The invention discloses a trigger signal sending method, device, equipment and system, relates to the technical field of data processing, and aims to solve the problem of low processing efficiency of a trigger request in a short pulse width modulation code communication process. The method comprises: in response to a trigger request, storing short pulse width modulation code configuration data to a data cache region, the short pulse width modulation code configuration data comprising a sending configuration parameter of a short pulse width modulation code trigger signal requested by the trigger request, and sending the short pulse width modulation code trigger signal to the data cache region based on the short pulse width modulation code configuration data in the data cache region, and sending a short pulse width modulation code trigger signal to the sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a trigger signal sending method, device, equipment and system. Background Art

[0002] At present, sensors supporting short pulse width modulation code (SPC) can feedback the current sensor data by receiving the trigger pulse sent by the microcontroller unit (MCU). However, in the existing sensor trigger mode, in order to ensure the integrity of the transmitted data, after the MCU generates a trigger pulse according to the received trigger request, the MCU cannot process the received trigger request again during the process of sending the trigger pulse.

[0003] Therefore, the existing sensor trigger mode may ignore the trigger request, resulting in low processing efficiency of the trigger request during the SPC communication process. Summary of the invention

[0004] The purpose of the present application is to provide a trigger signal sending method, device, equipment and system, aiming to solve the problem of low processing efficiency of trigger requests during SPC communication.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] The present application provides a trigger signal sending method, the method comprising: in response to a trigger request, storing SPC configuration data in a data buffer area, the SPC configuration data comprising a sending configuration parameter of the SPC trigger signal requested by the trigger request, and sending the SPC trigger signal to a sensor based on the SPC configuration data in the data buffer area.

[0007] The trigger request may be a received external request or an internally generated request, the data buffer may store a plurality of SPC configuration data, the SPC trigger signal is used to indicate sensor feedback data, and the SPC trigger signal may be a pulse signal.

[0008] The trigger signal sending method provided in the embodiment of the present application sets a data buffer area. Since the data buffer area can store SPC configuration data, after receiving a trigger request, the SPC configuration data corresponding to the trigger request can be first stored in the data buffer area, and the SPC configuration data includes the sending configuration parameters of the SPC trigger signal requested by the trigger request, and then based on the sending configuration parameters included in the SPC configuration data in the data buffer area, the SPC trigger signal is sent to the sensor. In the process of sending the SPC trigger signal, the SPC configuration data corresponding to the subsequent trigger request can still be stored in the data buffer area, avoiding the situation of ignoring the trigger request, thereby improving the processing efficiency of the trigger signal during the SPC communication process.

[0009] In some embodiments, the above-mentioned sending configuration parameters include an interval duration threshold, and the interval duration threshold is the minimum value of the time interval from the last time the SPC trigger signal was sent; the above-mentioned sending of the SPC trigger signal to the sensor based on the SPC configuration data in the data buffer area includes: sending the SPC trigger signal to the sensor after the time interval from the last time the SPC trigger signal was sent reaches the interval duration threshold.

[0010] Based on this, the present application sets the interval between sending the SPC trigger signal twice so that the two SPC trigger signals will not interfere with each other, thereby ensuring the integrity of the transmitted data.

[0011] In some embodiments, the interval time threshold is determined based on the data nibble length and the number of data nibbles corresponding to the sensor.

[0012] Based on this, the present application can determine different interval duration thresholds when sending SPC trigger signals to different sensors based on the data half-byte length and the number of data half-bytes corresponding to the sensor, to ensure that the SPC trigger signal can be successfully sent to different sensors.

[0013] In some embodiments, the above-mentioned transmission configuration parameters may also include a pulse length of the SPC trigger signal.

[0014] In some embodiments, the sending of the SPC trigger signal to the sensor after the time interval from the last sending of the SPC trigger signal reaches an interval duration threshold includes: sending the SPC trigger signal according to the pulse length of the SPC trigger signal after the time interval from the last sending of the SPC trigger signal reaches the interval duration threshold.

[0015] In some embodiments, the above-mentioned sending of the SPC trigger signal according to the pulse length of the SPC trigger signal includes: switching the level state of the signal line connected to the sensor from the first level to the second level to start sending the SPC trigger signal, and when the sending of the SPC trigger signal reaches the pulse length of the SPC trigger signal, switching the level state of the signal line connected to the sensor from the second level to the first level to stop sending the SPC trigger signal.

[0016] The first level may be a low level, and the second level may be a high level.

[0017] Based on this, the present application controls the pulse length of the SPC trigger signal sent by switching the level state of the signal line connected to the sensor to ensure the accuracy of the SPC trigger signal sent.

[0018] In some embodiments, the above-mentioned sending of an SPC trigger signal to the sensor based on the SPC configuration data in the data cache area includes: when the SPC configuration data is not stored in the shift register that is communicatively connected to the data cache area, inputting the earliest stored SPC configuration data into the shift register according to the storage order of the SPC configuration data stored in the data cache area, and sending an SPC trigger signal to the sensor based on the SPC configuration data in the shift register.

[0019] Based on this, when the present application outputs the SPC configuration data stored in the data cache area, one SPC configuration data is output to the shift register each time in the order of storage time stored in the data cache area from early to late, so as to send an SPC trigger signal to the sensor each time through the shift register, thereby avoiding interference between multiple SPC trigger signals and causing data loss.

[0020] In some embodiments, the shift register has a first flag bit, and the first flag bit is used to indicate whether the SPC configuration data is stored in the shift register.

[0021] Based on this, the present application sets a flag bit in the shift register to facilitate detection of whether SPC configuration data is stored in the shift register.

[0022] In some embodiments, the trigger signal sending method provided in the embodiments of the present application may also include: after setting the first flag bit in the shift register, when the shift register receives the SPC configuration data input from the data buffer area, setting the first flag bit to a third level, and the third level is used to represent that the SPC configuration data is stored in the shift register; after the SPC trigger signal is sent, setting the first flag bit to a fourth level, and the fourth level is used to represent that the SPC configuration data is not stored in the shift register.

[0023] The third level may be a high level, and the fourth level may be a low level.

[0024] Based on this, the present application can characterize whether SPC configuration data is stored in the shift register by setting different levels for the first flag bit in the shift register, so as to facilitate subsequent judgment on whether to continue to input SPC configuration data into the shift register.

[0025] In some embodiments, the data cache area has a second flag bit, and the second flag bit is used to indicate whether the data cache area stores SPC configuration data.

[0026] Based on this, the present application sets a flag bit in the data cache area to facilitate detection of whether SPC configuration data is stored in the data cache area.

[0027] In some embodiments, the trigger signal sending method provided in the embodiments of the present application may further include: after storing the SPC configuration data in the data cache area, setting the second flag bit to the fifth level, and the fifth level is used to characterize that the SPC configuration data is stored in the data cache area; after all the SPC configuration data stored in the data cache area are input into the shift register, setting the second flag bit to the sixth level, and the sixth level is used to characterize that no SPC configuration data is stored in the data cache area.

[0028] The fifth level may be a low level, and the sixth level may be a high level.

[0029] Based on this, the present application can characterize whether SPC configuration data is stored in the data cache by setting different levels for the second flag bit in the data cache, so as to determine whether all trigger requests have been processed.

[0030] In some embodiments, the above-mentioned storing the SPC configuration data in the data cache area in response to the trigger request includes: in response to the trigger request, storing the SPC configuration data in the data cache area when the free storage amount of the data cache area is greater than or equal to the data amount of the SPC configuration data.

[0031] Based on this, when storing SPC configuration data in the data cache, the present application determines whether to continue storing the SPC configuration data in the data cache by determining whether the data cache is full, so as to avoid the trigger request being ignored as much as possible.

[0032] In some embodiments, the trigger signal sending method provided in the embodiments of the present application may further include: in response to a trigger request, when the free storage capacity of the data cache area is less than the data volume of the SPC configuration data, deleting the SPC configuration data.

[0033] Based on this, when it is determined that the data cache is full, the present application deletes the SPC configuration data corresponding to the subsequent trigger request to avoid excessive MCU load.

[0034] In some embodiments, the above-mentioned storing the short pulse width modulation code configuration data to the data cache area in response to the trigger request includes: in response to the trigger request, when the free storage capacity of the data cache area is less than the data amount of the short pulse width modulation code configuration data, deleting the target short pulse width modulation code configuration data in the data cache area, and storing the short pulse width modulation code configuration data in the above-mentioned data cache area; wherein the target SPC configuration data includes at least one of the following: the earliest stored SPC configuration data; the SPC configuration data with the lowest sending frequency.

[0035] Based on this, when it is determined that the data cache is full, the present application deletes some SPC configuration data already stored in the data cache to ensure that the SPC configuration data corresponding to the latest trigger request can be successfully responded to.

[0036] The present application provides a trigger signal sending device, which includes: a processing unit and a sending unit, wherein: the processing unit is used to store SPC configuration data in a data buffer in response to a trigger request, and the SPC configuration data includes the sending configuration parameters of the SPC trigger signal requested by the trigger request; the sending unit is used to send the SPC trigger signal to the sensor based on the SPC configuration data in the data buffer.

[0037] In some embodiments, the above-mentioned sending configuration parameters include an interval time threshold, and the interval time threshold is the minimum time interval from the last time the SPC trigger signal was sent; the above-mentioned sending unit is specifically used to: send an SPC trigger signal to the sensor after the time interval from the last time the SPC trigger signal was sent reaches the interval time threshold.

[0038] In some embodiments, the interval time threshold is determined based on the data nibble length and the number of data nibbles corresponding to the sensor.

[0039] In some embodiments, the above-mentioned transmission configuration parameters may also include a pulse length of the SPC trigger signal.

[0040] In some embodiments, the sending unit is specifically configured to send the SPC trigger signal according to the pulse length of the SPC trigger signal after the time interval from the last sending of the SPC trigger signal reaches an interval time threshold.

[0041] In some embodiments, the above-mentioned sending unit is specifically used to: switch the level state of the signal line connected to the sensor from the first level to the second level to start sending the SPC trigger signal, and when the pulse length of the SPC trigger signal is reached, switch the level state of the signal line connected to the sensor from the second level to the first level to stop sending the SPC trigger signal.

[0042] In some embodiments, the above-mentioned sending unit is specifically used to: when the SPC configuration data is not stored in the shift register communicated with the data buffer area, input the earliest stored SPC configuration data into the shift register according to the storage order of the SPC configuration data stored in the data buffer area, and send an SPC trigger signal to the sensor based on the SPC configuration data in the shift register.

[0043] In some embodiments, the shift register has a first flag bit, and the first flag bit is used to indicate whether the SPC configuration data is stored in the shift register.

[0044] In some embodiments, the above-mentioned processing unit is also used to: when the shift register receives the SPC configuration data input from the data buffer area, set the first flag bit to the third level, and the third level is used to represent that the SPC configuration data is stored in the shift register; after the SPC trigger signal is sent, set the first flag bit to the fourth level, and the fourth level is used to represent that the SPC configuration data is not stored in the shift register.

[0045] In some embodiments, the data cache area has a second flag bit, and the second flag bit is used to indicate whether the data cache area stores SPC configuration data.

[0046] In some embodiments, the above-mentioned processing unit is also used to: after storing the SPC configuration data in the data cache area, set the second flag bit to the fifth level, and the fifth level is used to represent that the SPC configuration data is stored in the data cache area; after all the SPC configuration data stored in the data cache area are input into the shift register, set the second flag bit to the sixth level, and the sixth level is used to represent that no SPC configuration data is stored in the data cache area.

[0047] In some embodiments, the processing unit is specifically configured to store the SPC configuration data in the data cache in response to a trigger request when the free storage capacity of the data cache is greater than or equal to the data capacity of the SPC configuration data.

[0048] In some embodiments, the processing unit is further configured to delete the SPC configuration data in response to a trigger request when the free storage capacity of the data cache is less than the data volume of the SPC configuration data.

[0049] In some embodiments, the above-mentioned processing unit is specifically used to: in response to a trigger request, when the free storage capacity of the data cache area is less than the data amount of the short pulse width modulation code configuration data, delete the target short pulse width modulation code configuration data in the data cache area, and store the short pulse width modulation code configuration data in the data cache area; wherein the target SPC configuration data includes at least one of the following: the earliest stored SPC configuration data; the SPC configuration data with the lowest sending frequency.

[0050] The present application provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the trigger signal sending method described above.

[0051] The present application provides a communication system, including a microcontroller unit and a sensor, the microcontroller unit includes a data buffer area and a shift register, the microcontroller unit is communicatively connected to the sensor, the data buffer area is communicatively connected to the shift register, and the microcontroller unit transmits a signal to the sensor via a signal line.

[0052] The present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the trigger signal sending method described above.

[0053] The present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal, the terminal executes the trigger signal sending method described above.

[0054] The present application provides a computer program product including instructions. When a computer executes the instructions, the computer executes the trigger signal sending method described above.

[0055] The present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instruction to implement the trigger signal sending method described above.

[0056] Specifically, the chip provided in the embodiment of the present application also includes a memory for storing computer programs or instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] Figure 1A schematic diagram of a standard SENT frame format provided in the related art;

[0059] Figure 2 A schematic diagram of an SPC frame format provided in the related art;

[0060] Figure 3 An architecture diagram of an MCU-SPC sensor system provided in the related art;

[0061] Figure 4 A schematic diagram of an SPC trigger pulse in an ISTM mode provided in the related art;

[0062] Figure 5 A trigger flow chart under ISTM mode provided in the related art;

[0063] Figure 6 A schematic diagram of an SPC trigger pulse in an ETM mode provided in the related art;

[0064] Figure 7 A trigger flow chart under an ETM mode provided in the related art;

[0065] Figure 8 A schematic diagram of a configuration of an error delay timer threshold provided in the related art;

[0066] Fig. 9 An architecture diagram of an MCU-SPC sensor system provided in an embodiment of the present application;

[0067] Fig.10 One of the method flow charts of a trigger signal sending method provided in an embodiment of the present application;

[0068] Fig.11 A second method flow chart of a trigger signal sending method provided in an embodiment of the present application;

[0069] Fig.12 A method flow chart of a trigger signal sending method provided in an embodiment of the present application;

[0070] Fig.13 A fourth method flow chart of a trigger signal sending method provided in an embodiment of the present application;

[0071] Fig.14 A trigger flow chart under ISTM mode provided in an embodiment of the present application;

[0072] Fig.15 A schematic diagram of an SPC trigger pulse in an ISTM mode provided in an embodiment of the present application;

[0073] Fig.16A trigger flow chart under ETM mode provided in an embodiment of the present application;

[0074] Fig.17 A schematic diagram of an SPC trigger pulse in an ETM mode provided in an embodiment of the present application;

[0075] Fig.18 A structural diagram of a trigger signal sending device provided in an embodiment of the present application;

[0076] Fig.19 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0078] In the description of this application, it should be understood that the terms "upper", "lower", "left", "right", "front", "back", "inside", "outside", etc. indicate directions or positional relationships based on the directions or relative positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on this application. Unless otherwise specified, the above-mentioned directional description can be flexibly set in the process of actual application under the condition that the relative positional relationship shown in the accompanying drawings is met.

[0079] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0080] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. It can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0081] In some embodiments, the term "comprises," "comprising," or any other variation thereof is intended to encompass non-exclusive inclusion, such that a process, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, article, or device that includes the element.

[0082] In some embodiments, the words "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0083] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0084] With the continuous development of electrification and intelligence in the automotive industry, the number of on-board sensors and the measurement accuracy requirements are increasing, and automotive systems are becoming increasingly complex. In order to solve the cost problem of data transmission in automotive systems, a single edge nibble transmission (SENT) communication protocol is proposed in related technologies to reduce data transmission costs.

[0085] The SENT communication protocol (SAE J2716) uses pulse width modulation (PWM) encoding / decoding. The SENT communication protocol is usually used for point-to-point one-way communication from the sensor to the MCU.

[0086] like Figure 1 The figure shows the SENT frame format of 6 data nibbles. SENT transmission consists of five sequences: synchronization / calibration segment, status segment and communication segment, data segment, check segment, and pause segment.

[0087] Among them, the synchronization / calibration segment (Sync) is a fixed 56-ticks synchronization pulse; the status segment and communication segment refer to the status and communication nibble (SCN), and the pulse period is 12 to 27 ticks; the pulse period of the data segment (data) is 12 to 27 ticks; the check segment refers to the cyclic redundancy check (CRC), and the pulse period is 12 to 27 ticks; the pause segment (pause) is an optional field, and the pulse period is 12 to 768 ticks.

[0088] In order to solve the shortcoming that SENT can only transmit in one direction, an SPC communication protocol is proposed in the related technology, which uses SPC to enhance the SENT interface function. Sensors that support the SPC function usually support one or more of the synchronization mode, range selection mode, identity (ID) selection mode and bidirectional transmission mode. In vehicle applications, the MCU can select different SPC sensors by configuring trigger pulses of different lengths. After receiving the correct trigger pulse, the SPC sensor will feedback the sensor data at the current moment.

[0089] like Figure 2 The SPC frame format of 6 data nibbles is shown in FIG. 1. SPC transmission consists of six sequences: trigger pulse segment, synchronization / calibration segment, status segment and communication segment, data segment, check segment, and pause segment.

[0090] The trigger pulse segment is used to mark the start of SPC transmission, and the pulse period can be flexibly adjusted; the synchronization / calibration segment, status segment and communication segment, data segment, check segment, pause segment and Figure 1 The description of some SENT frame formats is the same and will not be repeated here.

[0091] like Figure 3 , which is an architecture diagram of an MCU-SPC sensor system provided in the related art. The MCU-SPC sensor system 300 may include an MCU 310 and an SPC sensor 320, and the MCU 310 may include a MUX 311, a peripheral module 312, and a shift register 313. The MCU 310 is coupled to the SPC sensor 320, and the MUX 311 is coupled to the shift register 313 through the peripheral module 312.

[0092] Among them, MUX311 is a multiplexer (MUX), and MUX can detect external triggers through a comparator (CMP) module, a timer module, a PWM module, and a general-purpose timer module (GTM); the peripheral module 312 can generate trigger requests through three modes: internal single trigger mode (ISTM), internal automatic trigger mode (IATM), and external trigger mode (ETM).

[0093] Exemplarily, in the ISTM mode, after receiving a single trigger, the MCU 310 may send the SPC configuration data to the shift register 313 , and the shift register 313 sends a trigger pulse to the SPC sensor 320 .

[0094] Exemplarily, in the IATM mode, after receiving the first trigger, MCU310 sends the SPC configuration data to the shift register 313, and the shift register 313 sends a trigger pulse to the SPC sensor 320. Then, after successfully receiving the data frame fed back by the sensor, MCU310 automatically sends the SPC trigger pulse again to achieve continuous automatic triggering.

[0095] Exemplarily, in the ETM mode, after receiving an external trigger, the MCU 310 sends the SPC configuration data to the shift register 313 , and the shift register 313 sends a trigger pulse to the SPC sensor 320 .

[0096] However, in order to ensure the integrity of the transmitted data, the existing MCU-SPC sensor trigger mode prohibits sending the trigger signal again when the trigger pulse has not been sent completely.

[0097] like Figure 4 As shown, it is a schematic diagram of an SPC trigger pulse in an ISTM mode provided by the related art. In the existing ISTM mode, after a single trigger 1 occurs, configuration information can be written to the shift register through a write operation, and the MCU starts the SPC sending task. Before the SPC task sending is completed (such as the SPC transmission task stage), if a request is made to write configuration information to the SPC shift register through a write operation again, the hardware (HW) will ignore the request (such as single trigger 2 and single trigger 3).

[0098] Among them, ISTM is usually used in combination with a receiving watchdog timer (WDT). The receiving WDT can detect whether the sensor feedback data frame times out after the MCU sends a trigger pulse.

[0099] For example, Figure 5 As shown, it is a trigger flow chart under ISTM mode provided in the related art. After ISTM is enabled, a single trigger request is received, the count threshold of the receiving WDT is set first, and then the SPC delay timer threshold and the SPC trigger pulse length are set, and the shift register is written, and then the delay timer starts to run. When the delay timer reaches the delay timer threshold, the MCU starts to send a trigger pulse to the sensor; at this time, it is determined whether a new trigger request is received during the current sending of the trigger pulse. If so, the hardware discards the new trigger request. If not, the current SPC trigger pulse continues to be sent until the sending is completed, and it is determined whether the sensor data is received within the count threshold of the receiving WDT. If so, the data in the receiving buffer area is read; if not, the SPC delay timer threshold and the SPC trigger pulse length are set again.

[0100] like Figure 6 As shown, it is a schematic diagram of an SPC trigger pulse in an ETM mode provided by the related art. In the existing ETM mode, after an external trigger 1 occurs, configuration information can be written to the shift register through a write operation, and the MCU starts the SPC sending task. Before the SPC task sending is completed (such as the SPC transmission task stage), if a request is made to write configuration information to the SPC shift register through a write operation again, the HW will ignore the request (such as external trigger 2 and external trigger 3).

[0101] Among them, ETM is usually used in combination with the receiving WDT. The receiving WDT can detect whether the sensor feedback data frame times out after the MCU sends a trigger pulse.

[0102] For example, Figure 7As shown, it is a trigger flow chart under ETM mode provided in the related art. After ETM is enabled, the MUX trigger source input source is set first. If an external trigger request is received, the count threshold of the receiving WDT is set first, and then the SPC delay timer threshold and the SPC trigger pulse length are set, and written into the shift register, and then the delay timer starts to run. When the delay timer reaches the delay timer threshold, the MCU starts to send a trigger pulse to the sensor; at this time, it is determined whether a new trigger request is received during the current trigger pulse sending process. If so, the hardware discards the new trigger request. If not, the current SPC trigger pulse continues to be sent until the sending is completed, and it is determined whether the sensor data is received within the count threshold of the receiving WDT. If so, the data in the receiving buffer is read; if not, the SPC delay timer threshold and the SPC trigger pulse length are set again.

[0103] In some embodiments, the MUX maps multiple trigger input sources to any trigger output through a selection signal; the selection signal is usually composed of multiple switches, each switch corresponds to a trigger input source, and different input signals can be selected to be transmitted to the output signal by controlling the state of the switch.

[0104] like Figure 8 , which is a schematic diagram of a configuration of an error delay timer threshold provided in the related art. The SPC sensor feedback data stage in A is the SPC sensor feedback data stage in B. If the setting duration of the delay timer threshold is less than the duration of the SPC sensor feedback data stage, as shown in C, the MCU will switch the channel input / output (I / O) port state and send an SPC trigger pulse during the SPC sensor feedback data stage, which may cause data reception failure.

[0105] In this context, in order to solve the problem in the related art that, when the SPC sensor trigger mode is ISTM or ETM mode, in order to ensure the integrity of the transmitted data, after the MCU generates a trigger pulse according to the received trigger request, in the process of sending the trigger pulse, the MCU cannot process the received trigger request again, resulting in low processing efficiency of the trigger request during the SPC communication process. The present application provides a trigger signal sending method, device, equipment and system. The implementation method of the embodiments of the present application is described in detail below in conjunction with the drawings in the specification.

[0106] In some embodiments, the trigger signal sending method provided in the present application can be applied to various devices with data processing capabilities. The device may include any of the following: a microprocessor (MPU), a digital signal processor (DSP), a programmable logic controller (PLC), an embedded system processor (embedded system processor), a single-board computer (SBC), and an MCU.

[0107] The following takes the device with data processing capability as an MCU as an example to describe the detailed process after the trigger signal sending method provided in the present application is applied to the MCU.

[0108] In some embodiments, when the device with data processing capability is an MCU, the communication system provided in the present application may be an MCU-SPC sensor system.

[0109] like Fig. 9 As shown, it is an architecture diagram of an MCU-SPC sensor system provided in an embodiment of the present application. The MCU-SPC sensor system 900 may include an MCU 910 and an SPC sensor 920. The MCU 910 may include a MUX 911, a peripheral module 912, and a shift register 913. The MCU 910 is connected in communication with the SPC sensor 920, and the MUX 911 is connected in communication with the shift register 913 through the peripheral module 912.

[0110] Among them, MUX911 can detect external triggers through CMP module, timer module, PWM module, and GTM; peripheral module 912 can generate trigger requests through three modes: ISTM, IATM, and ETM. Peripheral module 912 also includes data buffer area 912a, and data buffer area 912a can store multiple data (such as data 1, data 2, data 3).

[0111] Exemplarily, in ISTM and ETM modes, after sending a trigger request, the SPC configuration data can be stored in the data buffer area 912a, and then the MCU910 sends the SPC configuration data in the data buffer area 912a to the shift register 913, and then sends an SPC trigger signal to the SPC sensor 920 through the shift register 913.

[0112] In this way, by setting a data cache area in the MCU, since the data cache area can store SPC configuration data, during the process of the MCU sending an SPC trigger signal, the SPC configuration data corresponding to the subsequent trigger request can still be stored in the data cache area, avoiding the situation of ignoring the trigger request, thereby improving the processing efficiency of the MCU during the SPC communication process.

[0113] Combine the following Fig. 9 , refer to the following Figures 10 to 14 The trigger signal sending method provided in an embodiment of the present application is described.

[0114] It is understandable that in the embodiment of the present application, each device / module in the MCU-SPC sensor system can perform some or all of the steps in the embodiment of the present application, and these steps or operations are only examples. The embodiment of the present application can also perform other operations or variations of various operations. In addition, the various steps can be performed in different orders presented in the embodiment of the present application, and it is possible that not all operations in the embodiment of the present application need to be performed.

[0115] Fig.10 The method flow chart of the trigger signal sending method provided in the embodiment of the present application, the subject executing the method can be the MCU, or it can be various devices / modules in the MCU, such as an integrated circuit or a chip, and the embodiment of the present application does not make specific limitations on this.

[0116] For example, Fig.10 As shown, the trigger signal sending method provided in the embodiment of the present application may include the following S1001 and S1002:

[0117] S1001. In response to a trigger request, store SPC configuration data into a data cache area.

[0118] In some embodiments, the trigger request can be divided into an internal trigger request and an external trigger request.

[0119] It can be understood that the internal trigger request refers to a trigger request generated inside the MCU, and the external trigger request refers to a trigger request to the MCU generated by an external trigger source.

[0120] In some embodiments, the SPC configuration data may include a configuration parameter for sending an SPC trigger signal requested by the trigger request, wherein the SPC trigger signal is used to indicate sensor feedback data, and the SPC trigger signal may be a pulse signal.

[0121] Optionally, the above-mentioned sending configuration parameters may include at least one of the following: an interval time threshold and a pulse length of the SPC trigger signal.

[0122] The interval time threshold is the minimum time interval from the last time the SPC trigger signal was sent. The pulse length of the SPC trigger signal may indicate the time required to send the SPC trigger signal.

[0123] In an optional implementation, the above-mentioned interval time threshold may be a manually set value, and different thresholds may be set according to different sensors. For example, the interval time threshold may be 3 milliseconds, 5 milliseconds, etc.

[0124] In another optional implementation, the interval time threshold is determined based on the data half-byte length and the number of data half-bytes corresponding to the sensor.

[0125] Among them, the data half-byte length and the data half-byte quantity corresponding to different sensors are different.

[0126] In some embodiments, the data nibble length and the data nibble quantity corresponding to the sensor may be obtained by referring to a manual.

[0127] For example, the interval duration threshold can be calculated by formula (1). Formula (1) is as follows:

[0128] A=56+(number of data nibbles+2)*data nibble length+B Formula (1)

[0129] Among them, A is the interval duration threshold, and B is the time tolerance of the interval duration threshold, which can be flexibly set according to requirements.

[0130] For example, in combination Figure 2 In the above formula 1, the data nibble length can be the length of each data in the data segment (such as 27 ticks); the number of data nibbles can be the number of data in the data segment (such as 6); 2 is the status segment and the communication segment, as well as the check segment; B is the pause segment.

[0131] In this way, the present application can determine different interval duration thresholds when sending SPC trigger signals to different sensors based on the data half-byte length and the number of data half-bytes corresponding to the sensor, thereby ensuring that the SPC trigger signal can be successfully sent to different sensors.

[0132] In some embodiments, when the MCU needs to obtain certain data, it can first generate or receive a trigger request, then respond to the trigger request, and store the sending configuration parameters of the SPC trigger signal requested by the trigger request into the data cache area, so that the sensor data can be obtained subsequently by sending the SPC trigger signal.

[0133] For example, taking the MCU as a vehicle MCU, if it is necessary to obtain the current speed of the vehicle, the vehicle MCU needs to generate a trigger request, and then respond to the trigger request, configure the SPC configuration data corresponding to the vehicle speed sensor configuration, and then store the SPC configuration data in the data cache area, so that the vehicle speed sensor can be requested to feedback the current vehicle speed by sending an SPC trigger signal later.

[0134] S1002 . Send an SPC trigger signal to the sensor based on the SPC configuration data in the data buffer.

[0135] The above sensors can collect data and feed the collected data back to the MCU.

[0136] Optionally, the sensor may be a vehicle sensor. Exemplarily, the vehicle sensor may be a speed sensor, a displacement sensor, a temperature sensor, a humidity sensor, and the like.

[0137] Optionally, in order to ensure the integrity of sending the SPC trigger signal, whether to start sending the SPC trigger signal may be determined by judging whether the interval between sending the SPC trigger signal twice reaches an interval threshold.

[0138] It should be noted that, for a detailed description of the above-mentioned interval duration threshold, reference may be made to the relevant description of the interval duration threshold in the above-mentioned S1001, which will not be repeated here.

[0139] In some embodiments, when the SPC configuration data includes an interval duration threshold, the SPC trigger signal may be sent to the sensor after the time interval from the last time the SPC trigger signal was sent reaches the interval duration threshold.

[0140] For example, taking the above interval time threshold of 5 milliseconds as an example, before sending the SPC trigger signal to the sensor, the time interval from the last time the SPC trigger signal was sent can be detected. If the time interval is 6 milliseconds, since 6 milliseconds is greater than 5 milliseconds, it indicates that the current SPC trigger signal will not interfere with the last SPC trigger signal sent, and the SPC trigger signal can be sent to the sensor.

[0141] Further optionally, after the time interval from the last sending of the SPC trigger signal reaches an interval time threshold, the SPC trigger signal is sent according to the pulse length of the SPC trigger signal.

[0142] In some embodiments, the level state of the signal line connected to the sensor can be switched from a first level to a second level to start sending an SPC trigger signal. When the pulse length of the SPC trigger signal is reached, the level state of the signal line connected to the sensor is switched from the second level to the first level to stop sending the SPC trigger signal.

[0143] The first level may be a low level, and the second level may be a high level.

[0144] For example, taking the first level as 0 volts and the second level as 5 volts as an example, when it is necessary to send an SPC trigger signal, the level of the signal line connected to the sensor is switched from 0 volts to 5 volts, and the SPC trigger signal is started to be sent. During the sending period, the pulse length of the sent SPC trigger signal is continuously monitored. When the pulse length of the SPC trigger signal in the SPC configuration data is reached, the level of the signal line is switched back from 5 volts to 0 volts, and the sending of the SPC trigger signal is terminated.

[0145] In the trigger signal sending method provided in the embodiment of the present application, by setting a data buffer in the MCU, since the data buffer can store SPC configuration data, after receiving a trigger request, the MCU can first store the SPC configuration data corresponding to the trigger request in the data buffer, and the SPC configuration data includes the sending configuration parameters of the SPC trigger signal requested by the trigger request, and then send the SPC trigger signal to the sensor based on the sending configuration parameters included in the SPC configuration data in the data buffer. In the process of the MCU sending the SPC trigger signal, the SPC configuration data corresponding to the subsequent trigger request can still be stored in the data buffer, avoiding the situation of ignoring the trigger request, thereby improving the processing efficiency of the MCU in the SPC communication process.

[0146] Optionally, before storing the SPC configuration data in the data cache area, it is necessary to determine the size relationship between the free storage capacity of the data cache area and the data volume of the SPC configuration data corresponding to the trigger request.

[0147] In an optional implementation, in response to a trigger request, the SPC configuration data may be stored in the data cache when the free storage capacity of the data cache is greater than or equal to the data capacity of the SPC configuration data.

[0148] The free storage capacity of the data cache area refers to the amount of SPC configuration data that can be stored in the data cache area.

[0149] In some embodiments, after the SPC configuration data is configured in response to a trigger request, it is possible to first detect whether the amount of SPC configuration data that can be stored in the data cache is greater than or equal to the amount of SPC configuration data obtained in this configuration. If it is judged to be greater than or equal to, the SPC configuration data is stored in the data cache.

[0150] For example, if the amount of SPC configuration data is 5 bytes, if it is detected that the amount of SPC configuration data remaining in the data buffer that can be stored is 10 bytes, then since 10 bytes is greater than 5 bytes, the SPC configuration data is stored in the data buffer.

[0151] In an optional implementation, in response to a trigger request, when the free storage capacity of the data cache is less than the data size of the SPC configuration data, the target SPC configuration data in the data cache is deleted and the SPC configuration data is stored in the data cache.

[0152] The target SPC configuration data may include at least one of the following: the earliest stored SPC configuration data; and the SPC configuration data with the lowest sending frequency.

[0153] In some embodiments, after the SPC configuration data is configured in response to a trigger request, it is possible to first detect whether the amount of SPC configuration data that can be stored in the data cache is greater than or equal to the amount of SPC configuration data obtained in this configuration. If it is judged to be less than, the earliest SPC configuration data stored in the data cache, or the SPC configuration data with the lowest sending frequency, is deleted, and then the new SPC configuration data is stored in the data cache.

[0154] For example, taking the data size of the new SPC configuration data as 5 bytes, if it is detected that the data size of the remaining SPC configuration data that can be stored in the data cache is 3 bytes, at this time, since the storage time of SPC configuration data A stored in the data cache is 10:35, the storage time of SPC configuration data B is 10:20, and the storage time of SPC configuration data C is 11:13, then the SPC configuration data A with a storage time of 10:35 is deleted, and the new SPC configuration data is stored in the data cache.

[0155] Optionally, in order to ensure that an SPC trigger signal is sent each time, before sending the SPC trigger signal, the SPC configuration data in the data buffer area may be input into the shift register, and the SPC trigger signal may be sent serially through the shift register.

[0156] For example, Fig.11 As shown, the above S1002 may include the following S1002a and S1002b:

[0157] S1002a. When no SPC configuration data is stored in the shift register that is communicatively connected to the data buffer area, the earliest stored SPC configuration data is input into the shift register according to the storage order of the SPC configuration data stored in the data buffer area.

[0158] It can be understood that, since a plurality of SPC configuration data can be stored in the data buffer area, the storage order of the plurality of SPC configuration data can be determined according to the storage time of each SPC configuration data.

[0159] It should be noted that, since only one SPC configuration data can be stored in the shift register, it is necessary to detect whether the SPC configuration data is stored in the shift register before inputting the data into the shift register.

[0160] In some embodiments, it may be detected whether SPC configuration data is stored in the shift register. If SPC configuration data is not stored in the shift register, the SPC configuration data with the earliest storage time in the data buffer area is input into the shift register.

[0161] Optionally, the shift register has a first flag bit, and the first flag bit is used to indicate whether SPC configuration data is stored in the shift register. The first flag bit may be a trigger transmit start (TTS).

[0162] In some embodiments, the first flag bit may be set to different levels to indicate whether the SPC configuration data is stored in the shift register. For example, the first flag bit may be set to the third level or the fourth level.

[0163] Optionally, the third level may be a high level, and the fourth level may be a low level.

[0164] Wherein, when the first flag bit is set to a high level, the SPC configuration data is stored in the shift register; when the first flag bit is set to a low level, the SPC configuration data is not stored in the shift register.

[0165] In some embodiments, whether SPC configuration data is stored in the shift register can be determined by detecting the level of the first flag bit in the shift register. If SPC configuration data is not stored in the shift register, the earliest SPC configuration data stored in the data buffer area is input into the shift register.

[0166] Exemplarily, take the case where three SPC configuration data (such as SPC configuration data A, SPC configuration data B, and SPC configuration data C) are stored in the data buffer area, and the fourth level is a low level. If it is detected that the first flag bit in the shift register is set to a low level, it indicates that no SPC configuration data is stored in the shift register. At this time, if the storage time of SPC configuration data A is 10:20, the storage time of SPC configuration data B is 10:35, and the storage time of SPC configuration data C is 11:13, then the SPC configuration data A with the smallest storage time is input into the shift register.

[0167] S1002b. Send an SPC trigger signal to the sensor based on the SPC configuration data in the shift register.

[0168] It should be noted that the detailed description of sending an SPC trigger signal to the sensor based on the SPC configuration data in the shift register can refer to the relevant description of sending an SPC trigger signal to the sensor based on the SPC configuration data in the data buffer area in the above S1002, which will not be repeated here.

[0169] In this way, when the present application outputs the SPC configuration data stored in the data cache area, it outputs one SPC configuration data to the shift register each time in the order of the storage time of the SPC configuration data stored in the data cache area from early to late, so as to send an SPC trigger signal to the sensor each time through the shift register, thereby avoiding interference between multiple SPC trigger signals and causing data loss.

[0170] Optionally, whether SPC configuration data is stored in the shift register may be indicated by setting the level of the first flag bit in the shift register.

[0171] For example, Fig.12 As shown, the trigger signal sending method provided in the embodiment of the present application may also include the following S1201 and S1202:

[0172] S1201. When the shift register receives SPC configuration data input from the data buffer area, the shift register sets the first flag bit to a third level.

[0173] The third level is used to indicate that the SPC configuration data is stored in the shift register.

[0174] In some embodiments, after the SPC configuration data is input into the shift register, the TTS in the shift register may be set to a third level, for example, to a high level.

[0175] S1202: After the SPC trigger signal is sent, the first flag bit is set to a fourth level.

[0176] The fourth level is used to indicate that no SPC configuration data is stored in the shift register.

[0177] In some embodiments, after the SPC trigger signal is sent based on the SPC configuration data in the shift register, if the SPC trigger signal is sent completely, the TTS in the shift register may be set to a fourth level, for example, to a low level.

[0178] In this way, the present application can indicate whether SPC configuration data is stored in the shift register by setting different levels for the first flag bit in the shift register, so as to facilitate subsequent determination of whether to continue to input SPC configuration data into the shift register.

[0179] Optionally, in order to ensure that all trigger requests are processed, after the SPC trigger signal is sent to the sensor through the shift register, it can be determined whether SPC configuration data is still stored in the data buffer area. If SPC configuration data is stored, the SPC configuration data stored in the data buffer area continues to be input into the shift register.

[0180] In some embodiments, it may be detected whether SPC configuration data is stored in the data buffer area. If SPC configuration data is stored in the data buffer area, the SPC configuration data stored in the data buffer area is input into the shift register.

[0181] Optionally, the data buffer area has a second flag bit, and the second flag bit is used to indicate whether the data buffer area stores SPC configuration data. The second flag bit may be a transmission buffer underflow (TBU).

[0182] In some embodiments, the second flag bit may be set to different levels to indicate whether the SPC configuration data is stored in the data buffer area. For example, the second flag bit may be set to the fifth level or the sixth level.

[0183] Optionally, the fifth level may be a low level, and the sixth level may be a high level.

[0184] Wherein, when the second flag bit is set to a low level, the SPC configuration data is stored in the shift register; when the second flag bit is set to a high level, the SPC configuration data is not stored in the shift register.

[0185] In some embodiments, whether SPC configuration data is stored in the data cache area can be determined by detecting the level of the second flag bit in the data cache area. If SPC configuration data is stored in the data cache area, the SPC configuration data stored in the data cache area is input into the shift register.

[0186] For example, taking the fifth level as a low level as an example, after the trigger signal is sent through the shift register, if it is detected that the second flag bit in the data buffer is set to a low level, it indicates that SPC configuration data is still stored in the data buffer, and at this time, the SPC configuration data stored in the data buffer needs to be continuously input into the shift register for processing.

[0187] Thus, after processing a trigger request, the present application needs to determine whether SPC configuration data is still stored in the data buffer to ensure that all trigger requests are processed.

[0188] Optionally, whether the SPC configuration data is stored in the data cache area may be indicated by setting the level of the second flag bit in the data cache area.

[0189] For example, Fig.13 As shown, the trigger signal sending method provided in the embodiment of the present application may also include the following S1301 and S1302:

[0190] S1301 . After storing the SPC configuration data in the data buffer area, set the second flag bit to a fifth level.

[0191] The fifth level is used to indicate that the SPC configuration data is stored in the data buffer area.

[0192] In some embodiments, after the SPC configuration data is stored in the data buffer, the TBU in the data buffer may be set to a fifth level, for example, the TBU is set to a low level.

[0193] S1302: After all SPC configuration data stored in the data buffer area are input into the shift register, the second flag bit is set to a sixth level.

[0194] The sixth level is used to indicate that no SPC configuration data is stored in the data buffer area.

[0195] In some embodiments, after all SPC configuration data stored in the data buffer are input into the shift register and there is no SPC configuration data in the data buffer, the TBU in the data buffer can be set to a sixth level, for example, setting the TBU to a high level.

[0196] In this way, the present application can indicate whether SPC configuration data is stored in the data cache by setting different levels for the second flag bit in the data cache, so as to determine whether all trigger requests have been processed.

[0197] Optionally, in order to avoid excessive load on the MCU, before storing the SPC configuration data in the data cache, it is also necessary to determine the data amount of the SPC configuration data stored in the data cache.

[0198] In an optional implementation, in response to a trigger request, when the free storage capacity of the data cache area is less than the data volume of the SPC configuration data, the SPC configuration data may be deleted.

[0199] The SPC configuration data is the configuration data corresponding to the trigger request.

[0200] It should be noted that, for a detailed description of the free storage capacity of the data cache area, reference may be made to the related description of the free storage capacity in the above S1001, which will not be repeated here.

[0201] In some embodiments, after the SPC configuration data is configured in response to a trigger request, it is possible to first detect whether the amount of SPC configuration data that can be stored in the data cache is greater than or equal to the amount of SPC configuration data obtained in this configuration. If it is judged to be less than, the SPC configuration data is not stored in the data cache and is deleted.

[0202] For example, if the amount of SPC configuration data is 5 bytes, if it is detected that the amount of SPC configuration data remaining in the data buffer that can be stored is 1 byte, since 1 byte is less than 5 bytes, it indicates that the SPC configuration data cannot be stored in the data buffer, and the SPC configuration data is deleted.

[0203] In this way, when it is determined that the data buffer is full, the present application deletes the SPC configuration data corresponding to the subsequent trigger request to avoid excessive MCU load.

[0204] The trigger signal sending method provided in the embodiment of the present application is exemplarily described below by taking the trigger modes of the SPC sensor as ISTM and ETM as examples.

[0205] For example, Fig.14 As shown, when the trigger mode of the SPC sensor is ISTM, the trigger signal sending method provided in the embodiment of the present application may include the following S1401 to S1412:

[0206] S1401. Receive a trigger request in ISTM mode.

[0207] S1402. Set SPC configuration data in response to the trigger request.

[0208] S1403: Automatically calculate the interval duration threshold.

[0209] S1404, determine whether the data cache is full, if so, execute S1405; if not, execute S1406.

[0210] S1405: HW ignores the trigger request.

[0211] S1406. Store the SPC configuration data into the data buffer area.

[0212] S1407, determine whether the data buffer area is empty, if so, execute S1408; if not, execute S1409.

[0213] S1408, set TBU to a high level.

[0214] The TBU high level is used to indicate that no SPC configuration data is stored in the data buffer area.

[0215] S1409, store the SPC configuration data in the data buffer area into the shift register, and set TTS to a high level.

[0216] The TTS high level is used to indicate that the SPC configuration data is stored in the shift register.

[0217] For example, Fig.15 As shown, it is a schematic diagram of an SPC trigger pulse in an ISTM mode provided by an embodiment of the present application. In the ISTM mode, after receiving a trigger request (such as single trigger 1), the SPC configuration data corresponding to the single trigger 1 can be stored in the data buffer area, and then when a trigger request (such as single trigger 2 and single trigger 3) is received again, the SPC configuration data corresponding to the single trigger 2 and the SPC configuration data corresponding to the single trigger 3 can still be stored in the data buffer area, and the TTS high level and the TBU low level are set at the same time, and after the process corresponding to the one-time trigger request is completed (point A in the figure), TTS is set to a low level, and when it is detected that the SPC configuration data is not stored in the data buffer area (point B in the figure), TBU is set to a high level.

[0218] It should be noted that Fig.15 The frames corresponding to the X points in are all data frames.

[0219] S1410: When the time from the last time the SPC trigger signal was sent reaches the interval time threshold, send an SPC trigger signal to the sensor.

[0220] S1411. Determine whether a new trigger request is received. If so, execute S1404; if not, execute S1412.

[0221] S1412, transmission is completed, and TTS is set to a low level.

[0222] In this way, by setting the data buffer area to store the SPC configuration data corresponding to multiple internal trigger requests in the ISTM mode, it is avoided to miss some important trigger requests.

[0223] For example, Fig.16 As shown, when the trigger mode of the SPC sensor is ETM, the trigger signal sending method provided in the embodiment of the present application may include the following S1601 to S1613:

[0224] S1601. Set MUX trigger source parameters.

[0225] S1602, determine whether a trigger request from a MUX trigger source is received, if not, execute S1603; if yes, execute S1604.

[0226] S1603, set TBU to a high level.

[0227] S1604: Set SPC configuration data in response to the trigger request.

[0228] S1605: Automatically calculate the interval duration threshold.

[0229] S1606, determine whether the data cache is full, if so, execute S1607; if not, execute S1608.

[0230] S1607: HW ignores the trigger request.

[0231] S1608. Store the SPC configuration data into the data cache area.

[0232] S1609, determine whether the data cache area is empty, if so, execute S1603; if not, execute S1610.

[0233] S1610, sending the SPC configuration data in the data buffer area to the shift register, and setting TTS to a high level.

[0234] For example, Fig.17 As shown, it is a schematic diagram of an SPC trigger pulse in an ETM mode provided by an embodiment of the present application. In the ETM mode, after receiving a trigger request (such as external trigger 1), the SPC configuration data corresponding to the external trigger 1 can be stored in the data buffer area. At this time, when a trigger request (such as external trigger 2 and external trigger 3) is received again, the SPC configuration data corresponding to the external trigger 2 and the SPC configuration data corresponding to the external trigger 3 can still be stored in the data buffer area, and the TTS high level and the TBU low level are set at the same time. After the process corresponding to a trigger request is completed (point A in the figure), TTS is set to a low level, and when it is detected that the SPC configuration data is not stored in the data buffer area (point B in the figure), TBU is set to a high level.

[0235] It should be noted that Fig.17 The frames corresponding to the X points in are all data frames.

[0236] S1611: When the time from the last time an SPC trigger signal was sent reaches an interval time threshold, an SPC trigger signal is sent to the sensor.

[0237] S1612: Determine whether a new trigger request is received from the MUX trigger source. If not, execute S1613; if yes, execute S1604.

[0238] S1613, transmission is completed, and TTS is set to a low level.

[0239] In this way, by setting the data buffer area to store the SPC configuration data corresponding to multiple external trigger requests in the ETM mode, it is avoided to miss some important trigger requests.

[0240] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the trigger signal sending device or electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0241] The embodiment of the present application can divide the functional modules of the trigger signal sending device or the electronic device according to the above method. For example, the trigger signal sending device or the electronic device may include various functional modules corresponding to the various functional divisions, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0242] Fig.18 The structure diagram of a trigger signal sending device provided in an embodiment of the present application is as follows: The trigger signal sending device 1800 includes: a processing unit 1801 and a sending unit 1802 .

[0243] Among them: the above-mentioned processing unit 1801 is used to store SPC configuration data in the data buffer area in response to the trigger request, and the SPC configuration data includes the sending configuration parameters of the SPC trigger signal requested by the trigger request; the above-mentioned sending unit 1802 is used to send the SPC trigger signal to the sensor based on the SPC configuration data in the data buffer.

[0244] In some embodiments, the above-mentioned sending configuration parameters include an interval duration threshold, and the interval duration threshold is the minimum time interval from the last time the SPC trigger signal was sent; the above-mentioned sending unit 1802 is specifically used to: send an SPC trigger signal to the sensor after the time interval from the last time the SPC trigger signal was sent reaches the interval duration threshold.

[0245] In some embodiments, the interval time threshold is determined based on the data nibble length and the number of data nibbles corresponding to the sensor.

[0246] In some embodiments, the above-mentioned transmission configuration parameters may also include a pulse length of the SPC trigger signal.

[0247] In some embodiments, the sending unit 1802 is specifically configured to send an SPC trigger signal according to a pulse length of the SPC trigger signal after the time interval from the last sending of the SPC trigger signal reaches an interval time threshold.

[0248] In some embodiments, the above-mentioned sending unit 1802 is specifically used to: switch the level state of the signal line connected to the sensor from the first level to the second level to start sending the SPC trigger signal, and when the pulse length of the SPC trigger signal is reached, switch the level state of the signal line connected to the sensor from the second level to the first level to stop sending the SPC trigger signal.

[0249] In some embodiments, the above-mentioned sending unit 1802 is specifically used to: when the SPC configuration data is not stored in the shift register communicated with the data buffer area, input the earliest stored SPC configuration data into the shift register according to the storage order of the SPC configuration data stored in the data buffer area, and send an SPC trigger signal to the sensor based on the SPC configuration data in the shift register.

[0250] In some embodiments, the shift register has a first flag bit, and the first flag bit is used to indicate whether the SPC configuration data is stored in the shift register.

[0251] In some embodiments, the above-mentioned processing unit 1801 is also used to: when the shift register receives the SPC configuration data input from the data buffer area, set the first flag bit to the third level, and the third level is used to represent that the SPC configuration data is stored in the shift register; after the SPC trigger signal is sent, set the first flag bit to the fourth level, and the fourth level is used to represent that the SPC configuration data is not stored in the shift register.

[0252] In some embodiments, the data cache area has a second flag bit, and the second flag bit is used to indicate whether the data cache area stores SPC configuration data.

[0253] In some embodiments, the above-mentioned processing unit 1801 is also used to: after storing the SPC configuration data in the data cache area, set the second flag bit to the fifth level, and the fifth level is used to represent that the SPC configuration data is stored in the data cache area; after all the SPC configuration data stored in the data cache area are input into the shift register, set the second flag bit to the sixth level, and the sixth level is used to represent that no SPC configuration data is stored in the data cache area.

[0254] In some embodiments, the processing unit 1801 is specifically configured to store the SPC configuration data in the data cache in response to a trigger request when the free storage amount of the data cache is greater than or equal to the data amount of the SPC configuration data.

[0255] In some embodiments, the processing unit 1801 is further configured to delete the SPC configuration data in response to a trigger request when the free storage capacity of the data cache is less than the data volume of the SPC configuration data.

[0256] In some embodiments, the above-mentioned processing unit 1801 is specifically used to: in response to a trigger request, when the free storage capacity of the data cache area is less than the data amount of the short pulse width modulation code configuration data, delete the target short pulse width modulation code configuration data in the data cache area, and store the short pulse width modulation code configuration data in the data cache area; wherein the target SPC configuration data includes at least one of the following: the earliest stored SPC configuration data; the SPC configuration data with the lowest sending frequency.

[0257] In the trigger signal sending device provided in the embodiment of the present application, by setting a data buffer in the MCU, since the data buffer can store SPC configuration data, after receiving a trigger request, the MCU can first store the SPC configuration data corresponding to the trigger request in the data buffer, and the SPC configuration data includes the sending configuration parameters of the SPC trigger signal requested by the trigger request, and then send the SPC trigger signal to the sensor based on the sending configuration parameters included in the SPC configuration data in the data buffer. In the process of the MCU sending the SPC trigger signal, the SPC configuration data corresponding to the subsequent trigger request can still be stored in the data buffer, avoiding the situation of ignoring the trigger request, thereby improving the processing efficiency of the MCU in the SPC communication process.

[0258] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0259] Fig.19 This is a structural diagram of an electronic device provided in an embodiment of the present application. Fig.19 As shown, the electronic device 1900 includes but is not limited to: a processor 1901 and a memory 1902 .

[0260] The memory 1902 is used to store executable instructions of the processor 1901. It can be understood that the processor 1901 is configured to execute instructions to implement the trigger signal sending method in the above embodiment.

[0261] It should be noted that those skilled in the art can understand that Fig.19 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include Fig.19 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0262] The processor 1901 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 1902, and calling data stored in the memory 1902, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 1901 may include one or more processing units. Optionally, the processor 1901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1901.

[0263] The memory 1902 may be used to store software programs and various data. The memory 1902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one functional module (such as a determination unit, a processing unit, etc.), etc. In addition, the memory 1902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0264] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1902 including instructions. The above instructions can be executed by the processor 1901 of the electronic device 1900 to implement the trigger signal sending method in the above embodiment.

[0265] In actual implementation, Fig.18 The steps performed by the processing unit 1801 and the sending unit 1802 in Fig.19 The processor 1901 in the embodiment calls the computer program stored in the memory 1902 to implement. The specific execution process can refer to the description of the method part in the above embodiment, which will not be repeated here.

[0266] Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0267] In an exemplary embodiment, the embodiment of the present application further provides a computer program product including one or more instructions, and the one or more instructions can be executed by the processor 1901 of the electronic device to complete the trigger signal sending method in the above embodiment.

[0268] It should be noted that when the instructions in the above-mentioned computer-readable storage medium or one or more instructions in the computer program product are executed by the processor of the electronic device, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect as the above-mentioned method can be achieved. To avoid repetition, they will not be repeated here.

[0269] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0270] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0271] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0272] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0273] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD and other media that can store program code.

[0274] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A trigger signal sending method, characterized in that: The method comprises: In response to the trigger request, storing short pulse width modulation code configuration data in a data buffer area, the short pulse width modulation code configuration data including a sending configuration parameter of a short pulse width modulation code trigger signal requested by the trigger request; Based on the short pulse width modulation code configuration data in the data buffer area, the short pulse width modulation code trigger signal is sent to the sensor.

2. The method according to claim 1, characterized in that: The sending configuration parameter includes an interval time threshold, and the interval time threshold is the minimum time interval from the last sending of the short pulse width modulation code trigger signal; The step of sending the short pulse width modulation code trigger signal to the sensor based on the short pulse width modulation code configuration data in the data buffer area comprises: After the time interval from the last sending of the short pulse width modulation code trigger signal reaches the interval time threshold, the short pulse width modulation code trigger signal is sent to the sensor.

3. The method according to claim 2, characterized in that The interval time threshold is determined based on the data nibble length and the number of data nibbles corresponding to the sensor.

4. The method according to claim 2, characterized in that: The transmission configuration parameters also include the pulse length of the short pulse width modulation code trigger signal.

5. The method according to claim 4, characterized in that After the time interval from the last sending of the short pulse width modulation code trigger signal reaches the interval time threshold, sending the short pulse width modulation code trigger signal to the sensor includes: After the time interval from the last sending of the short pulse width modulation code trigger signal reaches the interval time threshold, the short pulse width modulation code trigger signal is sent according to the pulse length of the short pulse width modulation code trigger signal.

6. The method according to claim 5, characterized in that The step of sending the short pulse width modulation code trigger signal according to the pulse length of the short pulse width modulation code trigger signal comprises: Switching the level state of the signal line connected to the sensor from the first level to the second level to start sending the short pulse width modulation code trigger signal; When the pulse length of the short pulse width modulation code trigger signal is reached, the level state of the signal line connected to the sensor is switched from the second level to the first level to stop sending the short pulse width modulation code trigger signal.

7. The method according to claim 1, characterized in that The step of sending the short pulse width modulation code trigger signal to the sensor based on the short pulse width modulation code configuration data in the data buffer area comprises: In the case that the short pulse width modulation code configuration data is not stored in the shift register in communication with the data buffer area, inputting the earliest stored short pulse width modulation code configuration data into the shift register according to the storage order of the short pulse width modulation code configuration data stored in the data buffer area; Based on the short pulse width modulation code configuration data in the shift register, the short pulse width modulation code trigger signal is sent to the sensor.

8. The method according to claim 7, characterized in that The shift register has a first flag bit, and the first flag bit is used to indicate whether short pulse width modulation code configuration data is stored in the shift register.

9. The method according to claim 8, characterized in that The method further comprises: When the shift register receives the short pulse width modulation code configuration data input from the data buffer area, the first flag bit is set to a third level, and the third level is used to indicate that the short pulse width modulation code configuration data is stored in the shift register; After the short pulse width modulation code trigger signal is sent, the first flag bit is set to a fourth level, and the fourth level is used to indicate that no short pulse width modulation code configuration data is stored in the shift register.

10. The method according to claim 1, characterized in that The data buffer area has a second flag bit, and the second flag bit is used to indicate whether the data buffer area stores short pulse width modulation code configuration data.

11. The method according to claim 10, characterized in that The method further comprises: After storing the short pulse width modulation code configuration data in the data buffer area, setting the second flag bit to a fifth level, the fifth level being used to indicate that the short pulse width modulation code configuration data is stored in the data buffer area; After all the short pulse width modulation code configuration data stored in the data buffer area are input into the shift register, the second flag bit is set to a sixth level, and the sixth level is used to indicate that no short pulse width modulation code configuration data is stored in the data buffer area.

12. The method according to claim 1, characterized in that In response to the trigger request, storing the short pulse width modulation code configuration data in the data buffer area includes: In response to the trigger request, when the free storage amount of the data buffer area is greater than or equal to the data amount of the short pulse width modulation code configuration data, the short pulse width modulation code configuration data is stored in the data buffer area.

13. The method according to claim 11, characterized in that The method further comprises: In response to the trigger request, when the free storage capacity of the data buffer area is less than the data amount of the short pulse width modulation code configuration data, the short pulse width modulation code configuration data is deleted.

14. The method according to claim 1, characterized in that In response to the trigger request, storing the short pulse width modulation code configuration data in the data buffer area includes: In response to the trigger request, when the free storage capacity of the data buffer area is less than the data capacity of the short pulse width modulation code configuration data, deleting the target short pulse width modulation code configuration data in the data buffer area; storing the short pulse width modulation code configuration data in the data buffer area; The target short pulse width modulation code configuration data includes at least one of the following: The earliest stored short pulse width modulation code configuration data; Send the shortest PWM code configuration data with the lowest frequency.

15. A trigger signal sending device, characterized in that: The device comprises: a processing unit and a sending unit, wherein: The processing unit is used to store short pulse width modulation code configuration data in a data buffer area in response to a trigger request, wherein the short pulse width modulation code configuration data includes a sending configuration parameter of a short pulse width modulation code trigger signal requested by the trigger request; The sending unit is used to send the short pulse width modulation code trigger signal to the sensor based on the short pulse width modulation code configuration data in the data buffer.

16. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 14.

17. A communication system, characterized in that: It includes a micro control unit and a sensor, wherein the micro control unit includes a data buffer area and a shift register, the micro control unit is communicatively connected to the sensor, the data buffer area is communicatively connected to the shift register, and the micro control unit transmits a signal to the sensor via a signal line.

18. A vehicle, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method according to any one of claims 1 to 14.

19. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When a computer executes the instruction, the computer performs the method according to any one of claims 1 to 14.

20. A computer program product, comprising instructions, characterized in that: When the instructions are executed on a computer, the computer performs the method according to any one of claims 1 to 14.