Embedded device supporting on-board burning of onboard system disk and control method thereof
By designing embedded devices that integrate components such as recording interfaces, microcontroller units, etc., the direct recording of the onboard system disk is realized, solving the problem of time-consuming and labor-intensive and data-incomplete burning process in the existing technology, and improving efficiency and reliability.
Patent Information
- Application Number
- CN202411901046.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
AI Technical Summary
The existing embedded systems lack the mechanism to directly burn onboard system disks on the board, which makes the burning process time-consuming and labor-intensive, and can easily lead to physical damage or incomplete data.
Design an embedded device, integrating the recording interface, microcontroller unit, central processing unit, switching circuit and on-board system disk, by automatically monitoring the connection status of the burning interface and sending switching instructions, control the switching connection between the burning interface and the central processing unit to realize the direct burning of the on-board system disk.
It realizes direct on-board recording of on-board disks, improves the burning efficiency, ensures success rate and data integrity, reduces dependence on external devices, and improves the reliability and maintenance of embedded systems.
Smart Images

Figure CN119847545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of embedded system burning, and in particular to an embedded device supporting on-board burning of a system disk and a control method thereof. Background Art
[0002] With the rapid development of information technology, embedded systems have been widely used in various fields, including industrial control, smart home, medical equipment, etc. Embedded systems usually contain one or more onboard system disks (such as NVMe SSD, eMMC, etc.) to store operating systems, applications, and user data. In order to ensure the reliability and maintainability of these systems, it is particularly important to update or re-burn the firmware of the onboard system disk.
[0003] At present, the onboard system disk update or burning operation of most embedded systems mainly includes the following two methods: one is to remove the onboard system disk from the mainboard and use a dedicated programmer to burn it, and the other is to equip the embedded system with a secure digital memory card (Secure Digital Memory Card, SD) interface, first burn the image file to the secure digital card, and then read the image file in the secure digital card by the central processing unit of the embedded system and burn it to the onboard system disk. However, the method of physically disassembling the onboard system disk and then burning it is not only time-consuming and laborious, but also prone to physical damage due to improper operation, and the method of burning with the help of a secure digital card requires an additional secure digital card as an intermediate storage medium, which not only reduces the efficiency of burning, but is also easily affected by the adverse effects of the secure digital card and causes burning failure or incomplete data. Therefore, the onboard system disk of the existing embedded system lacks a mechanism for direct on-board burning. Summary of the invention
[0004] In view of the above problems, the present application provides an embedded device that supports on-board burning of an onboard system disk and a control method thereof. The main purpose is to realize direct on-board burning of the onboard system disk, improve the efficiency of on-board burning, and ensure the success rate of on-board burning and data integrity.
[0005] In order to solve the above technical problems, this application proposes the following solutions:
[0006] In a first aspect, the present application provides an embedded device that supports on-board burning of an onboard system disk, the device comprising at least: a burning interface, a microcontroller unit, a central processing unit, a switching circuit, and an onboard system disk;
[0007] The burning interface is used to access an external burning host;
[0008] The microcontroller unit is connected to the burning interface, the switching circuit and the central processing unit respectively, and is used to monitor the connection status of the burning interface and send a switching instruction to the switching circuit and the central processing unit according to the connection status;
[0009] The switching circuit is connected to the burning interface, the central processing unit and the onboard system disk respectively, and is used to control the onboard system disk to switch the connection between the burning interface and the central processing unit according to the received switching instruction;
[0010] The central processing unit is used to perform a soft shutdown or startup operation according to the received switching instruction;
[0011] The onboard system disk is used to be mounted on an external burning host when switched to be connected to the burning interface, so as to perform a burning operation on the image file data in the external burning host.
[0012] In a second aspect, the present application provides a control method for on-board burning of an embedded device, the method being applied to the embedded device supporting on-board burning of an onboard system disk as described in the first aspect, the method comprising:
[0013] Monitor whether the burning interface is connected to the external burning host;
[0014] If yes, the control switching circuit switches to the burning interface to connect with the onboard system disk, and controls the central processing unit to perform a soft shutdown operation, so that the onboard system disk is mounted on the external burning host, and performs a burning operation on the image file data in the external burning host;
[0015] If not, the switching circuit is controlled to switch to connect the central processing unit to the onboard system disk, and the central processing unit is controlled to perform a boot operation.
[0016] In order to achieve the above-mentioned purpose, according to the third aspect of the present application, a storage medium is provided, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the control method for on-board burning of the embedded device according to the above-mentioned second aspect.
[0017] In order to achieve the above-mentioned purpose, according to a fourth aspect of the present application, a processor is provided, and the processor is used to run a program, wherein when the program is running, the control method for on-board burning of an embedded device according to the above-mentioned second aspect is executed.
[0018] By means of the above technical scheme, the present application provides an embedded device supporting on-board burning of an onboard system disk and a control method thereof, wherein the device at least comprises: a burning interface, a microcontroller unit, a central processing unit, a switching circuit and an onboard system disk; the burning interface is used to access an external burning host; the microcontroller unit is respectively connected to the burning interface, the switching circuit and the central processing unit, and is used to monitor the connection status of the burning interface, and send a switching instruction to the switching circuit and the central processing unit according to the connection status; the switching circuit is respectively connected to the burning interface, the central processing unit and the onboard system disk, and is used to control the onboard system disk to switch the connection between the burning interface and the central processing unit according to the received switching instruction; the central processing unit is used to perform a soft shutdown or startup operation according to the received switching instruction; the onboard system disk is used to be mounted on the external burning host when switching to connect to the burning interface, so as to perform a burning operation on the image file data in the external burning host. The technical solution provided by the present application can directly connect the burning interface to the external burning host, automatically monitor and manage the connection status of the burning interface through the microcontroller unit, and send corresponding switching instructions to the switching circuit and the central processing unit according to the connection status of the external burning host, that is, control the switching circuit to switch from the connection between the central processing unit and the onboard system disk to the connection between the onboard system disk and the burning interface, and control the central processing unit to soft shut down, so that the onboard system disk is mounted on the external burning host, and the direct burning of the image file data in the external burning host is realized, and when the connection state is disconnected from the external burning host, the connection between the onboard system disk and the burning interface is switched to the connection between the central processing unit and the onboard system disk, and the central processing unit is controlled to start up. In this way, not only does it not need to physically disassemble the onboard system disk, it reduces human intervention, but also saves the intermediate storage medium, simplifies the operation process, reduces potential risks, and can realize the direct on-board burning of the onboard system disk, effectively improve the efficiency of on-board burning, and ensure the success rate and data integrity of on-board burning. In addition, integrating all components into one embedded device can also reduce dependence on external devices and improve the overall reliability and maintainability of the embedded system.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0021] Figure 1 A block diagram showing a composition of an embedded device supporting on-board burning of a system disk provided by an embodiment of the present application;
[0022] Figure 2 A block diagram showing another structure of an embedded device supporting on-board burning of a system disk provided by an embodiment of the present application is shown;
[0023] Figure 3 A flow chart of a control method for on-board programming of an embedded device provided in an embodiment of the present application is shown;
[0024] Figure 4 A flow chart of another control method for on-board programming of an embedded device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0026] At present, the onboard system disk update or burning operation of most embedded systems mainly includes the following two methods: one is to remove the onboard system disk from the mainboard and use a dedicated programmer to burn it, and the other is to equip the embedded system with a secure digital memory card (Secure Digital Memory Card, SD) interface, first burn the image file to the secure digital card, and then read the image file in the secure digital card by the central processing unit of the embedded system and burn it to the onboard system disk. However, the method of physically disassembling the onboard system disk and then burning it is not only time-consuming and laborious, but also prone to physical damage due to improper operation, and the method of burning with the help of a secure digital card requires an additional secure digital card as an intermediate storage medium, which not only reduces the efficiency of burning, but is also easily affected by the adverse effects of the secure digital card and causes burning failure or incomplete data. Therefore, the onboard system disk of the existing embedded system lacks a mechanism for direct on-board burning.
[0027] In order to realize the direct on-board burning of the onboard system disk of the embedded system, the inventor needs to avoid the adverse effects of physical disassembly and adding intermediate storage media on the direct on-board burning of the onboard system disk. After research, the inventor found that the components such as the burning interface, the microcontroller unit, the central processing unit, the switching circuit and the onboard system disk can be integrated into an embedded device. The external burning host is connected through the burning interface, the connection status of the burning interface is monitored by the microcontroller unit, and corresponding instructions are issued to the central processing unit and the switching circuit. The switching circuit realizes the switching connection between the onboard system disk and the central processing unit or the burning interface. The central processing unit also realizes automatic soft shutdown or startup, so that when the external burning host is connected to the burning interface, the onboard system disk can be mounted on the external burning host, and the image file data in the external burning host can be directly burned on the board. In this way, not only is there no need to physically disassemble the onboard system disk, reducing human intervention, but also eliminating the need for intermediate storage media, simplifying the operating process, reducing potential risks, and enabling direct on-board burning of the onboard system disk, effectively improving the efficiency of on-board burning, and ensuring the success rate of on-board burning and data integrity.
[0028] To this end, the embodiment of the present application provides an embedded device that supports on-board burning of a system disk and a control method for on-board burning of the embedded device. The implementation of the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.
[0029] Figure 1 The present invention provides a block diagram of an embedded device that supports on-board system disk burning. Figure 1 As shown, the embodiment of the present application provides an embedded device that supports on-board burning of an onboard system disk. The embedded device 10 at least includes: a burning interface 101, a microcontroller unit 102, a central processing unit 103, a switching circuit 104 and an onboard system disk 105; the burning interface 101 is used to access an external burning host; the microcontroller unit 102 is connected to the burning interface 101, the switching circuit 104 and the central processing unit 103, respectively, and is used to monitor the connection status of the burning interface 101, and to send a signal to the switching circuit 104 and the central processing unit according to the connection status. The switching circuit 104 is connected to the burning interface 101, the central processing unit 103 and the onboard system disk 105 respectively, and is used to control the onboard system disk 104 to switch the connection between the burning interface 101 and the central processing unit 103 according to the received switching instruction; the central processing unit 103 is used to perform a soft shutdown or startup operation according to the received switching instruction; the onboard system disk 105 is used to be mounted on an external burning host when switching to be connected to the burning interface 101, so as to perform a burning operation on the image file data in the external burning host.
[0030] The external burning host can be a notebook computer, a dedicated burner, etc. The burning interface 101 is specifically a USB, UART or other suitable data transmission interface, which supports high-speed data transmission, so that the image file in the external burning host can be quickly and stably transferred to the onboard system disk 105; the microcontroller unit 102 (MCU) is responsible for monitoring the connection status of the burning interface 101, and sends a switching instruction to the switching circuit 104 and the central processing unit 103 according to the connection status. It has built-in support for multiple communication protocols, such as I2C, SPI, UART, etc., so as to communicate efficiently with other components, and integrates a real-time operating system (RTOS) to ensure the timeliness and reliability of task scheduling; the central processing unit 103 (CPU) performs a soft shutdown or startup operation according to the received switching instruction, that is, soft shutdown when connected to the external burning host, and startup when disconnected from the external burning host, to ensure that the embedded system is It is in a safe state before and after burning to avoid data corruption. It supports multi-tasking and advanced power management functions to optimize the performance and power consumption of embedded systems; the switching circuit 104 is respectively connected to the burning interface 101, the central processing unit 103 and the onboard system disk 105, and controls the onboard system disk 105 to switch between the burning interface 101 and the central processing unit 103 according to the received switching instruction, that is, when connected to an external burning host, it switches to the burning interface 101 and the onboard system disk 105, so that the onboard system disk can be mounted on the external burning host to realize the burning of the image file, and when disconnected from the external burning host, it switches to the central processing unit 103 and the onboard system disk 105. It can use high-performance relays or solid-state switches, etc., so that the switching process is fast, reliable and interference-free. At the same time, a built-in protection mechanism can be built in to prevent short circuits or voltage fluctuations during the switching process; the onboard system disk 105 can be NVMe Storage devices such as SSD, eMMC, SATA SSD, etc. are used to store operating systems, applications and user data. When switched to be connected to the burning interface 101, they are mounted on the external burning host to perform burning operations on the image files in the external burning host.
[0031] Combined with the description of the connection relationship and functions of the above components, the specific workflow is as follows:
[0032] Power-on self-test: After the embedded device 10 is started, the microcontroller unit 102 executes a self-test program to check whether all hardware components are working properly, including the burning interface 101, the switching circuit 104, the onboard system disk 105, etc.
[0033] Connection detection: The microcontroller unit 102 detects whether an external burning host is connected to the burning interface 101 through a built-in or external interface controller. If a connection is detected, it is ready to enter the burning mode, otherwise, it maintains the normal operation mode.
[0034] Status notification: The microcontroller unit 102 sends a ready signal to the external programming host and waits for the user to confirm to start programming.
[0035] Soft shutdown control: After user confirmation, the microcontroller unit 102 sends a soft shutdown command to the central processing unit 103 to ensure that the system is in a safe state and prevent data damage.
[0036] Switching circuit configuration: The microcontroller unit 102 controls the switching circuit 104 to switch the onboard system disk 105 from the central processing unit 103 to the burning interface 101, so that the onboard system disk 105 is mounted on the external burning host to perform a burning operation on the image file in the external burning host.
[0037] Based on the above Figure 1 It can be seen from the implementation method that the present application provides an embedded device that supports on-board burning of an onboard system disk, and the device at least includes: a burning interface, a microcontroller unit, a central processing unit, a switching circuit and an onboard system disk; the burning interface is used to access an external burning host; the microcontroller unit is connected to the burning interface, the switching circuit and the central processing unit respectively, and is used to monitor the connection status of the burning interface, and send a switching instruction to the switching circuit and the central processing unit according to the connection status; the switching circuit is connected to the burning interface, the central processing unit and the onboard system disk respectively, and is used to control the onboard system disk to switch the connection between the burning interface and the central processing unit according to the received switching instruction; the central processing unit is used to perform a soft shutdown or startup operation according to the received switching instruction; the onboard system disk is used to be mounted on the external burning host when switching to connect to the burning interface, so as to perform a burning operation on the image file data in the external burning host. The technical solution provided by the present application can directly connect the burning interface to the external burning host, automatically monitor and manage the connection status of the burning interface through the microcontroller unit, and send corresponding switching instructions to the switching circuit and the central processing unit according to the connection status of the external burning host, that is, control the switching circuit to switch from the connection between the central processing unit and the onboard system disk to the connection between the onboard system disk and the burning interface, and control the central processing unit to soft shut down, so that the onboard system disk is mounted on the external burning host, and the direct burning of the image file data in the external burning host is realized, and when the connection state is disconnected from the external burning host, the connection between the onboard system disk and the burning interface is switched to the connection between the central processing unit and the onboard system disk, and the central processing unit is controlled to start up. In this way, not only does it not need to physically disassemble the onboard system disk, it reduces human intervention, but also saves the intermediate storage medium, simplifies the operation process, reduces potential risks, and can realize the direct on-board burning of the onboard system disk, effectively improve the efficiency of on-board burning, and ensure the success rate and data integrity of on-board burning. In addition, integrating all components into one embedded device can also reduce dependence on external devices and improve the overall reliability and maintainability of the embedded system.
[0038] In some embodiments, Figure 2 As shown, the embedded device 10 further includes: a protocol conversion chip 106 ; the protocol conversion chip 106 is connected to the burning interface 101 and the switching circuit 104 respectively, and is used to convert signals between the burning interface 101 and the onboard system disk 105 .
[0039] Among them, the protocol conversion chip 106 serves as a bridge between the burning interface 101 and the switching circuit 104, and is responsible for converting the signal (such as USB, UART, etc.) transmitted by the burning interface 101 into a signal (such as SATA, NVMe, eMMC, etc.) suitable for the onboard system disk 105, ensuring compatibility and efficient communication between the two. Support high-speed data transmission to ensure that the image file can be quickly and stably transmitted to the onboard system disk 105. In addition, the protocol conversion chip 106 can also have built-in electrostatic discharge protection and overcurrent protection to prevent hardware damage caused by external interference or short circuit.
[0040] In some embodiments, Figure 2 As shown, the embedded device 10 also includes: a monitoring circuit 107; the monitoring circuit 107 is connected to the onboard system disk 105 and the microcontroller unit 102 respectively, and is used to monitor the operating voltage and operating temperature of the onboard system disk 105, and feed back the operating voltage and operating temperature to the microcontroller unit 102.
[0041] Among them, the monitoring circuit 107 is for the voltage and temperature of the onboard system disk, and is used to monitor the working voltage and working temperature of the onboard system disk 105 in real time, and feed back these data to the microcontroller unit 102. Specifically, a voltage monitoring chip can be built in to monitor the working voltage, and the working temperature can also be obtained through the interface corresponding to the temperature sensor (such as NTC thermistor or DS18B20 digital temperature sensor) integrated in the onboard system disk, and supports multiple communication protocols, such as I2C, SPI, UART, etc., so as to communicate efficiently with the microcontroller unit 102. Set a suitable sampling frequency, such as collecting data once per second, to ensure real-time performance.
[0042] In some embodiments, Figure 2 As shown, the microcontroller unit 102 includes: a storage module 1021, a processing module 1022 and a communication serial port 1023; the storage module 1021 is used to store the safety burning information corresponding to each key stage in the burning process; the processing module 1022 is used to compare the received operating voltage and operating temperature with the safety burning information, and generate corresponding control strategies and notification information based on the comparison results; the communication serial port 1023 is connected to an external burning host and is used to send notification information to the external burning host.
[0043] Among them, the storage module 1021 is used to store the security burning information corresponding to each key stage in the burning process. The storage module 1021 can be a flash memory, EEPROM or other non-volatile memory to ensure that data will not be lost after power failure. The key stages include but are not limited to the start of firmware transmission, completion of verification, writing to the system disk, etc. The security burning information specifically includes a safe voltage range and a safe temperature range. For the safe voltage range, for example, it can be 3.0V to 3.6V for NVMe SSD, and it can be 1.8V to 3.3V for eMMC. For the safe temperature range, it is 0°C to 70°C; the processing module 1022 is responsible for comparing the received operating voltage and operating temperature with the safe voltage range and safe temperature range in the safe burning information, and generating corresponding control strategies and notification information based on the comparison results. The control strategy includes but is not limited to continuing burning, pausing burning, issuing alarms, etc. The notification information can be a detailed alarm or status notification. The processing module 1022 can be an ARM Cortex-M series, RISC-V or other high-performance embedded processor to ensure that it has fast data processing capabilities. The communication serial port 1023 is used to send notification information to the external burning host. It supports multiple communication protocols, such as USB, UART, SPI, I2C, etc., to ensure efficient communication with the external burning host. The communication serial port 1023 can be a physical serial port (such as RS232, RS485) or a virtual serial port (such as USB to serial port), etc.
[0044] Further, the preferred embodiment of the present application is in the above Figure 1-2 Based on the above, a control method for on-board burning of an embedded device is also provided, and the method is applied to the above-mentioned embedded device that supports on-board burning of an onboard system disk. The specific steps are as follows: Figure 3 As shown, including:
[0045] 201. Monitor whether the burning interface and the external burning host are in connection state.
[0046] It should be noted that the embedded device includes a burning interface, a microcontroller unit (MCU), a monitoring circuit, a central processing unit (CPU), a switching circuit, and an onboard system disk. Among them, the external burning host can be a laptop, a dedicated burner, etc., and the onboard system disk can be a storage device such as NVMe SSD, eMMC, SATA SSD, etc. In this embodiment, the execution subject is the microcontroller unit in the embedded device.
[0047] In this step, when the embedded device is powered on, the microcontroller unit executes a self-test program to ensure that all hardware components are working properly. The microcontroller unit continuously monitors whether the burning interface is connected to the external burning host through the built-in or external interface controller, UART or other communication protocols. If it is checked that the external burning host is connected to the embedded device through the burning interface, it is ready to enter the burning mode. At this time, a ready signal can be sent to the external burning host, waiting for the user to confirm to start burning. When the user confirms, step 202 is executed, otherwise the normal operation mode is maintained, that is, step 203 is executed.
[0048] 202, control the switching circuit to switch to the burning interface to connect with the onboard system disk, and control the central processing unit to perform a soft shutdown operation, so that the onboard system disk is mounted on the external burning host, and the image file data in the external burning host is burned.
[0049] In this step, because the external burning host is connected with the burning interface, therefore, after the user confirms to start burning, the microcontroller unit receives the confirmation signal sent by the external burning host, and at this moment, the microcontroller unit sends a soft shutdown command to the central processing unit, ensuring that the system is in a safe state, preventing the occurrence of data corruption or other unstable situations, and after the central processing unit receives the soft shutdown command, it performs a soft shutdown operation, closes unnecessary processes and services, and ensures that system resources are concentrated for burning operation. Meanwhile, the microcontroller unit controls the switching circuit to switch the onboard system disk from being connected with the central processing unit to being connected with the burning interface, in preparation for burning operation, and the switching circuit quickly and reliably completes the switching according to the received instruction, ensuring that the onboard system disk can be mounted on the external burning host smoothly. After the onboard system disk is mounted on the external burning host, the external burning host starts to transmit the image file data, and writes the onboard system disk through the burning interface. During this process, the monitoring circuit can continuously monitor the operating voltage and operating temperature of the onboard system disk, and feed back these data to the microcontroller unit. If the microcontroller unit detects abnormal conditions such as voltage fluctuations and excessive temperature, it can immediately take corresponding protection measures, such as suspending burning, issuing alarm notifications, saving current status information, etc. In addition, in order to monitor more accurately and ensure the reliability of burning, multiple key stages can be set, such as firmware transmission, verification, writing, etc., and abnormal detection can be performed on the temperature and voltage of the key stages.
[0050] 203. Control the switching circuit to switch the central processing unit to connect with the onboard system disk, and control the central processing unit to perform a boot operation.
[0051] In this step, the external burning host is disconnected from the burning interface, that is, there is no need to enter the burning mode. At this time, there are two situations. One is that the burning mode detects an abnormality or actively stops the burning operation, and the other is that it is in the normal operating mode at this time. For the first situation, the microcontroller unit controls the switching circuit to switch the onboard system disk from the burning interface back to the central processing unit to ensure that the system resumes the normal operating mode. For the second situation, it only needs to maintain the normal operating mode. At the same time, the microcontroller unit sends a power-on command to the central processing unit. After receiving the command, the central processing unit executes the power-on operation to restore the normal operation of the embedded system. After the system starts, it automatically loads the operating system and application programs to resume normal service.
[0052] Based on the above Figure 3 It can be seen from the implementation method that the control method for on-board burning of an embedded device provided by the present application is to monitor whether the burning interface and the external burning host are in a connected state when the on-board burning is performed; if so, the control switching circuit is switched to the burning interface to connect to the onboard system disk, and the central processing unit is controlled to perform a soft shutdown operation, so that the onboard system disk is mounted on the external burning host, and the image file data in the external burning host is burned; if not, the control switching circuit is switched to the central processing unit to connect to the onboard system disk, and the central processing unit is controlled to perform a power-on operation. Through the technical solution provided by the present application, when the burning interface is directly connected to the external burning host, the control switching circuit is switched from the central processing unit to the onboard system disk to the onboard system disk to the burning interface, and the central processing unit is controlled to softly shut down, so that the onboard system disk is mounted on the external burning host, and when the burning interface is directly disconnected from the external burning host, the control switching circuit is switched from the onboard system disk to the burning interface to the central processing unit to the onboard system disk, and the central processing unit is controlled to start up to restore normal operation. That is, it realizes intelligent monitoring of the connection status between the burning interface and the external burning host, and also ensures the correct switching and operation of the system in different states, so that the onboard system disk can be burned directly on the board, improving the efficiency of on-board burning and ensuring the success rate of on-board burning and data integrity.
[0053] Further, the preferred embodiment of the present application is in the above Figure 3 Based on this, a detailed description of the process of performing the burning operation on the image file data in the external burning host is given. The specific steps are as follows Figure 4 As shown, including:
[0054] 301. Obtain security burning information corresponding to each key stage in the burning process.
[0055] In this step, the microcontroller unit loads the safety burning information corresponding to each key stage of the burning process from its internal storage module, and the safety burning information includes the safe voltage range and safe temperature range determined according to the maximum voltage and maximum temperature allowed at different key stages according to historical successful burning cases. Among them, the key stages include but are not limited to firmware transmission, verification, writing, etc., which are prone to abnormalities that may cause burning failure or incomplete data.
[0056] Specifically, historical data of parameters such as working voltage and working temperature are collected from previous successful burning cases, and detailed information of each key stage in each case is recorded. The collected historical data is statistically analyzed to find out the distribution of working voltage and working temperature in successful burning cases at each key stage, and statistical quantities such as average value and standard deviation are calculated to identify and exclude abnormal values to obtain statistical results. When counting, successful burning cases can be divided according to the type of onboard system disk, and correspond to the onboard system disk of the current embedded device, so that the subsequent determination of safe burning information is more accurate. According to the statistical results, characteristic values that can represent the working voltage and working temperature under normal burning conditions are extracted, such as maximum value, minimum value, peak value, etc. Considering the uncertainty in actual operation, a safe range wider than the characteristic value is set for each key stage, that is, a buffer zone is set. For example, a certain buffer margin is added on the basis of the highest temperature as the upper limit of safety, and a certain buffer margin is reduced on the basis of the lowest temperature as the lower limit of safety. In addition, considering long-term reliability, a relaxation margin can be set, and the safety range can be appropriately relaxed again according to the relaxation margin to adapt to the changes caused by aging effects or long-term operation. After determining the safety range, its effectiveness can also be verified through limit testing in the laboratory to ensure the success rate and safety of burning even under conditions close to the boundary.
[0057] It should be noted that, in this embodiment, the security burning information is a dynamic adjustment mechanism, that is, an update cycle is set to continuously update and improve the security range according to newly added successful cases.
[0058] 302. Collect the operating voltage and operating temperature of the onboard system disk when performing a burning operation at a target key stage.
[0059] In this step, the target key stage is used to characterize the current corresponding stage of the burning operation, which can be a stage such as firmware transmission, verification, and writing. The microcontroller circuit determines the current corresponding stage of the burning process, that is, the target key stage. And the operating voltage and operating temperature of the onboard system disk in the target key stage are collected by the monitoring circuit target, so as to execute step 303.
[0060] 303. Compare the operating voltage with the safe voltage range, and the operating temperature with the safe temperature range, respectively, to obtain a comparison result corresponding to the target key stage.
[0061] In this step, the microcontroller unit has obtained the operating temperature and the operating voltage. Therefore, the processing module can compare the two with the safe voltage range and the safe temperature range in the storage module, that is, compare whether the operating voltage is within the safe voltage range and whether the operating temperature is within the safe temperature range. If so, calculate the scale of the voltage and temperature close to the boundary of the safe range. If not, calculate the scale of the voltage and temperature deviating from the boundary of the safe range to obtain the comparison result. Record the comparison results in detail, including the operating voltage and operating temperature of each key stage and their comparison with the safe range. The comparison result is used to reflect the voltage fluctuation and temperature change of the onboard system disk at the target key stage.
[0062] 304. Calculate the burning reliability of the onboard system disk in the target key stage based on the comparison result.
[0063] In this step, the burning reliability is used to characterize the success rate and safety of the onboard system disk burning operation at the critical stage. That is, the higher the burning reliability, the lower the risk of burning operation at the critical stage and the greater the possibility of success.
[0064] It should be noted that the specific execution process of calculating the burning reliability of the onboard system disk in the target key stage based on the comparison results is: if the operating voltage is within the safe voltage range and the operating temperature is within the safe temperature range, the first boundary approach scale between the operating voltage and the safe voltage range, and the second boundary approach scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary approach scale, the second boundary approach scale and the respective preset weight coefficients; if the operating voltage is not within the safe voltage range and the operating temperature is not within the safe temperature range, the first boundary deviation scale between the operating voltage and the safe voltage range, and the second boundary approach scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary deviation scale, the second boundary approach scale, the respective preset weight coefficients and the first boundary deviation scale The programming reliability is calculated according to the corresponding correction coefficient; if the operating voltage is within the safe voltage range and the operating temperature is not within the safe temperature range, the first boundary approach scale between the operating voltage and the safe voltage range and the second boundary deviation scale between the operating temperature and the safe temperature range are calculated respectively, and the programming reliability is calculated according to the first boundary deviation scale, the second boundary deviation scale, the respective preset weight coefficients and the correction coefficient corresponding to the second boundary deviation scale; if the operating voltage is not within the safe voltage range and the operating temperature is not within the safe temperature range, the first boundary deviation scale between the operating voltage and the safe voltage range and the second boundary deviation scale between the operating temperature and the safe temperature range are calculated respectively, and the programming reliability is calculated according to the first boundary deviation scale, the second boundary deviation scale, the respective preset weight coefficients and the respective corresponding correction coefficients.
[0065] In this step, different weight coefficients are set for the voltage approaching scale and the temperature approaching scale according to the actual application scenario and requirements in advance. Similarly, different weight coefficients are set for the voltage deviation scale and the temperature deviation scale. The weight coefficient can correspond to the key stage, that is, different key stages have different weight coefficients. Since this step involves two parameters, it can be judged whether the operating voltage is within the safe voltage range and whether the operating temperature is within the safe temperature range. If both are within the safe range at the same time, the first boundary approaching scale between the operating voltage and the safe voltage range and the second boundary approaching scale between the operating temperature and the safe temperature range can be calculated. The first boundary approaching scale and the second boundary approaching scale can be determined with reference to the upper limit of the corresponding safe range. Specifically, multiple scale intervals can be set, and matching and determination are performed according to the actual working temperature or working pressure. At the same time, a corresponding score is set for each scale interval. After determining the scores of the first boundary approaching scale and the second boundary approaching scale, it is weighted and summed with the preset weight coefficient to obtain the burning reliability. If one of the two is not within the safe range, the first boundary deviation scale or the second boundary deviation scale of the deviation from the boundary is calculated. The first boundary deviation scale and the second boundary deviation scale are similar to the calculation of the first boundary approach scale and the second boundary approach scale. The difference is that it is necessary to determine whether it needs to refer to the upper limit or lower limit of the safe range according to the deviation direction, and an additional correction coefficient is set. The correction coefficient corresponds to the deviation scale corresponding to the working pressure and the working temperature, respectively. It is used to characterize the influence of the scale of voltage or temperature deviation from the safe range on the burning process. After obtaining the first boundary deviation scale and the second boundary approach scale score, or the first boundary approach scale or the second boundary deviation scale score, it is weighted and summed with the preset weight coefficient and the correction coefficient corresponding to the deviation system to obtain the burning reliability. If neither of them is within the safe range, the first boundary deviation scale and the second boundary deviation scale of the deviation from the boundary are calculated respectively. After obtaining the first boundary deviation scale and the second boundary deviation scale score, it is weighted and summed with the preset weight coefficient and the corresponding correction coefficient to obtain the burning reliability.
[0066] In addition, the above-mentioned burning reliability can also introduce more influencing factors, such as current, humidity, vibration, etc., to build a multi-factor comprehensive evaluation model, and evaluate the burning reliability according to the multi-factor comprehensive evaluation model. It is also possible to use time series analysis technology to predict the changing trend of the working voltage and working temperature in the future, and evaluate the burning reliability accordingly. This embodiment does not limit this.
[0067] 305. If the burning reliability is lower than the preset reliability threshold, the onboard system disk is controlled to suspend the burning operation at the target key stage, and re-execute the burning operation after a preset time, and the burning risk warning information generated according to the comparison result and the current burning progress of the onboard system disk is fed back to the external burning host.
[0068] In this step, the reliability threshold can be customized according to the specific working conditions of the embedded system, such as 30%, 50%, etc. When the burning reliability is lower than the preset reliability threshold, it means that there is a burning risk at the critical stage of the target at this time. At this time, the microcontroller unit can immediately control the switching circuit to suspend the burning operation of the onboard system disk to prevent data damage or hardware failure caused by abnormal conditions. The suspension of the burning operation can be pre-set for a preset duration, such as 20 seconds or longer, as the suspension duration. After the preset duration ends, the microcontroller unit re-controls the switching circuit to continue the burning operation of the onboard system disk, collects the working voltage and working temperature again, and re-compares and recalculates the reliability. If the reliability is restored to a safe range at this time, the burning operation is performed normally, otherwise, the above-mentioned suspension and waiting process is repeated until the conditions are met.
[0069] While the burning operation is being temporarily stopped, in order to enable the user of the external burning terminal to know the burning progress and status in time, detailed burning risk warning information can be generated according to the comparison results and the current burning progress of the onboard system disk. The generated burning risk warning information includes but is not limited to: the current working voltage and working temperature, the burning reliability and the comparison with the preset threshold, the current burning progress (such as the completion percentage), etc. The generated burning risk warning information is sent to the external burning host through the communication serial port to inform the user of the current burning status and potential risks.
[0070] 306. Count the pause frequency of the burning operation corresponding to the target key stage.
[0071] In this step, each time a new target critical stage is entered, the microcontroller unit initializes a pause frequency counter N, with an initial value of 0. In the target critical stage, each time the burning operation is paused, the value of the pause frequency counter N is increased, and the value of N is compared with the preset frequency threshold in real time to determine whether the pause frequency exceeds the standard. If the pause frequency exceeds the preset frequency threshold, it is considered that the pause frequency is too much and further measures need to be taken, and step 307 is executed at this time.
[0072] 307, controlling the onboard system disk to stop the burning operation, and feeding back the burning failure prompt information generated according to the comparison result and the current burning progress of the onboard system disk to the external burning host, and unloading the onboard system disk from the external burning host, and controlling the switching circuit to switch from the connection between the burning interface and the onboard system disk to the connection between the central processing unit and the onboard system disk.
[0073] In this step, since the pause frequency exceeds the preset frequency threshold, that is, the burning has been suspended for many times in the target key stage, it means that the onboard system disk is no longer suitable for continuing burning. Therefore, the microcontroller unit can immediately control the onboard system disk to stop all burning operations to prevent data damage or other problems caused by frequent suspension. At the same time, according to the comparison result and the current burning progress of the onboard system disk, a detailed burning failure prompt information is generated, which includes but is not limited to: the current operating voltage and operating temperature, the burning reliability and the comparison with the preset threshold, the current burning progress (such as the completed percentage) and the pause frequency and its distribution. The generated burning failure prompt information is sent to the external burning host through the communication serial port to notify the user of the current burning status and potential risks. At the same time, the microcontroller unit unloads the onboard system disk from the external burning host, and controls the switching circuit to switch the onboard system disk from the burning interface back to the central processing unit. After the switching is completed, the microcontroller unit can execute the self-test program to ensure that all hardware components work normally and prepare to enter the next operation. If the user confirms that he will not perform the burning operation any more, the microcontroller unit can control the central processing unit to perform the power-on operation to restore the system to normal operation. After the system starts, it automatically loads the operating system and application programs to restore normal service.
[0074] Through the description of steps 301-307, this embodiment provides a comprehensive safety monitoring, reliability assessment and protection mechanism for embedded devices on-board burning. By loading the safety burning information for different key stages, and monitoring the working voltage and working temperature in real time, and comparing them with the safety range, potential risks can be discovered in time before the problem occurs, ensuring that each burning operation is carried out within the safety range, reducing the risk of data damage or hardware failure caused by abnormal voltage or temperature, and ensuring the safety of the burning environment. The burning reliability is calculated based on the comparison results, providing a quantitative indicator to evaluate the success probability under the current burning conditions, helping the system to make more intelligent operation decisions. When the burning reliability is lower than the preset threshold, the burning operation is automatically paused and retried, avoiding the risks that may be caused by continuing to operate under unsafe conditions, and improving overall reliability. By counting the burning operation pause frequency corresponding to the target key stage, and when the pause frequency exceeds the preset threshold, the burning is immediately stopped and detailed failure prompt information is generated, avoiding long-term invalid operations, saving time and resources, and helping to identify key points where problems frequently occur, thereby optimizing the burning process, reducing unnecessary pauses and restarts, and improving burning efficiency.
[0075] Furthermore, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 3-4 The control method for on-board burning of the embedded device described in.
[0076] Furthermore, an embodiment of the present application also provides an electronic device, including an embedded device supporting on-board burning of a system disk as described in any of the aforementioned embodiments.
[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0079] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0080] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the application is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the application described herein, and the description of the specific language above is for the purpose of disclosing the best mode of implementation of the application.
[0081] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0082] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0083] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0084] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0086] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0087] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0088] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.
[0089] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0090] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0091] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. An embedded device that supports on-board burning of an onboard system disk, characterized in that: The device at least comprises: a burning interface, a microcontroller unit, a central processing unit, a switching circuit and an onboard system disk; The burning interface is used to access an external burning host; The microcontroller unit is connected to the burning interface, the switching circuit and the central processing unit respectively, and is used to monitor the connection status of the burning interface and send a switching instruction to the switching circuit and the central processing unit according to the connection status; The switching circuit is connected to the burning interface, the central processing unit and the onboard system disk respectively, and is used to control the onboard system disk to switch the connection between the burning interface and the central processing unit according to the received switching instruction; The central processing unit is used to perform a soft shutdown or startup operation according to the received switching instruction; The onboard system disk is used to be mounted on an external burning host when switched to be connected to the burning interface, so as to perform a burning operation on the image file data in the external burning host.
2. The device according to claim 1, characterized in that The device also includes: a protocol conversion chip; The protocol conversion chip is connected to the burning interface and the switching circuit respectively, and is used for converting the signal between the burning interface and the onboard system disk.
3. The device according to claim 1, characterized in that The device also includes: a monitoring circuit; The monitoring circuit is connected to the onboard system disk and the microcontroller unit respectively, and is used to monitor the operating voltage and operating temperature of the onboard system disk, and feed back the operating voltage and the operating temperature to the microcontroller unit.
4. The device according to claim 3, characterized in that The microcontroller unit includes: a storage module, a processing module and a communication serial port; The storage module is used to store the security burning information corresponding to each key stage in the burning process; The processing module is used to compare the received operating voltage and the operating temperature with the secure burning information, and generate corresponding control strategies and notification information based on the comparison results; The communication serial port is connected to an external burning host and is used to send the notification information to the external burning host.
5. A control method for on-board programming of an embedded device, characterized in that: The method is applied to an embedded device supporting on-board burning of a system disk according to any one of claims 1 to 4, and the method comprises: Monitor whether the burning interface is connected to the external burning host; If yes, the control switching circuit switches to the burning interface to connect with the onboard system disk, and controls the central processing unit to perform a soft shutdown operation, so that the onboard system disk is mounted on the external burning host, and performs a burning operation on the image file data in the external burning host; If not, the switching circuit is controlled to switch to connect the central processing unit to the onboard system disk, and the central processing unit is controlled to perform a boot operation.
6. The method according to claim 5, characterized in that Perform burning operations on the image file data in the external burning host, including: Obtaining safe programming information corresponding to each key stage in the programming process, wherein the safe programming information includes a safe voltage range and a safe temperature range determined based on the maximum voltage and maximum temperature allowed at different key stages according to historical successful programming cases; Collecting the operating voltage and operating temperature of the onboard system disk when performing the burning operation at the target key stage; The operating voltage is compared with the safe voltage range, and the operating temperature is compared with the safe temperature range, respectively, to obtain a comparison result corresponding to the target key stage, wherein the comparison result is used to reflect the voltage fluctuation and temperature change of the onboard system disk in the target key stage; Calculating the burning reliability of the onboard system disk at the target key stage based on the comparison result; If the burning reliability is lower than the preset reliability threshold, the onboard system disk is controlled to suspend the burning operation at the target critical stage, and re-execute the burning operation after a preset time, and the burning risk warning information generated according to the comparison result and the current burning progress of the onboard system disk is fed back to the external burning host.
7. The method according to claim 6, characterized in that After controlling the onboard system disk to pause the burning operation, and re-execute the burning operation after a specified time, and feeding back the burning prompt information generated according to the current burning progress of the onboard system disk to the external burning host, the method further includes: Counting the pause frequency of the burning operation corresponding to the target key stage; If the pause frequency exceeds a preset frequency threshold, the onboard system disk is controlled to stop the burning operation, and the burning failure prompt information generated according to the comparison result and the current burning progress of the onboard system disk is fed back to the external burning host, and the onboard system disk is unloaded from the external burning host, and the switching circuit is controlled to switch from the connection between the burning interface and the onboard system disk to the connection between the central processing unit and the onboard system disk.
8. The method according to claim 6, characterized in that Calculating the burning reliability of the onboard system disk at the target key stage based on the comparison result includes: If the operating voltage is within the safe voltage range and the operating temperature is within the safe temperature range, a first boundary approach scale between the operating voltage and the safe voltage range and a second boundary approach scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary approach scale, the second boundary approach scale and respective preset weight coefficients; If the operating voltage is not within the safe voltage range and the operating temperature is not within the safe temperature range, a first boundary deviation scale between the operating voltage and the safe voltage range and a second boundary approach scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary deviation scale, the second boundary approach scale, respective preset weight coefficients and a correction coefficient corresponding to the first boundary deviation scale; If the operating voltage is within the safe voltage range and the operating temperature is not within the safe temperature range, the first boundary approach scale between the operating voltage and the safe voltage range and the second boundary deviation scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary deviation scale, the second boundary deviation scale, the respective preset weight coefficients and the correction coefficient corresponding to the second boundary deviation scale; If the operating voltage is not within the safe voltage range and the operating temperature is not within the safe temperature range, the first boundary deviation scale between the operating voltage and the safe voltage range and the second boundary deviation scale between the operating temperature and the safe temperature range are calculated respectively, and the burning reliability is calculated according to the first boundary deviation scale, the second boundary deviation scale, the respective preset weight coefficients and the respective corresponding correction coefficients.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the control method for on-board burning of an embedded device as claimed in any one of claims 5 to 8.
10. An electronic device, characterized in that: The electronic device comprises an embedded device supporting on-board burning of a system disk as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
CPU mode control circuit, vehicle-mounted host equipment and vehicle
CN112805186A
Flash memory chip burning method and system, storage medium and electronic equipment
CN116954635A
Automatic burning system of Internet of Things module
CN117215601A
Automatic switching method, device and equipment for chip burning and storage medium
CN118426792A
Portable fractal burning mainboard and electronic equipment
CN118585204A