A dual-redundant SSI interface sensor signal acquisition system and method based on a single MCU
By using a single microcontroller chip with dual SPI peripherals and a differential module to achieve parallel acquisition of dual-redundant SSI interface sensor signals, the problems of high hardware cost, large size and poor real-time performance are solved. This enables efficient and accurate fault diagnosis and real-time monitoring, and is suitable for high-reliability applications such as aerospace and high-speed rail.
Patent Information
- Application Number
- CN202611419603.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-10
AI Technical Summary
Existing dual-redundant SSI interface sensor signal acquisition solutions suffer from high hardware costs, large size, poor real-time performance, and crude fault diagnosis capabilities, especially in application scenarios with strict limitations on size and power consumption.
The system uses two SPI peripherals of a single microcontroller chip to achieve parallel acquisition of dual-channel high-precision SSI signals. Synchronous acquisition is ensured through hardware-level clock sharing and chip select sharing mechanisms, and signal conversion is achieved using a differential module. Real-time monitoring and display are performed in conjunction with a dedicated host computer.
Significantly reduces hardware costs and PCB board area, improves the real-time performance and consistency of data sampling, enables refined fault diagnosis, and enhances system applicability and flexibility.
Smart Images

Figure CN123067302A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation measurement and control technology, and in particular to a dual-redundant SSI interface sensor signal acquisition system and method based on a single MCU. Background Technology
[0002] The SSI interface is a widely used digital communication interface for high-precision sensors and has significant application value in the field of industrial automation measurement and control. In applications with extremely stringent system reliability requirements, such as aerospace and high-speed rail, including aircraft servo control systems and high-speed rail bogie condition monitoring, a dual-redundancy design is typically adopted. This involves simultaneously acquiring the same physical quantity through two independent interfaces, providing mutual backup and effectively improving system safety and reliability.
[0003] Existing dual-redundant SSI interface sensor signal acquisition solutions typically rely on two independent microcontrollers to acquire two SSI signals separately, or use field-programmable gate arrays (FPGAs) to achieve parallel timing control. While this enables synchronous acquisition of dual signals, it significantly increases hardware costs, occupies a large area of the printed circuit board, and leads to higher system power consumption. The structural flaws of this approach are particularly pronounced in applications with strict limitations on size and power consumption. Summary of the Invention
[0004] The purpose of this invention is to provide a dual-redundant SSI interface sensor signal acquisition system and method based on a single MCU, so as to solve the technical problems of high hardware cost, large size, poor real-time performance and crude fault diagnosis capability in existing dual-redundant SSI interface sensor signal acquisition schemes.
[0005] One aspect of the present invention provides a dual-redundant SSI interface sensor signal acquisition system based on a single MCU, including a power control module, a communication module, a microcontroller module, and a differential module; the microcontroller module is a single microcontroller chip, which includes a first SPI peripheral, a second SPI peripheral, a UART peripheral, and multiple general-purpose input / output pins, wherein the first SPI peripheral is configured in master mode and the second SPI peripheral is configured in slave mode;
[0006] The chip select pin of the first SPI peripheral is shorted in hardware with the chip select pin of the second SPI peripheral; the clock pin of the first SPI peripheral is shorted in hardware with the clock pin of the second SPI peripheral and is connected to the clock signal terminal of the differential module; the master input / slave output pin of the first SPI peripheral is used to receive the data signal from sensor A; the master output / slave input pin of the second SPI peripheral is used to receive the data signal from sensor B; the differential module uses an RS422 transceiver to convert between single-ended and differential signals.
[0007] The differential module includes four sets of differential signal interfaces:
[0008] The first group consists of the differential SSI clock signals DIFF_CLK_A+ and DIFF_CLK_A- connected to sensor A;
[0009] The second group consists of the differential SSI data signals DIFF_DATA_A+ and DIFF_DATA_A- from sensor A.
[0010] The third group consists of the differential SSI clock signals DIFF_CLK_B+ and DIFF_CLK_B- of sensor B;
[0011] The fourth group consists of the differential SSI data signals DIFF_DATA_B+ and DIFF_DATA_B- from sensor B.
[0012] In some embodiments, the power control module receives externally input power signals through the external power interface P1 and provides operating power to the system, thereby enabling independent control of the power supplies for sensor A and sensor B.
[0013] In some embodiments, the MCU_PWR_E1 pin of the microcontroller module outputs a control signal to the power control module to control the power supply of sensor A to be turned on and off.
[0014] In some embodiments, the MCU_PWR_E2 pin of the microcontroller module outputs a control signal to the power control module to control the switching on and off of the power supply to sensor B.
[0015] In some embodiments, the communication module is a USB-to-serial module, which connects to a dedicated host computer via USB interface P2 and performs bidirectional serial communication with the microcontroller module via the UART peripheral.
[0016] Another aspect of the present invention provides a method for acquiring signals from a dual-redundant SSI interface sensor based on a single MCU, comprising:
[0017] The system is initialized by initializing and configuring the two SPI peripherals of the microcontroller module. The first SPI peripheral is initialized to SPI master mode and the second SPI peripheral is initialized to SPI slave mode. At the same time, the UART peripheral is initialized to establish a communication link with the dedicated host computer.
[0018] Synchronous acquisition triggers the microcontroller module to initiate a data reading operation through the first SPI peripheral. The chip select pin of the first SPI peripheral is pulled low. Since the chip select pin of the first SPI peripheral and the chip select pin of the second SPI peripheral are shorted in hardware, the second SPI peripheral is selected at the same time.
[0019] Data is received synchronously. The first SPI peripheral generates a clock signal and sends it to the differential module. Since the clock pin of the first SPI peripheral is shorted in hardware with the clock pin of the second SPI peripheral, the second SPI peripheral receives this clock signal synchronously. Sensor A and sensor B transmit data back simultaneously under the action of this clock signal. After the data is converted into single-ended signals by the differential module, the first SPI peripheral receives the data from sensor A through its master input / slave output pin, and the second SPI peripheral receives the data from sensor B through its master output / slave input pin.
[0020] In data acquisition and processing, the microcontroller module reads the data buffers of the first and second SPI peripherals respectively to obtain data signals sampled simultaneously by sensor A and sensor B. The microcontroller module performs CRC check processing on the acquired data signals. After the check passes, the microcontroller module encapsulates the two data streams according to the agreed data format to generate a data packet including a timestamp, sensor A data, sensor B data, and check information. In the data forwarding phase, the microcontroller module sends the encapsulated data packet to a dedicated host computer via the UART peripheral.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] 1. Parallel acquisition of dual high-precision SSI signals is achieved by using two SPI peripherals of a single microcontroller chip, eliminating the need for two independent microcontroller chips or field-programmable gate array chips, significantly reducing hardware costs and PCB board area, while effectively reducing system power consumption;
[0023] 2. By using a hardware-level clock sharing and chip select sharing mechanism, the first SPI peripheral and the second SPI peripheral are ensured to work in a completely synchronized state, enabling them to sample data from sensor A and sensor B at the same time. This completely eliminates the time delay problem caused by the software polling method and ensures the real-time performance and consistency of data sampling.
[0024] 3. By using a dedicated host computer to monitor and display the two signals of the dual-redundant SSI interface sensor in real time, the consistency of the two sensor outputs can be compared intuitively, enabling accurate judgment of the consistency problem of the two sensor outputs. Compared with the existing solutions that can only judge signal loss and data jumps with coarse diagnostic capabilities, the fault diagnosis of this invention is more refined.
[0025] 4. Through the configuration function of the dedicated host computer, it can adapt to the acquisition of SSI signals with different data bit widths, enhance the applicability and flexibility of the system, and improve the work efficiency of relevant test personnel. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is an architecture diagram of the dual-redundant SSI interface sensor signal acquisition system based on a single MCU according to the present invention;
[0028] Figure 2 This is a circuit diagram of the data acquisition system of the present invention;
[0029] Figure 3 This is a flowchart of the dual-redundant SSI interface sensor signal acquisition method based on a single MCU according to the present invention;
[0030] Figure 4 This is a schematic diagram of the data acquisition method of the present invention. Detailed Implementation
[0031] The following will be based on embodiments of the present invention. Figures 1-4 The technical solutions in the embodiments of the present invention will be clearly and completely described together. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0032] Example 1
[0033] The dual-redundant SSI interface sensor signal acquisition system based on a single MCU in this embodiment includes a power control module, a microcontroller module, a communication module, and a differential module.
[0034] The power control module receives external power signals via external power interface P1, specifically including two 5V power supplies, PWR_5V_A and PWR_5V_B, and a ground wire, PWR_GND. The power control module integrates a power management circuit, which converts the input 5V power into the voltages required by the system and outputs them. The MCU_5V_A and MCU_5V_B power supplies respectively power the microcontroller module and are connected to sensor A interface 8 and sensor B interface respectively, providing independent operating power for sensor A and sensor B.
[0035] The power control module also receives MCU_PWR_E1 and MCU_PWR_E2 control signals from the microcontroller module. These two control signals are used to control the power supply of sensor A and sensor B respectively, enabling independent management of the two sensor power supplies. The external power interface P1 uses a standard power connector, supports hot-swapping, and facilitates on-site installation and maintenance.
[0036] The communication module employs a USB-to-serial bridging scheme, connecting to a dedicated host computer via USB interface P2. USB interface P2 uses a standard Micro-USB or Type-C interface, providing stable 5V power and high-speed data transmission. During operation, the communication module obtains STU_5V and STU_GND from USB interface P2 as its operating power, and simultaneously converts the USB protocol to the UART protocol via an internal USB-to-UART bridge chip. The UART signal lines of the communication module connect to corresponding pins of the microcontroller module. Specifically, the MCU_UART_RX pin receives control commands and configuration parameters from the host computer, and the MCU_UART_TX pin sends acquired sensor data to the dedicated host computer. The communication module also provides operating voltage to the microcontroller module and differential module, outputting 3.3V through an internal voltage regulator circuit. The debugging interface P3 is used to connect an emulator or debugger, facilitating program burning and online debugging during the development phase.
[0037] The microcontroller module is implemented using a single high-performance 32-bit microcontroller chip. Internally, the module integrates two independent SPI peripherals, labeled SPI1 (Master Peripheral) and SPI2 (Slave Peripheral). SPI1 (Master Peripheral) is configured in master mode, responsible for initiating SPI communication and generating clock signals; SPI2 (Slave Peripheral) is configured in slave mode, responsible for receiving data from another sensor. This master-slave configuration utilizes the clock and data transmission mechanisms of SPI communication, achieving synchronous acquisition of dual signals through clever hardware-level connections.
[0038] Regarding the hardware connection of the SPI interface, the microcontroller module adopts a short-circuit scheme to ensure strict synchronization of dual-channel acquisition. The MCU_NSS_A chip select pin and the MCU_NSS_B chip select pin are directly shorted together on the PCB via traces. When the SPI1 master peripheral initiates communication, its chip select pin is pulled low. Since the two pins are shorted, the chip select pin of the SPI2 slave peripheral also goes low, thereby achieving synchronous chip select activation of the two SPI peripherals.
[0039] Similarly, the MCU_SCK_A and MCU_SCK_B clock pins are also shorted together in hardware and connected to the differential module's clock signal terminal DIFF_SCLK_A. When the SPI1 master peripheral generates a clock signal, this clock signal is simultaneously transmitted to the clock pin of the SPI2 slave peripheral, ensuring that the two SPI peripherals operate in a fully synchronized clock domain.
[0040] Regarding data signal connections, the MCU_MISO_A data receive pin of the SPI1 master peripheral is connected to the DIFF_DATA_A signal terminal of the differential module to receive data from sensor A. The MCU_MOSI_B data receive pin of the SPI2 slave peripheral is connected to the DIFF_DATA_B signal terminal of the differential module to receive data from sensor B. This connection method fully utilizes the data reception functions of the MISO pin in SPI master mode and the MOSI pin in slave mode, enabling a single MCU to simultaneously receive data from two independent sensors.
[0041] The microcontroller module's GPIO pins are also configured for power control. The MCU_PWR_E1 pin outputs a control signal to the power control module to turn the power supply to sensor A on or off; the MCU_PWR_E2 pin outputs a control signal to the power control module to turn the power supply to sensor B on or off. Through these two control signals, the system can independently manage the power supplies to the two sensors, turning off the sensor power supply to reduce power consumption when data acquisition is not needed, or isolating the power supply to a faulty sensor to protect the system.
[0042] The differential module uses an RS422 transceiver chip to convert between differential and single-ended signals. The RS422 transceiver offers high interference immunity and long-distance transmission capabilities, making it ideal for industrial applications. The differential module provides four differential signal interfaces to correspond to the complete interface definition of a dual-redundant sensor.
[0043] The first set of differential signal interfaces includes DIFF_CLK_A+ (differential clock positive) and DIFF_CLK_A- (differential clock negative), used to transmit the differential SSI clock signal for sensor A. The SSI interface uses synchronous serial communication; the clock signal is generated by the master device and sent to the slave device, which outputs data bits on the rising or falling edge of the clock. The second set of differential signal interfaces includes DIFF_DATA_A+ (differential data positive) and DIFF_DATA_A- (differential data negative), used to transmit the differential SSI data signal for sensor A. The differential signals are converted to single-ended signals by an RS422 transceiver and then connected to the corresponding pins of the microcontroller module.
[0044] The third set of differential signal interfaces includes DIFF_CLK_B+ (differential clock positive) and DIFF_CLK_B- (differential clock negative), used to transmit the differential SSI clock signal of the sensor B-connector. The fourth set of differential signal interfaces includes DIFF_DATA_B+ (differential data positive) and DIFF_DATA_B- (differential data negative), used to transmit the differential SSI data signal of the sensor B-connector.
[0045] In actual operation, the differential module converts the single-ended clock signal generated by the microcontroller module into a differential signal and sends it to the sensor. At the same time, it converts the differential data signal returned by the sensor into a single-ended signal and sends it to the microcontroller module. The bidirectional signal conversion ensures the integrity and reliability of the signal.
[0046] A dedicated host computer runs dedicated data acquisition and display software, which establishes a communication connection with the dual-redundant SSI interface sensor signal acquisition device via a USB interface. After the software starts, the host computer first sends configuration parameters to the microcontroller module. These parameters include the sensor data bit width, sampling frequency, and CRC checksum method. The microcontroller module then adjusts the operating parameters of the SPI peripheral and the acquisition strategy based on the received configuration parameters.
[0047] Example 2
[0048] This embodiment describes in detail the complete process from system power-on to continuous data acquisition.
[0049] When the dual-redundant SSI interface sensor signal acquisition device is powered on, the microcontroller module first performs system clock initialization, configuring the PLL frequency multiplier and divider to set the system clock to a suitable operating frequency to meet the requirements of high-speed SPI communication. Typically, 72MHz or a higher frequency is chosen to ensure the SPI clock can reach the required speed. After system clock initialization is complete, the microcontroller module further initializes various peripherals, including GPIO port configuration, timer configuration, and interrupt controller configuration.
[0050] During system initialization, the microcontroller module also initializes the UART peripheral to establish a communication link with the dedicated host computer. The UART peripheral is configured with a common baud rate such as 115200bps or 921600bps, 8 data bits, no parity bit, and 1 stop bit. After the UART peripheral initialization is complete, the microcontroller module sends a handshake signal to the host computer via the UART peripheral and waits for the host computer's connection response. After starting its software, the dedicated host computer scans and identifies the connected devices and sends a device query command. Upon receiving the device query command, the microcontroller module returns the device model and version information, completing the handshake process. After a successful handshake, the microcontroller module enters a blocking wait state, waiting for the dedicated host computer to send configuration parameters.
[0051] After the user clicks the "Start Data Acquisition" button, the dedicated host computer sends a configuration frame to the microcontroller module based on the user-defined parameters. This configuration frame includes parameters such as data bit width, sampling frequency, CRC checksum method, and data encapsulation format. The microcontroller module receives and parses the configuration frame, saving the parameters to internal configuration variables. After receiving the configuration parameters, the system enters the SPI and power initialization phase.
[0052] During the SPI and power initialization phase, the microcontroller module first configures the SPI1 master peripheral to operate in master mode. The clock polarity and phase are set to match the communication protocol requirements of the SSI sensor. Typically, SSI sensors use a mode where the clock idle is high and data is sampled on the falling edge of the clock. The SPI1 clock divider is calculated based on the configured sampling frequency to ensure the SPI clock frequency is within the range supported by the sensor. The SPI1 chip select pin is configured as a standard GPIO output to allow software control of pulling the chip select signal low and high.
[0053] Subsequently, the microcontroller module configures the SPI2 slave peripheral to operate in slave mode. SPI2 is configured in slave mode with clock polarity and phase settings identical to SPI1 to ensure synchronized operation. The SPI2 chip select pin is also configured as a standard GPIO output, but because it is hardware-shorted with the SPI1 chip select pin, their chip select signals are actually synchronized. The SPI2 MISO pin is configured as an input to receive data from the B-connector of the sensor. In slave mode, SPI2 itself does not generate a clock; its clock signal is provided by SPI1 via a hardware jumper.
[0054] After the SPI peripheral initialization is complete, the microcontroller module outputs a control signal through the GPIO pin to turn on the sensor power. The MCU_PWR_E1 pin outputs a high-level signal to the power control module, turning on the internal electronic switch of the power control module and supplying PWR_5V_A power to sensor A through the sensor A interface. Similarly, the MCU_PWR_E2 pin outputs a high-level signal to the power control module, and the power control module supplies PWR_5V_B power to sensor B through the sensor B interface.
[0055] After the sensor is powered on, it enters normal working state, begins to respond to the SPI clock and outputs data.
[0056] After the sensor is powered on, the microcontroller module waits for an initialization period, typically tens of milliseconds, to allow the sensor's internal circuitry to stabilize. After the initialization period, the system enters the data acquisition loop phase and begins performing periodic data synchronization acquisition operations.
[0057] During the data acquisition cycle, the microcontroller module first executes a synchronous acquisition trigger operation, pulling the chip select pin of the SPI1 master peripheral low. Since the MCU_NSS_A and MCU_NSS_B pins are shorted in hardware, the chip select pin of the SPI2 slave peripheral also goes low, selecting both SPI peripherals simultaneously. This hardware-level chip select synchronization mechanism ensures strict simultaneity of dual-channel acquisition, avoiding the time difference issues caused by software polling.
[0058] After the chip select signal is pulled low, the SPI1 host peripheral begins to generate a clock sequence. SPI1 generates a corresponding number of clock pulses according to the configured data bit width, and the rising edge of each clock pulse triggers the sensor to output one data bit.
[0059] Because the MCU_SCK_A and MCU_SCK_B pins are shorted in hardware, the SPI2 slave peripheral synchronously receives these clock pulses. Under the action of each clock pulse, the internal shift register of the SPI2 automatically performs a shift operation, shifting and receiving the sensor B-type data input from the MOSI pin.
[0060] Driven by the clock signal generated by SPI1, sensor A converts parallel data into serial data output through a differential module. The RS422 transceiver of the differential module converts the differential data signal into a single-ended signal, which is then transmitted to the MCU_MISO_A pin of the microcontroller module via the DIFF_DATA_A signal line. The SPI1 host peripheral shifts the data from sensor A into its internal data register bit by bit through the MISO pin.
[0061] Meanwhile, sensor B operates under the same clock signal. Another set of RS422 transceivers in the differential module converts the differential data signal from sensor B into a single-ended signal, which is transmitted to the MCU_MOSI_B pin of the microcontroller module via the DIFF_DATA_B signal line. The SPI2 slave peripheral shifts the data from sensor B into the internal shift register one by one via the MOSI pin. Because SPI1 and SPI2 use the exact same clock signal, the two sensor data streams are strictly aligned in time, achieving true synchronous sampling.
[0062] After data synchronization and reception are complete, the chip select pin of the SPI1 master peripheral is pulled high, and the chip select pin of the SPI2 slave peripheral also goes high, ending a complete SPI communication cycle. The microcontroller module reads the data registers of SPI1 and SPI2 respectively to obtain the raw data from sensor A and sensor B. The read operation is implemented by accessing the DR register of the SPI peripheral, and the receive completion flag of the SPI peripheral is cleared during the read operation.
[0063] The microcontroller module performs CRC check processing on the two acquired raw data streams to detect whether errors occurred during data transmission. The CRC check algorithm uses the same generator polynomial as the sensor, typically CRC-8 or CRC-16. During the check, the microcontroller module compares the received data with the CRC checksum attached to the sensor. If the calculated result matches the received checksum, the data transmission is considered correct; otherwise, the data is considered erroneous, the acquired data is discarded, and an error status is marked in subsequent data packets.
[0064] After the verification is successful, the microcontroller module encapsulates the two data streams according to the agreed data format. The data encapsulation format includes fields such as frame header, timestamp, sensor A data, sensor B data, CRC check code, and frame tail.
[0065] The frame header uses a specific byte sequence, such as 0xAA55, to identify the beginning of the data packet. The timestamp field records the time information of this sampling, which can be the system runtime or the RTC timestamp. The timestamp field allows the host computer to accurately know the acquisition time of each frame of data, facilitating subsequent data analysis and alignment processing. The sensor A data and sensor B data fields are filled with the raw data read from SPI1 and SPI2, respectively. The CRC checksum field is filled with the CRC value calculated from the data payload area, used by the host computer to verify data integrity again. The frame tail uses a byte sequence corresponding to the frame header, such as 0x55AA, to identify the end of the data packet.
[0066] After data encapsulation, the microcontroller module sends the encapsulated data packet to a dedicated host computer via the UART peripheral. The UART peripheral uses DMA or interrupt mode for data transmission. The microcontroller module writes the data packet buffer address and length to the UART DMA controller, which automatically completes the serial transmission of data. This method avoids consuming CPU time during data transmission, improving the system's real-time performance.
[0067] After receiving the data packet, the dedicated host computer first performs frame header detection and parsing. The host computer software parses each field according to the encapsulation format, calculates the CRC value of the data payload area, and compares it with the received CRC checksum. If the verification passes, the data from sensor A and sensor B are displayed in real time in the corresponding areas of the interface; if the verification fails, the frame data is discarded and the error information is recorded. The host computer software also calculates the difference or ratio of the two sensor data in real time and compares it with a preset consistency threshold to determine whether the outputs of the two sensors are consistent. If the difference exceeds the threshold, an alarm is triggered, prompting the operator to pay attention to possible sensor malfunctions or consistency issues.
[0068] After the data acquisition cycle is completed, the system returns to the synchronous acquisition trigger and continues to execute the next synchronous acquisition operation. The above process is executed cyclically to achieve continuous real-time acquisition of signals from dual-redundant SSI interface sensors. The acquisition cycle frequency is determined by the configured sampling frequency parameters and can reach several kilohertz or even higher, meeting the needs of high-speed motion measurement scenarios.
[0069] During the cyclic data acquisition process, the microcontroller module continuously monitors the data status of the two sensors. If multiple CRC checks fail consecutively or abnormal data jumps occur, the microcontroller module determines that the sensor may be faulty and reports the fault information to the host computer via serial port. Upon receiving the fault information, the host computer software displays the corresponding alarm on the interface and can trigger a targeted fault diagnosis process.
[0070] The dual-redundant SSI interface sensor signal acquisition method and system based on a single MCU of this invention has wide applicability in practical applications. In the aerospace field, dual-redundant angle sensors and position sensors are widely used in flight control systems. This invention can monitor the output consistency of two sensors in real time, promptly detect sensor faults, and provide accurate fault location information. This invention can achieve reliable acquisition of dual-redundant sensors, meeting the requirements of high-reliability industrial control systems. Simultaneously, this invention can also play an important role in applications such as robot joint control and precision machine tool position detection.
[0071] In summary, this invention achieves parallel acquisition of dual-channel high-precision SSI signals by using two SPI peripherals of a single microcontroller chip, eliminating the need for two independent microcontroller chips or FPGA chips, significantly reducing hardware costs and PCB board area, while also effectively reducing system power consumption.
[0072] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0073] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A dual-redundant SSI interface sensor signal acquisition system based on a single MCU, characterized in that, It includes a power control module, a communication module, a microcontroller module, and a differential module; the microcontroller module is a single microcontroller chip, which includes a first SPI peripheral, a second SPI peripheral, a UART peripheral, and multiple general-purpose input / output pins. The first SPI peripheral is configured in master mode, and the second SPI peripheral is configured in slave mode. The chip select pin of the first SPI peripheral is shorted in hardware with the chip select pin of the second SPI peripheral; the clock pin of the first SPI peripheral is shorted in hardware with the clock pin of the second SPI peripheral and is connected to the clock signal terminal of the differential module; the master input / slave output pin of the first SPI peripheral is used to receive the data signal from sensor A; the master output / slave input pin of the second SPI peripheral is used to receive the data signal from sensor B; the differential module uses an RS422 transceiver to convert between single-ended and differential signals. The differential module includes four sets of differential signal interfaces: The first group consists of the differential SSI clock signals DIFF_CLK_A+ and DIFF_CLK_A- connected to sensor A; The second group consists of the differential SSI data signals DIFF_DATA_A+ and DIFF_DATA_A- from sensor A. The third group consists of the differential SSI clock signals DIFF_CLK_B+ and DIFF_CLK_B- of sensor B; The fourth group consists of the differential SSI data signals DIFF_DATA_B+ and DIFF_DATA_B- from sensor B.
2. The system according to claim 1, characterized in that, The power control module receives external power signals through the external power interface P1 and provides operating power to the system, enabling independent control of the power supplies for sensor A and sensor B.
3. The system according to claim 1, characterized in that, The microcontroller module outputs a control signal from its MCU_PWR_E1 pin to the power control module to control the power supply of sensor A on and off.
4. The system according to claim 1, characterized in that, The microcontroller module outputs a control signal from its MCU_PWR_E2 pin to the power control module to control the switching on and off of the power supply to sensor B.
5. The system according to claim 1, characterized in that, The communication module is a USB-to-serial module, which connects to a dedicated host computer via USB interface P2 and communicates bidirectionally with the microcontroller module via the UART peripheral.
6. A method for acquiring signals from a dual-redundant SSI interface sensor based on a single MCU, characterized in that, include: The system is initialized by initializing and configuring the two SPI peripherals of the microcontroller module. The first SPI peripheral is initialized to SPI master mode and the second SPI peripheral is initialized to SPI slave mode. At the same time, the UART peripheral is initialized to establish a communication link with the dedicated host computer. Synchronous acquisition triggers the microcontroller module to initiate a data reading operation through the first SPI peripheral. The chip select pin of the first SPI peripheral is pulled low. Since the chip select pin of the first SPI peripheral and the chip select pin of the second SPI peripheral are shorted in hardware, the second SPI peripheral is selected at the same time. Data is received synchronously. The first SPI peripheral generates a clock signal and sends it to the differential module. Since the clock pin of the first SPI peripheral is shorted in hardware with the clock pin of the second SPI peripheral, the second SPI peripheral receives this clock signal synchronously. Sensor A and sensor B transmit data back simultaneously under the action of this clock signal. After the data is converted into single-ended signals by the differential module, the first SPI peripheral receives the data from sensor A through its master input / slave output pin, and the second SPI peripheral receives the data from sensor B through its master output / slave input pin. Data acquisition and processing: The microcontroller module reads the data buffers of the first SPI peripheral and the second SPI peripheral respectively to obtain the data signals sampled by sensor A and sensor B at the same time; the microcontroller module performs CRC check processing on the acquired data signals; After successful verification, the microcontroller module encapsulates the two data streams according to the agreed data format, generating a data packet that includes a timestamp, sensor A data, sensor B data, and verification information. During the data forwarding phase, the microcontroller module sends the encapsulated data packet to a dedicated host computer via a UART peripheral.
