Search

CN-121979544-A - Multi-chip firmware upgrading method, system and storage medium based on servo driver

CN121979544ACN 121979544 ACN121979544 ACN 121979544ACN-121979544-A

Abstract

The invention provides a multi-chip firmware upgrading method, a system and a storage medium based on a servo driver, wherein safety control of the whole upgrading process is realized by constructing a serial multiple verification and comparison mechanism, specifically, pre-verification is performed on the basis of an integrated firmware package, a compatibility mapping table and a chip real-time state to ensure complete upgrading conditions, after the pre-verification is passed, a dual verification code containing a block verification code and an associated verification code is generated for each transmission data block, differential verification is performed to identify data errors or sequence anomalies, real-time supervision of the writing process is realized by periodically comparing the progress verification code with an expected verification code in a firmware writing stage, finally, version consistency, individual operation correctness and system cooperative verification are performed on all chips after upgrading to generate an integral acceptance result, and accordingly, the reliability and the system cooperative work capacity of multi-chip firmware upgrading on the servo driver are improved.

Inventors

  • Leng Haidong
  • LIAO WEILONG

Assignees

  • 深圳市杰美康机电有限公司

Dates

Publication Date
20260505
Application Date
20260119

Claims (10)

  1. 1. A method for upgrading multi-chip firmware based on a servo driver, the method comprising: based on the integrated firmware package received from the upper computer, a preset compatibility mapping table and state information of each target chip, executing pre-verification processing to generate a pre-verification result; after the pre-verification is passed, analyzing and integrating the firmware package to obtain a first data block of each target chip; generating a double check code according to the first data block and the preamble associated data block thereof, wherein the double check code is used for executing differential check processing; according to the differentiation verification result, feeding back differentiation confirmation information or executing differentiation error processing; Responding to the differentiation confirmation information, and executing a firmware writing operation of the target chip according to the first data block; based on a preset query period, an acquired progress check code; performing progress verification according to the progress verification code and the expected verification code obtained through iterative calculation; if the progress check is abnormal, executing the pause or rollback operation; If the progress check is passed, continuously executing the firmware writing operation until the firmware upgrading is completed; and responding to the completion of firmware upgrading of all the target chips, and executing cooperative verification according to the state information of each target chip after upgrading to generate a firmware upgrading acceptance result.
  2. 2. The method for upgrading multi-chip firmware based on servo driver according to claim 1, wherein said performing a pre-verification process generates a pre-verification result, and specifically comprises: Extracting the current firmware version number, hardware version identification and running state code of the chip according to the state information of each target chip; extracting target firmware version information of each target chip according to the integrated firmware package; inputting the current hardware version identifier and the target firmware version information into the compatibility mapping table, and performing hardware compatibility matching processing to obtain a hardware compatibility result; Performing chip upgradeable state judgment processing based on the running state code to obtain a state permission result; and performing logical AND operation on the hardware compatibility result and the state permission result to generate the pre-verification result.
  3. 3. The method for upgrading multi-chip firmware based on servo driver according to claim 1, wherein the generating a dual check code for performing a differential check process according to the first data block and the preamble-associated data block thereof specifically comprises: executing a first check code algorithm according to the first data block to generate a block check code; executing an association check code algorithm according to the first data block and at least one preamble association data block to generate an association check code; a first local check code and a second local check code which are fed back by the target chip; Comparing the block check code with a first local check code to generate a first check result; Comparing the associated check code with a second local check code to generate a second check result; and based on the combination of the first checking result and the second checking result, obtaining a differential checking result.
  4. 4. The method for upgrading multi-chip firmware based on servo driver according to claim 3, wherein feeding back the differential confirmation information or performing differential error processing according to the differential verification result specifically comprises: if the differential check result points to the first check failure, generating a retransmission instruction of the first data block; If the differentiation verification result points to the second verification failure, generating a retransmission instruction of the associated data block sequence; If the number of times of retransmission processing failure of the data block exceeds a first time threshold, generating a channel switching instruction; And if the number of times of data block retransmission processing failure exceeds a second time threshold, generating an upgrade suspension instruction.
  5. 5. The method for upgrading multi-chip firmware based on a servo driver according to claim 1, wherein the performing progress check according to the progress check code and the expected check code obtained by iterative calculation specifically comprises: Based on a preset query period, sending a progress state query request to a target chip which is executing a firmware write operation; Receiving a progress check code fed back by a target chip; according to a first data block of the target chip, calculating to obtain an expected check code based on a preset iterative algorithm; and comparing the progress check code with the expected check code to generate a progress check result.
  6. 6. The method for upgrading multi-chip firmware based on servo driver according to claim 1, wherein said executing a cooperative check according to the updated status information of each target chip to generate a firmware upgrade acceptance result specifically comprises: Extracting a current firmware version number and an operation state code according to the state information of each target chip after upgrading; Comparing the current firmware version number with a target version number in an integrated firmware package to obtain a version verification result; comparing the running state code with a preset standard running feature code to obtain an individual running verification result; inputting the operation state codes of at least two target chips into a preset cooperative relation model to obtain a cooperative check result; and judging that the firmware is successfully upgraded only when the version verification result, the individual operation verification result and the synergy verification result are all passed.
  7. 7. The multi-chip firmware upgrading system based on the servo driver is characterized by comprising a memory and a processor, wherein the memory comprises a multi-chip firmware upgrading method program based on the servo driver, and the multi-chip firmware upgrading method program based on the servo driver realizes the following steps when being executed by the processor: based on the integrated firmware package received from the upper computer, a preset compatibility mapping table and state information of each target chip, executing pre-verification processing to generate a pre-verification result; after the pre-verification is passed, analyzing and integrating the firmware package to obtain a first data block of each target chip; generating a double check code according to the first data block and the preamble associated data block thereof, wherein the double check code is used for executing differential check processing; according to the differentiation verification result, feeding back differentiation confirmation information or executing differentiation error processing; Responding to the differentiation confirmation information, and executing a firmware writing operation of the target chip according to the first data block; based on a preset query period, an acquired progress check code; performing progress verification according to the progress verification code and the expected verification code obtained through iterative calculation; if the progress check is abnormal, executing the pause or rollback operation; If the progress check is passed, continuously executing the firmware writing operation until the firmware upgrading is completed; and responding to the completion of firmware upgrading of all the target chips, and executing cooperative verification according to the state information of each target chip after upgrading to generate a firmware upgrading acceptance result.
  8. 8. The servo driver based multi-chip firmware upgrade system of claim 7, wherein the performing a pre-verification process generates a pre-verification result, specifically comprising: Extracting the current firmware version number, hardware version identification and running state code of the chip according to the state information of each target chip; extracting target firmware version information of each target chip according to the integrated firmware package; inputting the current hardware version identifier and the target firmware version information into the compatibility mapping table, and performing hardware compatibility matching processing to obtain a hardware compatibility result; Performing chip upgradeable state judgment processing based on the running state code to obtain a state permission result; and performing logical AND operation on the hardware compatibility result and the state permission result to generate the pre-verification result.
  9. 9. The servo driver based multi-chip firmware upgrade system of claim 7, wherein the generating a dual check code for performing a differential check process according to the first data block and its preamble-associated data block, specifically comprises: executing a first check code algorithm according to the first data block to generate a block check code; executing an association check code algorithm according to the first data block and at least one preamble association data block to generate an association check code; a first local check code and a second local check code which are fed back by the target chip; Comparing the block check code with a first local check code to generate a first check result; Comparing the associated check code with a second local check code to generate a second check result; and based on the combination of the first checking result and the second checking result, obtaining a differential checking result.
  10. 10. A computer readable storage medium having a computer program stored thereon, wherein the computer readable storage medium includes a servo driver based multi-chip firmware upgrade method program, which when executed by a processor, implements the steps of the servo driver based multi-chip firmware upgrade method according to any one of claims 1 to 6.

