Program upgrading and configuration parameter changing method for data recorder

By automatically running the Bootloader program when the data logger is powered on, and automatically upgrading the program and modifying the configuration parameters according to the power supply mode, the problem of frequent upgrades and configuration parameter changes of the data logger is solved, and the convenience and efficiency of operation are improved.

CN120653278APending Publication Date: 2025-09-16SICHUAN STAR GLORY DEFENSE TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510723026.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing data loggers require frequent program upgrades and parameter changes, which are cumbersome and inconvenient to operate, especially due to the lack of automation support under different power supply modes.

Method used

By automatically running the Bootloader program when the data logger is powered on, automatic program upgrades are performed according to different power supply modes, and configuration parameters are modified when the configuration parameter file is detected, automatic upgrade and configuration are achieved by using the power detection pin and SD card operation.

Benefits of technology

It realizes automatic program upgrade and flexible configuration of data loggers under different power supply modes, improves operation convenience and efficiency, and simplifies the parameter change process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653278A_ABST
    Figure CN120653278A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a program upgrading and configuration parameter changing method for a data recorder, and the method comprises the steps: automatically operating a Bootloader program when detecting that the data recorder is powered on, and carrying out initialization; detecting a power supply mode of the data recorder, and judging whether the power supply mode of the data recorder is battery power supply; if power is supplied to the battery, mounting the SD card, and when the binary file of the to-be-upgraded program does not exist in the SD card, skipping to a specified address to start the to-be-upgraded program, and automatically upgrading the program; if the data recorder is not powered by the battery, the data recorder is charged, and when an upgrading demand is detected, a binary file of the program to be upgraded is copied to the SD card, and program upgrading is automatically carried out; when the configuration parameter file is detected, the configuration parameters are modified, the data recorder is configured according to the modified configuration parameters, automatic program upgrading of the data recorder is achieved, and flexible parameter configuration is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for program upgrading and configuration parameter changing of a data recorder. Background Art

[0002] In order to meet the flight controller's need to record various parameters and status information during flight, a data recorder is used for data storage. The data recorder adheres to the design concept of "low cost, modularization, miniaturization, and universality" and uses the outstanding performance STM32 series CPU as the main controller.

[0003] The data logger primarily receives and stores communication data via a serial port or SPI (Serial Peripheral Interface). The storage module uses a large-capacity FLASH chip to store data. Data is written via the serial port or SPI, creating a new data file with each power cycle. Users can quickly and conveniently access data using the USB interface. To access data, users simply plug the data logger into a computer like a regular USB flash drive.

[0004] As a data recorder used in flight vehicles, similar to the "black box" widely used in the aviation industry, its interface must be simple and easy to use. At the same time, it must be able to work normally under the conditions of 30,000g acceleration impact. It also needs to have a certain degree of waterproof function. Therefore, the structural design of the data recorder has as few external interfaces as possible, and the JTAG interface for the product's dedicated debugging and burning program cannot be brought out.

[0005] As a common data storage product in the industry, this data logger uses either a serial port or an SPI communication interface to receive data. Different users have varying data interface requirements, with some requiring a serial port for communication with the data logger, while others prefer an SPI interface. Furthermore, different users have varying requirements for parameters such as the serial port baud rate, parity check method, and SPI communication mode. This results in the data logger requiring frequent program upgrades, including changes and configurations to parameters such as the serial port baud rate and SPI communication mode, to meet the varying configuration requirements of each customer. Summary of the Invention

[0006] In view of this, the present invention provides a method for program upgrade and configuration parameter change of a data recorder to solve the problem of frequent program upgrade and parameter change configuration in the prior art.

[0007] In a first aspect, the present invention provides a method for program upgrade and configuration parameter modification of a data logger, the method comprising:

[0008] When the data logger is detected to be powered on, the Bootloader program will automatically run to initialize.

[0009] Detect the power supply mode of the data logger and determine whether the power supply mode of the data logger is battery-powered;

[0010] If the data logger is powered by a battery, the SD card is mounted. If the binary file of the program to be upgraded does not exist in the SD card, the program to be upgraded is automatically upgraded by jumping to the specified address.

