Serial port time-sharing multiplexing type infrared thermal imager system communication and program serial port upgrading method

CN117453598BActive Publication Date: 2026-10-27KUNMING INST OF PHYSICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311551063.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2026-10-27
Estimated Expiration
2043-11-21

AI Technical Summary

Technical Problem

在小型化,轻量化的光电系统设计趋势中,对红外子系统的结构包络和质量要求往往越来越严苛,芯数多的连接器在某些特殊结构包络和质量要求下,往往无法满足其设计需求

Benefits of technology

[0032]本发明提供一种串口分时复用型红外热像仪系统通信及程序串口升级方法,该方法将红外热像仪系统通讯串口和程序升级串口复用为同一个,能够分时完成两种功能。特别地,在该设计中,可以通过软件直接配置串口通信数据格式,包括串口通信波特率、数据位长度、起始位长度、停止位长度和校验形式。该串口分时复用的设计不仅减少了红外热像仪与外部系统连接电气接口的信号数,同时还减少了系统资源占用,另外采用该方法还能兼容不同红外热像仪对系统通讯和软件升级串口通信格式的要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117453598B_ABST
    Figure CN117453598B_ABST
Patent Text Reader

Abstract

The present application relates to serial port time division multiplexing infrared thermal imager system communication and program serial port upgrading method, belongs to infrared thermal imaging technical field. The method multiplexes the infrared thermal imager system communication serial port and program upgrading serial port into the same, can complete two functions in time division;To switch into serial port program upgrading communication, first send a switching serial port program upgrading control instruction to system communication, system communication parses and executes the command, no longer responds to the number of system communication analysis function, only responds to the number of program upgrading communication analysis function;Then serial port program upgrading is carried out. The design of the serial port time division multiplexing not only reduces the number of signal of the electrical interface of infrared thermal imager and external system connection, but also reduces the system resource occupation, in addition, the method can also compatible with different infrared thermal imager to system communication and software upgrading serial port communication format requirement, easy to popularization and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of infrared thermal imaging technology, specifically relating to a serial port time-division multiplexing infrared thermal imager system communication and program serial port upgrade method. Background Technology

[0002] Currently, with the vigorous development of optoelectronic systems in applications such as search, tracking, surveillance, and early warning, infrared thermal imagers, thanks to their thermal radiation imaging mechanism which does not depend on light, have good observation effects both day and night. They are often used as optoelectronic systems in conjunction with other optoelectronic systems such as visible light and radar in large-scale optoelectronic systems.

[0003] For large-scale optoelectronic systems, sufficient electrical connection pins are required for the electrical connections between various imaging subsystems and the upper-level system, including serial port interaction, software serial port upgrades, image transmission, power supply, and synchronization control. Existing infrared subsystems typically have two serial ports in their hardware design: one for software upgrades and one for communication with the upper-level system. However, software upgrades and communication tasks cannot coexist. Therefore, connectors with a higher pin count are often chosen as the electrical interface. Connectors with a higher pin count often require more space and are heavier. In the trend towards miniaturized and lightweight optoelectronic system design, the structural envelope and quality requirements for infrared subsystems are becoming increasingly stringent. Connectors with a higher pin count often cannot meet the design requirements for certain special structural envelopes and quality constraints.

[0004] Therefore, overcoming the shortcomings of existing technologies is a problem that urgently needs to be solved in the field of infrared thermal imaging technology. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and meet the requirements of miniaturization and lightweight design of the entire optoelectronic system. It provides a serial port time-division multiplexing method for communication and program serial port upgrades in an infrared thermal imager system. This invention multiplexes the infrared subsystem communication serial port and the software upgrade serial port into one, enabling the two functions to be completed in a time-division manner. This reduces the number of serial ports by one, i.e., 5 signal lines in total: 2 differential signals and 1 ground signal.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] The communication and program serial port upgrade method for a serial port time-division multiplexed infrared thermal imager system includes the following steps:

[0008] Step (1): Design a serial port for the infrared thermal imager hardware imaging circuit. The serial port is connected to the imaging circuit FPGA. Configure the imaging circuit software using the Uartns550 IP core.

[0009] Step (2): The imaging circuit software initializes and performs self-test configuration on the serial port;

[0010] Step (3): The imaging circuit software configures the serial port for interrupt control.

[0011] Step (4): The imaging circuit software performs custom configuration of the serial communication data format of the serial port;

[0012] Step (5): The imaging circuit software sets the interrupt data reception function of the serial port system communication and stores the data received by the serial port into a global array.