Description

Multi-chip firmware upgrading method, system and storage medium based on servo driver Technical Field The present invention relates to the field of multi-chip firmware upgrade, and more particularly, to a servo driver-based multi-chip firmware upgrade method, system, and storage medium. Background Along with the development of the industrial automation control system to the high performance and high reliability, in the field of servo drivers based on real-time Ethernet buses such as Profinet, the technical difficulty exists in upgrading the cooperative firmware of multiple chips (such as communication chips, MCU and FPGA) in the industrial automation control system. First, existing upgrade methods often lack a systematic pre-verification mechanism before starting the upgrade process, often only verify the firmware package integrity or simply check the version number, and ignore the compatibility of the critical hardware version and the real-time running state of the target chip. This results in the possibility of blind start-up of the upgrade operation under conditions of hardware mismatch or system instability, which is extremely prone to failure in the middle and even device lock-up. Secondly, in the firmware data transmission stage, the prior art relies on a single, isolated verification method such as CRC. The method can only detect the transmission errors of the data blocks, and cannot identify the loss of the data packets, the disordered receiving sequence or the logic relevance errors between the front data block and the rear data block, so that potential logic inconsistency hidden trouble is brought into the chip. Then, in the most critical process of writing the Flash firmware inside the chip, the existing scheme generally adopts a passive mode of 'verification after writing'. This means that silent errors such as bit flipping, memory cell failure, etc. that occur cannot be perceived and intervened at all during a writing period of up to several seconds or minutes, and can only be found when the entire verification is performed after all writing is completed, at which time the errors are already caused and the recovery cost is high. Finally, in the acceptance link after the upgrading is finished, the existing method only checks whether the version number reported by each chip is consistent with the target, but the verification of the actual operation correctness of the individual chips, particularly the verification of the logic collaborative work capability among multiple chips is lacking. Therefore, a need exists for a security upgrade technique that enables real-time monitoring and system-level collaborative verification throughout the entire upgrade process. Disclosure of Invention In view of the above problems, the present invention aims to provide a method, a system and a storage medium for upgrading multi-chip firmware based on a servo driver, which implement omnibearing management and control from start, execution to completion of upgrading operation by constructing a full-flow serial check chain of pre-check, transmission check, write supervision and co-acceptance. The method comprises the steps of firstly, carrying out logic and pre-verification by combining a compatibility mapping table and a chip real-time state, avoiding risks of hardware mismatch and state unsafe from the source, secondly, generating a double check code for each data block, and carrying out differentiated retransmission or sequence retransmission processing according to check failure types, thereby realizing accurate identification and efficient recovery of integrity errors and logic sequence errors in the data transmission process, and greatly improving the transmission reliability. And finally, through executing three-level final acceptance of version consistency, individual operation feature correctness and multi-chip system cooperativity, comprehensive function verification from an individual to the system is realized, and each chip of the driver after upgrading can normally cooperate. The first aspect of the present invention provides a method for upgrading multi-chip firmware based on a servo driver, the method comprising: based on the integrated firmware package received from the upper computer, a preset compatibility mapping table and state information of each target chip, executing pre-verification processing to generate a pre-verification result; after the pre-verification is passed, analyzing and integrating the firmware package to obtain a first data block of each target chip; generating a double check code according to the first data block and the preamble associated data block thereof, wherein the double check code is used for executing differential check processing; according to the differentiation verification result, feeding back differentiation confirmation information or executing differentiation error processing; Responding to the differentiation confirmation information, and executing a firmware w