[0011] If the data logger is not powered by a battery, the data logger will be charged. When an upgrade request is detected, the binary file of the program to be upgraded will be copied to the SD card and the program will be upgraded automatically.

[0012] When the configuration parameter file is detected, the configuration parameters are modified, and the data logger is configured according to the modified configuration parameters.

[0013] The present invention automatically runs a Bootloader program when the data recorder is powered on, and realizes automatic program upgrade of the data recorder in different situations of battery power supply and non-battery power supply according to different power supply modes of the data recorder. When a configuration parameter file is detected, the configuration parameters are modified to achieve flexible configuration and strong parameter modifiability.

[0014] In an optional embodiment, determining whether the data recorder is powered by a battery includes:

[0015] Use the power detection pin to detect whether the data logger is powered by battery.

[0016] The present invention detects the power supply mode of the data recorder through the power detection pin, eliminating the step of manually confirming the power supply mode of the data recorder, so as to facilitate program upgrades under different power supply modes.

[0017] In an optional embodiment, after mounting the SD card, the method further includes:

[0018] Determine whether the SD card is initialized successfully;

[0019] If the SD card is not initialized successfully, it will jump directly to the specified address to start the program to be upgraded and automatically upgrade the program.

[0020] The present invention directly jumps to a designated address to start a program to be upgraded when the SD card is not successfully initialized, thereby saving waiting time, quickly entering the automatic upgrade program, automatically implementing program upgrades, and improving efficiency.

[0021] In an optional embodiment, the method further includes:

[0022] If the SD card is initialized successfully, check whether there is a binary file of the program to be upgraded in the SD card;

[0023] If there is a binary file in the SD card, copy the binary file to the partition specified by the program to be upgraded;

[0024] When the binary file is copied, the binary file is deleted and the program to be upgraded is started by jumping to the specified address, and the program upgrade is automatically performed.

[0025] The present invention directly copies the binary file when the SD card is successfully initialized and there is a binary file in the SD card, thereby shortening the loading time and improving the upgrade efficiency. After the copying is completed, the binary file is deleted to release the storage space of the SD card and avoid occupying unnecessary storage resources.

[0026] In an optional embodiment, the method further includes:

[0027] If the SD card is initialized successfully and the binary file of the program to be upgraded does not exist in the SD card, it will directly jump to the specified address to start the program to be upgraded and automatically upgrade the program.

[0028] The present invention improves the efficiency of automatic program upgrade by directly performing automatic program upgrade when the SD card is successfully initialized and the binary file of the program to be upgraded does not exist in the SD card.

[0029] In an optional embodiment, when a configuration parameter file is detected, modifying the configuration parameters and configuring the data logger according to the modified configuration parameters includes:

[0030] After mounting the SD card, detect the configuration parameter file, read the communication parameters, and modify the configuration parameters according to the format definition requirements in the configuration file;

[0031] After the configuration parameters are modified, when the data logger is detected to be powered on, the data logger is configured according to the modified configuration parameters.

[0032] During the use of the data recorder, the present invention can flexibly configure the data recorder according to the modified configuration parameters, and the parameters have high readability and modifiability.

[0033] In a second aspect, the present invention provides a device for program upgrading and configuration parameter modification of a data recorder, the device comprising:

[0034] The initialization module is used to automatically run the Bootloader program for initialization when it detects that the data logger is powered on;

[0035] A first judgment module is used to detect the power supply mode of the data recorder and determine whether the power supply mode of the data recorder is battery-powered;

[0036] The first upgrade module is used to mount the SD card if the data logger is powered by a battery, and if the binary file of the program to be upgraded does not exist in the SD card, jump to a specified address to start the program to be upgraded and automatically upgrade the program;

[0037] The second upgrade module is used to charge the data logger if the data logger is not powered by a battery, and when an upgrade requirement is detected, copy the binary file of the program to be upgraded to the SD card to automatically upgrade the program;

[0038] The parameter configuration module is used to modify the configuration parameters when a configuration parameter file is detected, and configure the data recorder according to the modified configuration parameters.