[0013] Step (6): The imaging circuit software sets the data receiving and parsing function of the system communication, and performs data verification and parsing on the data received in step (5) according to the communication protocol of the system communication. Data that does not meet the communication protocol format of the system communication is skipped directly and no specific function is executed.

[0014] Step (7): The imaging circuit software sets the command execution function for system communication after the data is correctly parsed, and executes the corresponding function of system communication according to the command bytes of the correct data after verification.

[0015] Step (8): The imaging circuit software sets the data receiving and parsing function for program upgrade communication. According to the communication protocol of program upgrade communication, the data received in step (5) is verified and parsed. Data that does not meet the format of program upgrade communication protocol is skipped directly and no specific function is executed. The imaging circuit software sets the command execution function for program upgrade communication after the data is parsed correctly. The corresponding function of system communication is executed according to the command byte of the data that is verified and correct.

[0016] Step (9): When switching to serial port program upgrade communication, first send a command to the system communication to switch to serial port program upgrade control. After the system communication parses and executes the command, it will no longer respond to the data receiving parsing function of the system communication, but only respond to the data receiving parsing function of the program upgrade communication.

[0017] Step (10) involves performing serial port program upgrade control, specifically burning the bin file used for program update to the program startup address segment corresponding to the infrared imaging circuit FLASH.

[0018] Step (11) is to upgrade the serial port program. The specific process is to first communicate and handshake, and then erase the program startup address segment corresponding to FLASH after the handshake is successful. After the erasure is successful, the data in the bin file is written to the address segment that was successfully erased.

[0019] Step (12): After the upgrade is completed, power off and restart the infrared thermal imager. The imaging circuit FPGA will read the updated program from the program startup address segment corresponding to FLASH, thus completing the loading of the new program. The new program responds to system communication by default.

[0020] Step (13): When the imaging circuit software needs to be updated again, repeat steps (9) to (12).

[0021] Furthermore, preferably, in step (1), the IP core used by the serial port of the imaging circuit FPGA configuration imaging circuit software is Uartns550.

[0022] Furthermore, preferably, in step (4), the serial communication data format includes serial communication baud rate, data bit length, start bit length, stop bit length and check form. This serial communication data format can be customized by the user according to the different communication methods of the infrared thermal imager system.

[0023] Furthermore, preferably, in step (6), during the verification and parsing, the parsed data consists of the frame header and the checksum.

[0024] Furthermore, preferably, in step (7), the functions include self-test, reading the current working temperature, reading the current integration time level, setting the integration time selection to automatic, setting the integration time selection to manual, and switching to serial port program upgrade control.

[0025] In step (2) of this invention, the imaging circuit software uses the UART550 IP core’s built-in driver functions XUartNs550_Initialize() and XUartNs550_SelfTest() to initialize and self-test the serial port respectively;

[0026] In step (3) of this invention, the imaging circuit software uses the member functions XIntc_Initialize(), XIntc_Connect(), XIntc_Start(), XIntc_Enable(), XUartNs550_SetHandler(), and XUartNs550_SetOptions() provided by the UART550 IP core to configure interrupt control for the serial port.

[0027] In step (4) of this invention, the imaging circuit software uses the member function XUartNs550_SetDataFormat() built into the UART550 IP core to customize the serial communication data format of the serial port;

[0028] In step (7) of this invention, "correct parsing" refers to data that meets the communication protocol format.

[0029] In this invention, the serial communication data format includes serial communication baud rate, data bit length, start bit length, stop bit length, and parity check. This serial communication data format can be customized by the user according to the different communication methods of the infrared thermal imager system.

[0030] This invention multiplexes the infrared thermal imager system's communication serial port and program upgrade serial port into a single port, enabling time-sharing of both functions. The serial port system communication data format can be directly configured via software, including the serial communication baud rate, data bit length, start bit length, stop bit length, and parity format. To switch to serial port program upgrade communication, a command to switch to serial port program upgrade control is first sent to the system communication. After the system communication parses and executes this command, it no longer responds to the system communication's data reception parsing function, but only to the program upgrade communication's data reception parsing function. The serial port program upgrade process involves first establishing a communication handshake, and after a successful handshake, erasing the corresponding program startup address segment of the FLASH memory. After successful erasure, the data in the bin file is written to the successfully erased address segment.

[0031] Compared with the prior art, the beneficial effects of this invention are as follows:

[0032] This invention provides a serial port time-division multiplexing method for communication and program upgrades in infrared thermal imager systems. This method multiplexes the infrared thermal imager system's communication serial port and the program upgrade serial port into a single port, enabling the two functions to be performed in a time-division manner. Specifically, in this design, the serial communication data format, including the serial communication baud rate, data bit length, start bit length, stop bit length, and parity check, can be directly configured via software. This serial port time-division multiplexing design not only reduces the number of signals at the electrical interfaces connecting the infrared thermal imager to external systems but also reduces system resource consumption. Furthermore, this method is compatible with the serial communication format requirements of different infrared thermal imagers for system communication and software upgrades.

[0033] Compared with existing technologies, reusing the communication serial port and program upgrade serial port of the infrared thermal imager system into one can reduce the number of connector cores used in the electrical interface of the infrared thermal imager. Connectors with fewer cores have advantages in structural envelope and quality. This allows for more flexible structural and spatial design of the infrared subsystem for optoelectronic systems with special structural envelope and quality requirements. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the communication process of the multiplexed serial port software configuration system of the present invention;

[0035] Figure 2 This is a flowchart illustrating the process of executing system communication commands or switching to serial port program upgrade control function via system communication commands using the multiplexed serial port of the present invention.

[0036] Figure 3 A schematic diagram illustrating the specific execution process of the serial port program upgrade function. Detailed Implementation

[0037] The present invention will now be described in further detail with reference to the embodiments.

[0038] Those skilled in the art will understand that the following embodiments are for illustrative purposes only and should not be construed as limiting the scope of the invention. Where specific techniques or conditions are not specified in the embodiments, they are performed in accordance with the techniques or conditions described in the literature in the field or according to the product instructions. Materials or equipment whose manufacturers are not specified are all conventional products that can be obtained by purchase.

[0039] like Figures 1-3 As shown, the communication and program serial port upgrade method for a serial port time-division multiplexed infrared thermal imager system includes the following steps:

[0040] Step (1): Design a serial port for the infrared thermal imager hardware imaging circuit. The serial port chip can be the domestic chip SM3490. The imaging circuit FPGA uses the Xilinx K7 series. Connect the input and output terminals of the serial port chip to the control pins of the imaging circuit FPGA. Configure the imaging circuit software using the FPGA. The IP core used for this serial port is Uartns550. Define a Uart of type XUartNS550 in the imaging software.

[0041] XUartNs550 Uart_System; / / Defines a Uart of type XUartNS550: Uart_System

[0042] Step (2): The imaging circuit software uses the UART550 IP core’s built-in driver functions XUartNs550_Initialize() and XUartNs550_SelfTest() to initialize and self-test the serial port respectively.

[0043] XUartNs550_Initialize(&Uart_System,XPAR_AXI_UART16550_0_DEVICE_ID); / / Serial port initialization

[0044] XUartNs550_SelfTest(&Uart_System); / / Serial port self-test

[0045] Step (3): The imaging circuit software uses the member functions XIntc_Initialize(), XIntc_Connect(), XIntc_Start(), XIntc_Enable(), XUartNs550_SetHandler(), and XUartNs550_SetOptions() provided by the UART550 IP core to configure the interrupt control of the serial port.

[0046] XIntc_Initialize(&InterruptController,INTC_DEVICE_ID); / / Interrupt initialization

[0047] XIntc_Connect(&InterruptController,XPAR_INTC_0_UARTNS550_0_VEC_ID,

[0048] (XInterruptHandler)XUartNs550_InterruptHandler,(void*)&Uart_System); / / Interrupt connection

[0049] XIntc_Start(&InterruptController, XIN_REAL_MODE); / / Interrupts begin with XIN_REAL_MODE.

[0050] XIntc_Enable(&InterruptController,XPAR_INTC_0_UARTNS550_0_VEC_ID); / / Enable interrupt.

[0051] `XUartNs550_SetHandler(&Uart_System,System_UART16550_Handler,&Uart_System);` / / Sets the interrupt function `System_UART16550_Handler()` that matches the UART.

[0052] XUartNs550_SetOptions(&Uart_System,(XUN_OPTION_RESET_RX_FIFO|XUN_OPTION_DATA_INTR|XUN_OPTION_FIFOS_ENABLE)); / / Set interrupt operation mode

[0053] Step (4): The imaging circuit software customizes the serial communication data format of the Uartns550 serial port. This step allows users to freely set the serial communication data format, including the serial communication baud rate, data bit length, start bit length, stop bit length, and parity. The serial communication data format can be customized by the user according to the different communication of the infrared thermal imager system. For example, the serial communication baud rate is 460800bps, the number of valid data bits is 8, the start bit length is 1 bit, the data parity is odd parity, and the stop bit is 1 bit.