[0039] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the program upgrade and configuration parameter change method for a data recorder according to the first aspect or any corresponding embodiment thereof.

[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the program upgrade and configuration parameter change method for a data recorder according to the first aspect or any corresponding embodiment thereof.

[0041] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the method for program upgrade and configuration parameter change for a data recorder according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 is a flow chart of a method for program upgrade and configuration parameter modification of a data recorder according to an embodiment of the present invention;

[0044] Figure 21 is a schematic diagram of a process of executing a Bootloader program according to an embodiment of the present invention;

[0045] Figure 3 is a schematic diagram of a Bootloader program configuration according to an embodiment of the present invention;

[0046] Figure 4 is a schematic diagram of a FLASH configuration according to an embodiment of the present invention;

[0047] Figure 5 is a schematic diagram of a user APP FLASH configuration according to an embodiment of the present invention;

[0048] Figure 6 is a structural block diagram of a device for program upgrading and configuration parameter modification of a data recorder according to an embodiment of the present invention;

[0049] Figure 7 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0051] The existing data logger-based program upgrades mainly include the following methods:

[0052] 1. Use the STM32 chip's serial port IAP (In Application Programming) upgrade method; this method uses the chip's built-in boot firmware to upgrade the program through the serial port, and requires the chip's boot pin status to determine whether to upgrade. This program upgrade method requires the chip's boot pin to be brought out and the device to be powered, making it inconvenient to operate.

[0053] 2. Use the USB interface to use DFU (Device Firmware Upgrade) to upgrade. The characteristic of this method is that it can be upgraded using the USB interface, but it requires the use of chip company-specific upgrade tool software. The operation of this tool software requires a certain degree of professionalism and requires the completion of multiple operation steps. For production workers, the operation is difficult and time-consuming.

[0054] The existing communication parameter configuration based on data loggers mainly includes the following methods:

[0055] 1. Send parameters such as baud rate, verification method, and SPI communication mode to the data logger through the serial port according to the agreed protocol. The data logger analyzes these parameters and needs to be reconfigured before it can be used. This operation method requires the user to configure the data logger according to the specified protocol, which increases the workload and is cumbersome.

[0056] 2. Burn different versions of software through the program burning interface.

[0057] To address these issues, embodiments of the present invention provide a method for upgrading a data logger's program and modifying its configuration parameters. By storing configuration parameters in a text file in Flash memory (FLASH), the user simply inserts a USB port to access the file and can modify the corresponding parameters according to the format defined in the file. Once the parameters are modified, the data logger can read the configuration parameters upon powering on, allowing the device to be configured according to the new parameters.

[0058] First, let's introduce the Bootloader automatic boot program and APP application:

[0059] The Bootloader automatic boot program includes USB driver, internal SD card operation program, power control program, etc.

[0060] The APP application is the program to be upgraded and is the software that users actually use and operate.

[0061] According to an embodiment of the present invention, an embodiment of a method for program upgrading and configuration parameter changing of a data recorder is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0062] In this embodiment, a method for program upgrade and configuration parameter change of a data recorder is provided. Figure 1 FIG. 1 is a flow chart of a method for program upgrade and configuration parameter change of a data recorder according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0063] Step S101: When it is detected that the data recorder is powered on, the Bootloader program is automatically run to perform initialization.

[0064] In the embodiment of the present invention, when the data recorder is powered on, the Bootloader program is automatically run, first completing the initialization procedures such as the CPU running clock and interrupt configuration, and then starting to initialize the GPIO, timer, USB, SD card, power supply, FAT file system, etc.

[0065] The FATFS underlying driver mainly performs functions related to disk initialization, sector reading and writing, file system operations (create, open, read, write, and synchronize), logical disk initialization, remaining disk capacity, file copying, folder operations (create, copy, and delete), character encoding conversion, and case conversion.

[0066] SD card driver: mainly completes SD card initialization and operation related functions.

[0067] USB driver: Completes USB OTG (On-The-Go) low-level IO initialization, interrupt setup, and other related functions. Completes USB DCD (Device Controller Driver) initialization, endpoint operations, and other related functions, and completes USB device requests, interface requests, and endpoint requests.