[0054] AXI_UART16550_Format.BaudRate = 460800; / / Serial port baud rate setting, baud rate set to 460800

[0055] AXI_UART16550_Format.DataBits = XUN_FORMAT_8_BITS; / / Set the number of valid bits for the serial port, setting the valid bits to 8.

[0056] AXI_UART16550_Format.Parity = XUN_FORMAT_NO_PARITY; / / Serial port verification mode setting, set to no verification.

[0057] AXI_UART16550_Format.StopBits = XUN_FORMAT_1_STOP_BIT; / / Serial port stop bit setting, 1 for stop bit

[0058] XUartNs550_SetDataFormat(&Uart_System,&AXI_UART16550_Format); / / Serial communication format setting function

[0059] Step (5): The imaging circuit software sets the interrupt receiving function System_UART16550_Handler() for the system communication of the Uartns550 serial port, and stores the data received by the serial port into a global array UartSystemBuffer

[2000] .

[0060]

[0061] Step (6): The imaging circuit software sets the data receiving and parsing function of the system communication. According to the communication protocol of the system communication, the data received in step (5), i.e., the global array, is parsed and verified. Specifically, the data of the global array UartSystemBuffer

[2000] is parsed as the frame header and checksum. The frame header, i.e., UartSystemBuffer[0] and UartSystemBuffer[1], must be 0x55 and 0xAA, respectively. The checksum must be equal to the unsigned arithmetic sum of the first 4 bytes and the lower 8 bits in Table 1. Data that does not meet the communication protocol format shown in Table 1 is skipped and no specific function is executed.

[0062] Table 1 System Control Communication Protocol

[0063]

[0064]

[0065] The Uartns550CommandCheck() function for receiving data is as follows: If the number of received data items is not 5, it's considered a communication count error and skipped directly; if the frame header is not 0x55 or 0xAA, it's considered a frame header error and skipped directly; if the lower 8 bits of the current 4-byte unsigned arithmetic sum are not equal to the 5th received data item, it's considered a checksum error and skipped directly. Once all received communication data satisfies the above conditions correctly, the system communication parsing is confirmed as correct and the valid flag is set to true, triggering the subsequent command execution function after correct parsing.

[0066]

[0067]

[0068] Step (7): The imaging circuit software sets the command execution function after the data parsing is correct. Based on the command bytes of the correct data after verification, it executes different functions of system communication, as shown in Table 2. When the received instruction is correct, it will execute the corresponding function according to its command bytes, such as performing the infrared thermal imager system self-test, reading the current working temperature, reading the current integration time level, etc.

[0069] Table 2 Examples of the functions corresponding to specific system communication commands

[0070] 1 Self-check 0x01 2 Read the current operating temperature 0x02 3 Read the current points time level 0x03 4 Set the points time to automatic. 0x04 5 Set the points accumulation time to manual. 0x05 6 Switch to serial port program upgrade control 0x06

[0071] The correctly parsed execution function Uartns550CommandExecute() is as follows. It executes different functions based on different cases corresponding to the command word, with each function corresponding to a separate function body. Specifically, the function body for switching to serial port program upgrade control UARTSystemOrFlashWRControl() is also provided. After executing this function body, the global variable GlobalVar.Uart_debug_enter_flag is set to valid, thereby activating the reception of data for online program upgrade control.

[0072]

[0073]

[0074] Step (8), similar to system communication, program upgrade communication also has corresponding data parsing functions and command execution functions after correct data parsing;

[0075]

[0076] Specifically: The imaging circuit software sets the data receiving and parsing function for program upgrade communication, and performs data verification and parsing on the data received in step (5) according to the communication protocol of program upgrade communication. Data that does not meet the program upgrade communication protocol format is skipped directly and no specific function is executed; The imaging circuit software sets the command execution function for program upgrade communication after the data is parsed correctly, and executes the corresponding functions of system communication according to the command bytes of the correct data after verification, including program online upgrade handshake, FLASH erasure stage, and FLASH burning stage;

[0077] Step (9) is to switch to serial port program upgrade communication. First, send an instruction to the system communication to switch to serial port program upgrade control, as shown in Table 2. When the command byte of the received instruction is 0x06, the switch to serial port program upgrade control is executed. The system communication data receiving and parsing function is no longer responded to, but only the data receiving and parsing function of the program upgrade communication is responded to.

[0078] Step (10), the serial port program upgrade control function is to burn the bin file used for program update to the program start address segment corresponding to the infrared imaging circuit FLASH;