[0068] Step S102 , detecting the power supply mode of the data recorder and determining whether the power supply mode of the data recorder is battery-powered.

[0069] In an embodiment of the present invention, the power supply mode of the data recorder is detected to determine whether the power supply mode of the data recorder is battery powered. The determination result includes battery powered and non-battery powered. Corresponding operations are performed according to the power supply mode.

[0070] Step S103: If the data recorder is powered by battery, the SD card is mounted, and when the binary file of the program to be upgraded does not exist in the SD card, the program to be upgraded is started at the designated address, and the program upgrade is automatically performed.

[0071] In an embodiment of the present invention, if the data recorder is powered by battery, it is first turned on by long pressing the power button, and then the SD card is mounted to check whether there is a binary file of the program to be upgraded in the SD card. If there is no binary file of the program to be upgraded in the SD card, it directly jumps to the specified address to start the program to be upgraded and automatically upgrades the program.

[0072] Step S104: If the data recorder is not powered by a battery, the data recorder is charged, and when an upgrade requirement is detected, the binary file of the program to be upgraded is copied to the SD card, and the program is automatically upgraded.

[0073] In the embodiment of the present invention, Figure 2 As shown, if the data logger is powered by an external power supply (USB) instead of a battery, the data logger is charged and the other end of the USB is plugged into a computer. The internal SD card of the data logger will be used as a USB flash drive. When an upgrade request is detected, the binary file of the program to be upgraded will be copied to the SD card, and the program upgrade will be automatically performed. After the copying is complete or charging is complete, restart the device and unplug the USB cable.

[0074] Step S105 , when the configuration parameter file is detected, the configuration parameters are modified, and the data recorder is configured according to the modified configuration parameters.

[0075] In an embodiment of the present invention, while detecting the upgrade file, the configuration parameter file is also detected. If the configuration parameter file is detected, the configuration parameters are modified. After the parameter modification is completed, the data recorder can read the configuration parameters after powering on and configure the data recorder according to the modified configuration parameters.

[0076] The method for program upgrading and configuration parameter changing of a data recorder provided in this embodiment automatically runs the Bootloader program when the data recorder is powered on. According to different power supply modes of the data recorder, the method realizes automatic program upgrading of the data recorder in different situations of battery power supply and non-battery power supply respectively. When the configuration parameter file is detected, the configuration parameters are modified to realize flexible configuration and strong parameter modifiability.

[0077] In this embodiment, a method for program upgrade and configuration parameter modification of a data logger is provided, and the process includes the following steps:

[0078] Step S201: When it is detected that the data recorder is powered on, the Bootloader program is automatically run to perform initialization.

[0079] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0080] Step S202 , detecting the power supply mode of the data recorder and determining whether the power supply mode of the data recorder is battery-powered.

[0081] Specifically, determining whether the data recorder is powered by a battery in step S202 includes:

[0082] Step S2021: Use the power detection pin to detect whether the data recorder is powered by battery.

[0083] In an embodiment of the present invention, a corresponding relationship between the high and low levels of the power detection pin and the power supply mode is preset. For example, when the data recorder is powered by a USB or other external power supply, the power detection pin is pulled high, and when the data recorder is powered by a battery, the power detection pin is pulled low. This is only an example and is not intended to be limiting, thereby realizing the judgment of the power supply mode of the data recorder.

[0084] The power supply mode of the data logger is detected by the power detection pin, eliminating the step of manually confirming the power supply mode of the data logger, so that the program can be upgraded separately under different power supply modes.

[0085] Step S203: If the data recorder is powered by battery, the SD card is mounted, and when the binary file of the program to be upgraded does not exist in the SD card, the program to be upgraded is started at the designated address, and the program is upgraded automatically.

[0086] In some optional implementations, the above step S203 includes:

[0087] Step S2031, determine whether the SD card is initialized successfully.

[0088] Step S2032: If the SD card is not initialized successfully, the program will be directly jumped to the designated address to start the program to be upgraded and automatically upgrade the program.

[0089] In the embodiment of the present invention, Figure 2 As shown in the figure, after the SD card is mounted, it is determined whether the SD card is initialized successfully. This can be determined by calling the SD card initialization function and judging whether initialization is successful based on the return value. This is only an example and is not intended to be limiting. If the SD card is not initialized successfully, it will directly jump to the specified address to start the program to be upgraded, and automatically perform the program upgrade.

[0090] By directly jumping to the specified address to start the program to be upgraded when the SD card is not initialized successfully, waiting time is saved, the automatic upgrade program is quickly entered, and the program upgrade is automatically realized to improve efficiency.

[0091] In some optional embodiments, the method further comprises:

[0092] Step S2033: If the SD card is initialized successfully, the SD card is checked to see if there is a binary file of the program to be upgraded.

[0093] Step S2034: If there is a binary file in the SD card, the binary file is copied to the designated partition of the program to be upgraded.

[0094] Step S2035: After the binary file is copied, the binary file is deleted, and the program to be upgraded is started by jumping to the designated address, and the program upgrade is automatically performed.

[0095] In the embodiment of the present invention, Figure 2 As shown in Figure 1, if the SD card is initialized successfully, the SD card is checked for the binary file of the program to be upgraded. Specifically, the file name features are compared and the binary file of the program to be upgraded is checked based on the feature comparison results. If the binary file exists on the SD card, it is copied to the partition designated by the program to be upgraded. The partition table is shown in Table 1.

[0096] Table 1

[0097] Name offset size boot 0x8000000 0x100000 app 0x8100000

[0098] After the binary file is copied, delete the binary file in the SD card, jump to the specified address to start the program to be upgraded, and automatically upgrade the program.

[0099] By directly copying the binary file after the SD card is successfully initialized and there is a binary file in the SD card, the loading time is shortened and the upgrade efficiency is improved. After the copy is completed, the binary file is deleted to free up the SD card storage space and avoid occupying unnecessary storage resources.

[0100] In some optional embodiments, the method further comprises:

[0101] Step S2036: If the SD card is initialized successfully and the binary file of the program to be upgraded does not exist in the SD card, the program to be upgraded is directly jumped to the designated address to start the program to be upgraded and the program upgrade is automatically performed.

[0102] In the embodiment of the present invention, Figure 2 As shown, if the SD card is initialized successfully and the binary file of the program to be upgraded does not exist in the SD card, there is no need to perform the binary file copy step, and the program to be upgraded is directly jumped to the specified address to start the program to be upgraded and automatically upgrade the program.

[0103] When the SD card is successfully initialized and the binary file of the program to be upgraded does not exist in the SD card, the program is automatically upgraded directly, thereby improving the efficiency of the automatic program upgrade.

[0104] Step S204: If the data recorder is not powered by a battery, the data recorder is charged, and when an upgrade requirement is detected, the binary file of the program to be upgraded is copied to the SD card, and the program upgrade is automatically performed.

[0105] For details, please see Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0106] Step S205 : When the configuration parameter file is detected, the configuration parameters are modified, and the data recorder is configured according to the modified configuration parameters.

[0107] Specifically, the above step S205 includes:

[0108] Step S2051: After the SD card is mounted, the configuration parameter file is detected, the communication parameters are read, and the configuration parameters are modified according to the format definition requirements in the configuration file.

[0109] Step S2052: After the configuration parameters are modified, when it is detected that the data recorder is powered on, the data recorder is configured according to the modified configuration parameters.

[0110] In this embodiment of the present invention, the configuration parameter modification process is similar to the program upgrade process. Configuration parameters are stored in the Flash memory as a text file. The user simply inserts the configuration file into the USB port to access the text. When the SD card is mounted, the configuration parameter file is checked simultaneously with the upgrade file. If a configuration parameter file is detected, the corresponding communication parameters are read and stored in the specified location. When modifying configuration parameters, the corresponding parameters are modified according to the format defined in the configuration file. Once the modification is complete, the data logger can read the configuration parameters upon powering on, allowing the data logger to be configured according to the new parameters.