[0079] Step (11) The serial port program upgrade process is to first communicate and handshake. After the handshake is successful, the corresponding program startup address segment of FLASH is erased. After the erasure is successful, the data in the bin file is written to the address segment that was successfully erased. As shown in Table 3, this is the serial port program upgrade communication protocol. The corresponding function is executed according to different command bytes.

[0080] Table 3 Serial Port Program Upgrade Communication Protocol

[0081] 1 Frame header Ushort 2 0x53 0x4C (Send 0x53 first, then 0x4C) 2 command word Uchar 1 3 parameter Uchar N 4 Checksum Uchar 1 The first (N+3) bytes of unsigned arithmetic summation of the lower 8 bits.

[0082] Table 4 Examples of Specific Commands and Corresponding Functions for Serial Port Program Upgrade

[0083] 1 Communication handshake 0x01 2 Erase the address range where the FLASH program starts. 0x02 3 Write the bin file data into the specified address range of FLASH in 128-byte packets. 0x03 4 Program upgrade complete sign 0x04

[0084] After the upgrade is complete, power off and restart the infrared thermal imager. The imaging circuit FPGA will then read the updated program from the corresponding program boot address segment in the FLASH memory, thus completing the loading of the new program. The new program will respond to system communication by default.

[0085] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for communication and program serial port upgrade of a serial port time-division multiplexed infrared thermal imager system, characterized in that, Includes the following steps: Step (1): Design a serial port for the infrared thermal imager hardware imaging circuit, and connect the serial port to the imaging circuit FPGA; configure the imaging circuit software on the imaging circuit FPGA, and use the Uartns550 IP core for the serial port; Step (2): The imaging circuit software initializes and performs self-test configuration on the serial port; Step (3): The imaging circuit software configures the serial port for interrupt control. Step (4): The imaging circuit software customizes the serial communication data format of the serial port. Step (5): The imaging circuit software sets the interrupt data reception function of the serial port system communication and stores the data received by the serial port into a global array; Step (6): The imaging circuit software sets the data receiving and parsing function of the system communication, and performs data verification and parsing on the data received in step (5) according to the communication protocol of the system communication. Data that does not meet the communication protocol format of the system communication is skipped directly and no specific function is executed. Step (7): The imaging circuit software sets the command execution function for system communication after the data parsing is correct, and executes the corresponding function of system communication according to the command bytes of the correct data after verification; Step (8): The imaging circuit software sets the data receiving and parsing function for program upgrade communication. According to the communication protocol of program upgrade communication, the data received in step (5) is verified and parsed. Data that does not meet the format of program upgrade communication protocol is skipped directly and no specific function is executed. The imaging circuit software sets the command execution function for program upgrade communication after the data is parsed correctly. The corresponding function of program upgrade communication is executed according to the command byte of the data that is verified and correct. Step (9): When switching to serial port program upgrade communication, first send a command to the system communication to switch to serial port program upgrade control. After the system communication parses and executes the command, it will no longer respond to the data receiving parsing function of the system communication, but only respond to the data receiving parsing function of the program upgrade communication. Step (10) involves performing serial port program upgrade control, specifically burning the bin file used for program update to the program startup address segment corresponding to the infrared imaging circuit FLASH. Step (11) is to upgrade the serial port program. The specific process is to first communicate and handshake, and then erase the program startup address segment corresponding to FLASH after the handshake is successful. After the erasure is successful, the data in the bin file is written to the address segment that was successfully erased. Step (12): After the upgrade is completed, power off and restart the infrared thermal imager. The imaging circuit FPGA will read the updated program from the program startup address segment corresponding to FLASH, thus completing the loading of the new program. The new program responds to system communication by default. Step (13): When the imaging circuit software needs to be updated again, repeat steps (9) to (12). In step (4), the serial communication data format includes serial communication baud rate, data bit length, start bit length, stop bit length and check form. This serial communication data format can be customized by the user according to the different communication of the infrared thermal imager system.

2. The serial port time-division multiplexing infrared thermal imager system communication and program serial port upgrade method according to claim 1, characterized in that, In step (6), during the verification and parsing process, the parsed data consists of the frame header and the checksum.

3. The serial port time-division multiplexing infrared thermal imager system communication and program serial port upgrade method according to claim 1, characterized in that, In step (7), the functions include self-test, reading the current working temperature, reading the current integration time level, setting the integration time selection to automatic, setting the integration time selection to manual, and switching to serial port program upgrade control.