[0111] The program upgrade and configuration parameter modification method for a data recorder provided in this embodiment allows for flexible configuration according to modified configuration parameters during use of the data recorder, and has high parameter readability and modifiability.

[0112] It should be noted that the bootloader automatically completes the upgrade of the app. The bootloader program has a relatively simple function and generally does not require frequent updates. The user's needs are actually implemented in the app, and changes in user needs will only affect the app. After the bootloader is completed, it can be directly downloaded to the MCU through Keil uVison or burned into the MCU using J-Flash or other methods.

[0113] The Bootloader and APP application need to pay attention to the memory allocation. The specific allocation is as follows Figure 3 shown.

[0114] When using Keil to download the BootLoader part directly, you need to pay attention to the Flash configuration, such as Figure 4 As shown, Figure 4The option selected in indicates that the maximum space of the selected FLASH is 2Mbytes. Different CPU models may correspond to different FLASH sizes. This needs to be noted when writing the boot program. User APP FLASH configuration is as follows Figure 5 shown.

[0115] The method for program upgrade and configuration parameter modification of a data recorder provided by an embodiment of the present invention has the following advantages:

[0116] (1) Program upgrade is relatively convenient. You only need to plug the data logger into the computer via a USB cable and put the program file to be upgraded into the USB flash drive (the data logger is then recognized by the computer as a USB flash drive). The data logger will automatically upgrade the program.

[0117] (2) The configuration of communication parameters is simple and clear. The communication configuration parameters required by the data logger during use can be flexibly configured. The parameters are highly readable and modifiable, and there is no need to change the configuration parameters through an upgrade program.

[0118] (3) It is suitable for use in mass production. This method is simple and fast to operate and can significantly improve efficiency in mass production.

[0119] This embodiment also provides a device for program upgrades and configuration parameter changes for a data logger. This device is used to implement the above-described embodiments and preferred implementations, and details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0120] This embodiment provides a device for program upgrade and configuration parameter change of a data recorder, such as Figure 6 Shown, including:

[0121] The initialization module 601 is used to automatically run the Bootloader program to perform initialization when it is detected that the data recorder is powered on.

[0122] The first determination module 602 is configured to detect the power supply mode of the data recorder and determine whether the power supply mode of the data recorder is battery-powered.

[0123] The first upgrade module 603 is used to mount the SD card if the data recorder is powered by battery, and when the binary file of the program to be upgraded does not exist in the SD card, jump to the specified address to start the program to be upgraded and automatically upgrade the program.

[0124] The second upgrade module 604 is used to charge the data recorder if the data recorder is not powered by battery, and to copy the binary file of the program to be upgraded to the SD card when an upgrade requirement is detected, so as to automatically upgrade the program.

[0125] The parameter configuration module 605 is used to modify the configuration parameters when a configuration parameter file is detected, and configure the data recorder according to the modified configuration parameters.

[0126] In some optional implementations, the first determining module 602 includes:

[0127] The judgment unit is used to use the power detection pin to detect whether the power supply mode of the data recorder is battery power supply.

[0128] In some optional embodiments, the device further comprises:

[0129] The second judgment module is used to judge whether the SD card is initialized successfully.

[0130] The first jump module is used to directly jump to the specified address to start the program to be upgraded and automatically upgrade the program if the SD card is not initialized successfully.

[0131] In some optional embodiments, the device further comprises:

[0132] The search module is used to search the SD card for the binary file of the program to be upgraded if the SD card is initialized successfully.

[0133] The copy module is used to copy the binary file to the designated partition of the program to be upgraded if there is a binary file in the SD card.

[0134] The second jump module is used to delete the binary file after the binary file is copied, and jump to the specified address to start the program to be upgraded, and automatically upgrade the program.

[0135] In some optional embodiments, the device further comprises:

[0136] The third jump module is used to directly jump to the specified address to start the program to be upgraded and automatically upgrade the program if the SD card is initialized successfully and the binary file of the program to be upgraded does not exist in the SD card.

[0137] In some optional implementations, the parameter configuration module 605 includes:

[0138] The first parameter configuration unit is used to detect the configuration parameter file after the SD card is mounted, read the communication parameters, and modify the configuration parameters according to the format definition requirements in the configuration file.

[0139] The second parameter configuration unit is used to configure the data recorder according to the modified configuration parameters after the configuration parameters are modified and when it is detected that the data recorder is powered on.

[0140] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0141] The program upgrade and configuration parameter change device for the data recorder in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0142] The embodiment of the present invention also provides a computer device having the above Figure 6 The device shown is used for program upgrade and configuration parameter change of data logger.

[0143] See also Figure 7 , Figure 7 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0144] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0145] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0146] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0147] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0148] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 can be connected via a bus or other means. Figure 7 The bus connection is taken as an example.

[0149] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, etc. The output device 40 can include a display device, etc.

[0150] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0151] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0152] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are intended to fall within the scope of this application.

Claims

1. A method for program upgrade and configuration parameter change of a data logger, characterized in that: The method comprises: When the data logger is detected to be powered on, the Bootloader program will automatically run to initialize. Detect the power supply mode of the data logger and determine whether the power supply mode of the data logger is battery-powered; If the data logger is powered by a battery, the SD card is mounted. If the binary file of the program to be upgraded does not exist in the SD card, the program to be upgraded is automatically upgraded by jumping to the specified address. If the data logger is not powered by a battery, the data logger will be charged. When an upgrade request is detected, the binary file of the program to be upgraded will be copied to the SD card and the program will be upgraded automatically. When the configuration parameter file is detected, the configuration parameters are modified, and the data logger is configured according to the modified configuration parameters.

2. The method according to claim 1, characterized in that The step of determining whether the data logger is powered by a battery includes: Use the power detection pin to detect whether the data logger is powered by battery.

3. The method according to claim 1, characterized in that After mounting the SD card, the method further includes: Determine whether the SD card is initialized successfully; If the SD card is not initialized successfully, it will jump directly to the specified address to start the program to be upgraded and automatically upgrade the program.

4. The method according to claim 3, characterized in that The method further comprises: If the SD card is initialized successfully, check whether there is a binary file of the program to be upgraded in the SD card; If the binary file exists in the SD card, copy the binary file to the designated partition of the program to be upgraded; When the binary file is copied, the binary file is deleted, and the program to be upgraded is started by jumping to the designated address, and the program upgrade is automatically performed.

5. The method according to claim 4, characterized in that The method further comprises: If the SD card is initialized successfully and the binary file of the program to be upgraded does not exist in the SD card, it will directly jump to the specified address to start the program to be upgraded and automatically upgrade the program.

6. The method according to claim 1, wherein When the configuration parameter file is detected, the configuration parameters are modified, and the data logger is configured according to the modified configuration parameters, including: After mounting the SD card, detect the configuration parameter file, read the communication parameters, and modify the configuration parameters according to the format definition requirements in the configuration file; After the configuration parameters are modified, when the data logger is detected to be powered on, the data logger is configured according to the modified configuration parameters.

7. A device for program upgrade and configuration parameter change of a data recorder, characterized in that: The device comprises: The initialization module is used to automatically run the Bootloader program for initialization when it detects that the data logger is powered on; A first judgment module is used to detect the power supply mode of the data recorder and determine whether the power supply mode of the data recorder is battery-powered; The first upgrade module is used to mount the SD card if the data logger is powered by a battery, and if the binary file of the program to be upgraded does not exist in the SD card, jump to a specified address to start the program to be upgraded and automatically upgrade the program; The second upgrade module is used to charge the data logger if the data logger is not powered by a battery, and when an upgrade requirement is detected, copy the binary file of the program to be upgraded to the SD card to automatically upgrade the program; The parameter configuration module is used to modify the configuration parameters when a configuration parameter file is detected, and configure the data recorder according to the modified configuration parameters.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the program upgrade and configuration parameter change method for a data recorder according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the program upgrade and configuration parameter change method for a data recorder according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for program upgrading and configuration parameter changing for a data recorder according to any one of claims 1 to 6.