CN109683935B - Application program upgrading method and device, frequency converter and storage medium - Google Patents

Application program upgrading method and device, frequency converter and storage medium Download PDF

Info

Publication number
CN109683935B
CN109683935B CN201811589859.5A CN201811589859A CN109683935B CN 109683935 B CN109683935 B CN 109683935B CN 201811589859 A CN201811589859 A CN 201811589859A CN 109683935 B CN109683935 B CN 109683935B
Authority
CN
China
Prior art keywords
upgrading
preset
dsp
application program
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811589859.5A
Other languages
Chinese (zh)
Other versions
CN109683935A (en
Inventor
胡时高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Invt Electric Co Ltd
Original Assignee
Shenzhen Invt Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Invt Electric Co Ltd filed Critical Shenzhen Invt Electric Co Ltd
Priority to CN201811589859.5A priority Critical patent/CN109683935B/en
Publication of CN109683935A publication Critical patent/CN109683935A/en
Application granted granted Critical
Publication of CN109683935B publication Critical patent/CN109683935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an application program upgrading method, an application program upgrading device, a frequency converter and a storage medium, wherein the method comprises the following steps: acquiring upgrading information of a preset upgrading file; judging an upgrading mode required to be adopted according to a preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode; if the adopted upgrading mode is the first upgrading mode, programming a preset upgrading file according to upgrading information and a first programming rule so as to upgrade the application program in the DSP; if the adopted upgrading mode is the second upgrading mode, judging whether the upgrading condition is met or not within first preset time according to upgrading information and preset upgrading rules; and if the upgrading condition is met, programming a preset upgrading file according to a second programming rule so as to upgrade the application program in the DSP. By implementing the scheme, the problems that the existing method for upgrading the DSP application program is troublesome to operate, difficult to upgrade and update under special occasions, overlong in upgrading time and the like can be solved.

Description

Application program upgrading method and device, frequency converter and storage medium
Technical Field
The present invention relates to the field of application program upgrading technologies, and in particular, to an application program upgrading method, an application program upgrading device, a frequency converter, and a storage medium.
Background
At present, in an integrated development environment (CCS), application program upgrade and update of a Digital Signal Processing (DSP) of a frequency converter are mainly updated by a Joint Test Action Group (JTAG) through a DSP simulator. Although the upgrading of the application program by using the JTAG interface and the DSP simulator is easy to operate and convenient to trace and debug, when the production is shifted from release to production in batch, for field operators, the upgrading method for upgrading the application program by using the JTAG interface and the DSP simulator is inconvenient to operate and low in universality, and the cost for upgrading the application program is greatly increased. In addition, when the DSP is installed in a complex and closed environment, the aim of upgrading the application program on line is difficult to achieve through the simulator; the online upgrading refers to directly upgrading the DSP application program without taking off the DSP from a control board of the frequency converter, and the offline upgrading refers to firstly burning the application program and then welding the DSP to the control board.
The upgrading method CAN solve the problem that the DSP application program is difficult to upgrade in special occasions, but the upgrading method needs to configure the pin state of the DSP to select a starting mode and needs to be operated and realized under the software of an upper computer, and the DSP system needs to have certain electromagnetic anti-interference capability in severe environment on the aspects of obtaining an upgrading file of the DSP application program, setting data communication baud rate and the like; in addition, the upgrading method and the DSP simulator program burning upgrading both need to consume longer time, and bring inconvenience to the upgrading of the DSP application program.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide an application program upgrading method, apparatus, frequency converter, and storage medium, which can facilitate user operations, and also can save the upgrading cost of an application program, greatly shorten the upgrading time, and improve the upgrading efficiency.
In a first aspect, an embodiment of the present invention provides an application program upgrading method, which includes:
obtaining upgrading information of a preset upgrading file, wherein the upgrading information is used for determining an application program to be upgraded in the DSP;
judging an upgrading mode required to be adopted according to a preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode;
if the upgrading mode required to be adopted is the first upgrading mode, programming the preset upgrading file according to the upgrading information and a first programming rule so as to upgrade the application program in the DSP;
if the upgrading mode required to be adopted is the second upgrading mode, judging whether upgrading conditions are met or not within first preset time according to the upgrading information and preset upgrading rules; and
and if the upgrading condition is met, programming the preset upgrading file according to a second programming rule so as to upgrade the application program in the DSP.
In a second aspect, an embodiment of the present invention further provides an application program upgrading apparatus, which includes:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the upgrading information of a preset upgrading file, and the upgrading information is used for determining an application program to be upgraded in the DSP;
the first reading judgment unit is used for judging the upgrading mode required to be adopted according to a preset rule, and the upgrading mode comprises a first upgrading mode and a second upgrading mode;
the first programming unit is used for programming the preset upgrading file according to the upgrading information and a first programming rule to upgrade the application program in the DSP if the upgrading mode required to be adopted is the first upgrading mode;
the first upgrading judgment unit is used for judging whether an upgrading condition is met or not according to the upgrading information and a preset upgrading rule within first preset time if the upgrading mode required to be adopted is the second upgrading mode; and
and the second programming unit is used for programming the preset upgrade file according to a second programming rule to upgrade the application program in the DSP if the upgrade condition is met.
In a third aspect, an embodiment of the present invention further provides a frequency converter, where the frequency converter includes a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to implement the method in the first aspect.
In a fourth aspect, the present invention also provides a computer-readable storage medium, in which a computer program is stored, the computer program including program instructions, which when executed by a processor, implement the method of the first aspect.
The embodiment of the invention provides an application program upgrading method, an application program upgrading device, a frequency converter and a storage medium. The embodiment of the invention can effectively solve the problems of troublesome operation, difficult application program upgrading and updating, overlong upgrading time, higher upgrading cost and the like in the conventional method for upgrading the DSP application program, especially in special occasions. The embodiment of the invention judges and determines whether a first upgrading mode or a second upgrading mode is adopted through a preset rule, if the first upgrading mode is adopted, a preset upgrading file is burnt through the first burning rule to upgrade the application program in the DSP, if the second upgrading mode is adopted, whether the requirement of upgrading the application program exists in first preset time or not is judged and determined through the preset upgrading rule, and if the requirement of upgrading the application program exists, the preset upgrading file is burnt according to the second burning rule to upgrade the application program in the DSP. By implementing the embodiment of the invention, the user can conveniently carry out upgrading operation, the purpose of upgrading the DSP application program on line can be realized without depending on additional tools, the cost for upgrading the application program can be saved, the upgrading time is greatly shortened, the upgrading efficiency is improved, and the problem that the DSP application program is difficult to update in special occasions is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an application program upgrading method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating step 103 of an application program upgrading method according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of step 103d of an application program upgrading method according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating step 105 of an application program upgrading method according to a first embodiment of the present invention;
fig. 5 is a flowchart illustrating an application program upgrading method according to a second embodiment of the present invention;
fig. 6 is a flowchart illustrating step 204 of an application program upgrading method according to a second embodiment of the present invention;
fig. 7 is a schematic block diagram of an application program upgrading apparatus according to a first embodiment of the present invention;
fig. 8 is a schematic block diagram of a first burning unit of an application program upgrading apparatus according to a first embodiment of the present invention;
fig. 9 is a schematic block diagram of a second programming unit of the application program upgrading apparatus according to the first embodiment of the present invention;
fig. 10 is a schematic block diagram of an application program upgrading apparatus according to a second embodiment of the present invention;
fig. 11 is a schematic block diagram of a second upgrade determining unit of an application upgrading apparatus according to a second embodiment of the present invention; and
fig. 12 is a schematic block diagram of a frequency converter according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Please refer to fig. 1, which is a schematic flowchart illustrating an application program upgrading method according to a first embodiment of the present invention. The application program upgrading method can be operated in a digital signal processor DSP or can be operated in a DSP-equipped device such as a frequency converter. Specifically, the application program upgrading method is used for upgrading the application program required to be upgraded in the DSP. As shown in fig. 1, the method may include steps S101 to S106.
S101, obtaining upgrading information of a preset upgrading file, wherein the upgrading information is used for determining an application program needing upgrading in the DSP.
Specifically, the obtained upgrade information is stored in a first memory, and the upgrade information is used for determining an application program required to be upgraded in the DSP. In an embodiment, the upgrade information includes a file name of a preset upgrade file and a first flag. In an embodiment, the application program upgrading method is applied to a frequency converter DSP, where the first memory may be a charged Erasable Programmable read-write memory (EEPROM) on the frequency converter main control board, that is, the obtained upgrading information is stored in the EEPROM memory, where storing the obtained upgrading information in the EEPROM memory is beneficial to quickly reading the upgrading information and facilitating erasing and changing the upgrading information, and the first memory is not particularly limited herein. In addition, the program in the DSP of the frequency converter includes a bottom layer program and an application program, where the bottom layer program is a bottom layer program for implementing the application program upgrading method, the application program is a program that needs to be run when the DSP of the frequency converter works, and the application program is specifically used for implementing the digital signal processing function of the DSP, where the bottom layer program of the DSP and the application program are separately stored in different areas of a second memory, in an embodiment, the second memory may be a Flash memory in a DSP chip, where the bottom layer program of the DSP is stored in sectors a to E of the Flash memory, and the application program of the DSP is stored in sectors F to N of the Flash memory, where a start address of the bottom layer program of the DSP is an entry address of the Flash memory, and in an embodiment, if the DSP of the frequency converter is TMS320F2807xDSP, an entry address of the Flash memory is 0x80000, a start address of the bottom layer program of the DSP is 0x80000. In addition, because the entry addresses of the Flash memories of the DSPs of different models are different, the initial addresses of the bottom layer programs of the DSPs are also different, and the initial addresses of the bottom layer programs of the DSPs are not particularly limited. In addition, both the bottom layer program and the application program of the DSP can perform read-write access to the EEPROM memory on the main control board of the frequency converter, that is, in this embodiment, the bottom layer program and the application program of the DSP can read the upgrade information from the EEPROM memory and erase and change the upgrade information during the operation.
S102, judging the upgrading mode required to be adopted according to a preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode.
Specifically, the step of judging the upgrading mode required to be adopted according to the preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode, and the step comprises the following steps of A-B:
the step A: reading a second flag from a second memory; and
the step B: and judging the upgrading mode required to be adopted according to the read second mark, wherein the second mark comprises a first preset value and a second preset value, the first preset value corresponds to the first upgrading mode, and the second preset value corresponds to the second upgrading mode.
Specifically, the second flag is located in the second memory, in an embodiment, for example, in this embodiment, the application program upgrade method is applied to a converter DSP, and the second memory may be a Flash memory in a DSP chip, and in an embodiment, if the converter DSP is TMS320F2807xDSP, two word locations with a start address of 0x81FFE are allocated to store the second flag, where different types of DSPs are allocated with different start addresses to store the second flag, and the start addresses of the second memory and the second flag are not specifically limited herein. Specifically, in this embodiment, the second flag is read from the DSP chip having an address of the Flash memory of 0x81FFE, where the second flag includes a first preset value and a second preset value, the first preset value corresponds to a first upgrade mode, the second preset value corresponds to a second upgrade mode, where "0" may be used as the first preset value, and "1" may be used as the second preset value, that is, when the program reads from the DSP chip having the Flash memory of "0", it is determined that the first upgrade mode is to be adopted, and when the program reads from the DSP chip having the second flag of "1", it is determined that the second upgrade mode is to be adopted, where no specific limitation is imposed on the first preset value and the second preset value of the second flag, where the first upgrade mode is the upgrade mode corresponding to the DSP application program that has never been written with the DSP bottom layer program, and the second upgrade mode is the upgrade mode corresponding to the DSP application program that has been written with the DSP bottom layer program, where in this embodiment, that the second flag is used to determine whether the DSP program has been written with the second upgrade mode.
S103, if the required upgrading mode is the first upgrading mode, programming the preset upgrading file according to the upgrading information and a first programming rule so as to upgrade the application program in the DSP.
Specifically, in an embodiment, if the second flag read from the second memory is the first preset value, it indicates that the DSP is to first program and load the bottom program of the DSP, that is, it indicates that the first upgrade mode needs to be adopted, and therefore, a preset upgrade file needs to be programmed according to the first programming rule to upgrade the application program in the DSP. The second flag is not particularly limited herein.
In one embodiment, the upgrade information includes a file name of a preset upgrade file and a first flag; and if the required upgrading mode is the first upgrading mode, programming the preset upgrading file according to the upgrading information and a first programming rule so as to upgrade the application program in the DSP, wherein the upgrading mode comprises a first programming upgrading method. The first burn-in upgrading method, as shown in fig. 2, is that step S103 includes substeps S103a to S103h. S103a, detecting whether a movable storage device exists in second preset time; s103b, if the movable storage device is detected within the second preset time, mounting a preset file system; s103c, reading a preset upgrading file corresponding to the file name in the movable storage equipment according to the file name and the mounted preset file system; s103d, programming the preset upgrading file into a second memory by calling a programming function so as to upgrade the application program in the DSP; s103e, generating a programming result flag value; s103f, setting the first flag as the programming result flag value and storing the programming result flag value; s103g, setting the second mark as a second preset value and storing the second preset value; and S103h, if the fact that the movable storage device does not exist in the second preset time is judged, the application program in the DSP is executed in a skipping mode.
Specifically, in an embodiment, the application program upgrading method is applied to a frequency converter DSP, the removable storage device includes a removable storage device such as a usb disk and a mobile hard disk, and the step S103a includes steps C to G:
and C, performing the step of: judging whether the current time is within a second preset time or not;
the step D: if the current time is within a second preset time, detecting whether a movable storage device exists or not; and
the step E: if the removable storage device exists, judging that the removable storage device exists in a second preset time;
the step F: if the removable storage device does not exist, judging that the removable storage device does not exist within second preset time;
the step G: and if the time is not within the second preset time, skipping to execute the application program in the DSP.
Specifically, the second preset time may be 10 seconds, 20 seconds, or 30 seconds, for example, if the second preset time is 10 seconds, when the removable storage device is not detected, the DSP system starts to automatically time, and then determines whether the time is within the second preset time according to the count value, that is, whether the time is within 10 seconds according to the count value, and if the removable storage device is detected within 10 seconds, automatically executes step S103b, that is, automatically mounts the preset file system, while detecting that the removable storage device is present within the second preset time; if the removable storage device cannot be detected within 10 seconds, judging that the removable storage device does not exist within a second preset time; and if the time is not within 10 seconds, automatically jumping to execute the application program in the DSP. In this embodiment, whether the timing time is within the second preset time is determined by the count value to perform time control on the whole process of detecting the removable storage device, so that the upgrade time can be effectively saved, the problem that the upgrade time is too long due to continuous detection after the removable storage device is not detected is prevented, and the DSP stays in the standby upgrade state due to continuous detection, so that the normal working state of the DSP is greatly influenced. The step of mounting the preset file system may specifically be registering and loading a driver corresponding to the removable storage device into the preset file system, so that the preset file system knows the existence of the removable storage device, and the preset file system may operate the removable storage device by calling a file operation function interface in a file library.
In an embodiment, the default File system may be a FatFS File system, and the FatFS File system is a universal FAT (File Allocation Table)/exFAT File system module designed for a small embedded system. The FatFS module is written to follow the ANSIC and is completely separate from the disk I/O layer. Therefore, it is independent of hardware architecture, it can be embedded into low cost microcontrollers, such as AVR,8051, PIC, ARM, Z80, 68K, etc. microcontrollers, without any modification. Therefore, in an embodiment, the preset file system is a FatFS file system, and the step S103b is specifically to create a file path to mount the FatFS file system into the created file path. When the FatFS file system is mounted, a FatFS variable needs to be specified, and optionally, the FatFS variable can use a static global variable.
In an embodiment, the reading of the preset upgrade file corresponding to the file name in the removable storage device according to the file name and the mounted preset file system includes a preset upgrade file reading method. As shown in fig. 3, step S103c includes sub-steps S103c1 to S103c2. S103c1, determining a preset upgrading file corresponding to the file name from a plurality of preset files stored in the movable storage device according to the file name; and S103c2, reading the determined preset upgrading file into a third memory according to a cyclic batch reading rule through the mounted preset file system.
Specifically, in an embodiment, for example, in this embodiment, a plurality of preset files are stored in the removable storage device, where the plurality of preset files are upgrade files of an application program, and the plurality of upgrade files are files in a bin or hex format, and in an embodiment, a DSP application file in an out format is generated by CCS Project in advance through compiling, and then the DSP application file in the out format is converted into a file in a hex format through a hex2000 tool, and then the file in the hex format is stored in the removable storage device. Specifically, a program instruction for updating and upgrading the DSP application is compiled and linked by CCS Project to generate a file with a modular format, where the file with the modular format is an out-format file, the out-format file cannot be directly written into the Flash memory, and needs to be converted into a data format file that can be recognized by the Flash memory, that is, the out-format file is converted into a file with a bin or hex format.
In an embodiment, the upgrade information includes a filename of a preset upgrade file and a first flag, so that the preset upgrade file may be correspondingly found in multiple preset files by using the obtained filename of the preset upgrade file, and then read by a mounted FatFS file system according to a cyclic batch reading rule, where the filename may be directly input by a user and stored in the first memory, or the filename of a preset upgrade file may be selected by the user from among multiple selectable filenames of the preset files to be input, and the cyclic batch reading rule is to cyclically read the preset upgrade file by using a for cycle statement for multiple times by using a certain amount of data until the preset upgrade file is completely read. Specifically, the mounted preset file system is used for reading n bytes of data of the preset upgrading file from the movable storage device and storing the n bytes of data into the third memory; using a for loop statement, wherein if a $ A byte appears, it indicates that m-bit byte data behind the $ A byte is an address value of a second memory, and the address value needs to be read and stored into the third memory correspondingly; after the address value is read and stored, continuously reading and storing the data value of the preset upgrading file into the third memory, wherein every a bytes of data are used as 1 group; and repeatedly executing the reading operation until the number of the characters read from the preset upgrade file of the removable storage device is less than n bytes of data, and when the number of the characters read is less than n bytes, indicating that the preset upgrade file is completely read. In an embodiment, the third memory may be a RAM memory in the DSP chip, that is, the preset upgrade file is read and temporarily stored in the RAM memory in the DSP chip.
In an embodiment, the step 103d specifically includes: and calling a programming function from a Flash API function library, and programming the preset upgrading file from a third memory for temporary storage into a second memory through the called programming function to upgrade the application program in the DSP, wherein the third memory can be an RAM memory in the DSP chip, and the second memory can be a Flash memory in the DSP chip.
In an embodiment, after the step S103d is executed, two kinds of programming results may occur, one is successful programming, and the other is unsuccessful programming, so that a flag value corresponding to the programming result needs to be generated, for example, "0" may be used as a flag value corresponding to successful programming, and "3" may be used as a flag value corresponding to unsuccessful programming, where a first flag in the upgrade information acquired in the step S101 is an upgrade flag indicating whether the DSP application program needs to be upgraded, the first flag is input by a user, and the first flag may be set in a user-defined manner in advance according to an actual application requirement of the user, for example, the flag values of the first flag may be set to "1" and "0" in advance, specifically, "1" may be used as a flag value corresponding to the first flag that the DSP application program needs to be upgraded, and "0" may be used as a flag value corresponding to the first flag that the DSP application program does not need to be upgraded, that the DSP application program needs to be upgraded when the acquired first flag is "1". For example, if the first flag is "1", after the preset upgrade file is successfully written, the DSP automatically sets the first flag to "0", which indicates that the preset upgrade file is successfully written, i.e. the DSP application program is successfully upgraded, and when the first flag is read again to "0", the DSP application program does not need to be upgraded, and if the user needs to upgrade the DSP application program, the user only needs to input and set the first flag to "1". If the first flag is "1", after the preset upgrade file is not successfully programmed, the DSP automatically sets the first flag to "3", which indicates that the preset upgrade file is not successfully programmed, i.e. the DSP application program is unsuccessfully upgraded, and when the first flag is read again to "3", the DSP application program may be prompted to the user that the upgrade of the DSP application program is unsuccessful, or the preset upgrade file may be directly programmed into the second memory to upgrade the application program in the DSP again, without specific limitations. The first mark in the upgrade information can be written in many times, and the user can change the first mark according to the self requirement.
In an embodiment, when a preset upgrade file is burnt to a corresponding position of a DSP application program, the second flag needs to be set to a second preset value and stored, where the second flag is still stored in a storage location before the second flag is set, and the second flag is a flag for determining whether the DSP has burnt the DSP bottom-layer program, and the second flag is set and written only once and then stored unchanged, and the user cannot change the second flag, so that the user can determine whether the DSP has burnt the bottom-layer program and the application program by using whether the read second flag is the first preset value or the second preset value, and if the DSP has never burnt the bottom-layer program, the application program in the DSP is upgraded by using a first upgrade manner; and if the programming loads the bottom layer program, upgrading the application program in the DSP by adopting a second upgrading mode.
And S104, if the required upgrading mode is the second upgrading mode, judging whether the upgrading condition is met or not within first preset time according to the upgrading information and a preset upgrading rule.
Specifically, in an embodiment, if the read second flag is a second preset value, it indicates that the DSP does not first write and load the bottom program of the DSP, that is, it indicates that a second upgrade manner needs to be adopted to upgrade the application program in the DSP, where the second flag is not specifically limited, and before the second upgrade manner is adopted, it is determined whether the DSP application program needs to be upgraded currently according to a preset upgrade rule within a first preset time. The preset upgrading rule comprises the steps of judging whether the timing time is within a first preset time through a counting value, namely judging whether the requirement of upgrading the application program exists or not according to a first mark in the obtained upgrading information within the first preset time, when the requirement of upgrading the application program does not exist, then debugging an upgrading command according to whether the requirement of upgrading the application program exists or not, and if the requirement of upgrading the application program exists or the upgrading command exists, the upgrading condition is met. The whole process of judging whether the DSP application program needs to be updated needs to be completed within the timed first preset time, and if the first preset time is exceeded, the DSP application program is directly skipped to be executed. The first flag is an upgrade flag of the DSP application program, for example, "0" may be used to indicate that upgrade is not needed, and "1" of the user indicates that upgrade is needed, that is, when the read first flag is "0", it indicates that the DSP application program does not need to be upgraded within a first preset time; when the first flag is read to be "1", it indicates that the DSP application needs to be upgraded within the first preset time. In addition, the first flag is input by a user and stored in the first memory. The first preset time may be 3 seconds, 5 seconds, or 10 seconds, and the first preset time is not particularly limited herein.
And S105, if the upgrading condition is met, programming a preset upgrading file according to a second programming rule so as to upgrade the application program in the DSP.
Specifically, in an embodiment, the upgrade information includes a file name of a preset upgrade file and a first flag; and if the upgrading condition is met, programming a preset upgrading file according to a second programming rule to upgrade the application program in the DSP by using a second programming upgrading method. In the second programming upgrade method, as shown in fig. 4, step S105 includes substeps S105a to S105h. S105a, if the upgrade condition is met, whether the movable storage equipment exists or not is detected within second preset time; s105b, if the movable storage device is detected within the second preset time, mounting a preset file system; s105c, reading a preset upgrading file corresponding to the file name in the movable storage equipment according to the file name and the mounted preset file system; s105g, erasing the DSP application program stored in the second storage by calling an erasing function; s105d, programming the preset upgrading file into the second memory by calling a programming function so as to upgrade the application program in the DSP; s105e, generating a programming result flag value; s105f, setting the first flag as the programming result flag value and storing the programming result flag value; and S105h, if the fact that the movable storage device does not exist in the second preset time is judged, skipping to execute the application program in the DSP.
Steps S105a to S105f and S105h are similar to steps S103a to S103f and S103h in the above embodiment of step S103, and are not repeated herein. Step S105f in step S105 will be described in detail.
In one embodiment, the application program upgrading method is applied to a frequency converter DSP, when the DSP loads a bottom layer program and an application program from unblown, the DSP application program is not stored in a second memory for storing the DSP application program, and the application program in the DSP can be upgraded by directly writing a preset upgrading file of the DSP application program to the second memory for storing the DSP application program; when the bottom layer program and the application program are programmed and loaded in the DSP, the DSP application program is programmed and stored in the second memory for storing the DSP application program, and therefore, after the DSP application program needs to be erased by using an erasing function, the preset upgrade file corresponding to the DSP application program can be programmed and stored in the second memory for storing the DSP application program, so as to upgrade the application program in the DSP. Wherein the erase function is invoked from within the Flash API function library.
And S106, if the DSP application program is judged not to be updated in the first preset time or the first preset time, skipping to execute the application program in the DSP.
Specifically, the whole process of judging whether the DSP application program needs to be upgraded needs to be completed within a first preset time, and if the first preset time is exceeded and the DSP application program is not completed, the DSP application program is directly skipped to be executed; and if the current time is judged within the first preset time and the DSP application program is determined not to be upgraded, directly skipping to execute the DSP application program.
In the above embodiment, the upgrade mode to be adopted is determined by preset rule judgment, where the upgrade mode includes a first upgrade mode and a second upgrade mode, if the upgrade mode to be adopted is the first upgrade mode, a preset upgrade file is programmed by the first programming rule to upgrade the application program in the DSP, if the upgrade mode to be adopted is the second upgrade mode, it is determined by the preset upgrade rule whether there is a need to upgrade the application program within a first preset time, and if there is a need to upgrade the application program, a preset upgrade file is programmed according to the second programming rule to upgrade the application program in the DSP. The embodiment of the invention can effectively solve the problems of troublesome operation, difficult application program upgrading and updating, overlong upgrading time, higher upgrading cost and the like in the existing method for upgrading the DSP application program, is convenient for a user to carry out upgrading operation, can realize online upgrading of the DSP application program without additional tools, can save the cost for upgrading the application program, greatly shortens the upgrading time, improves the upgrading efficiency and improves the user experience effect.
Please refer to fig. 5, which is a schematic flowchart illustrating an application program upgrading method according to a second embodiment of the present invention. As shown in fig. 5, the method may include steps S201 to S209. Steps S201 to S206 are similar to steps S101 to S106 in the above embodiments, and are not described herein again. The steps S207 to S209 added in the present embodiment are explained in detail below.
Step S207, receiving upgrade information of a preset upgrade file input by a user and saving the upgrade information in the first memory, where the upgrade information includes a file name and a first flag of the preset upgrade file.
Specifically, in an embodiment, the application program upgrading method is applied to a frequency converter DSP, where the DSP includes a bottom layer program and an application program, where the bottom layer program is a program corresponding to the application program upgrading method, and both the bottom layer program and the application program can perform read-write operation access on an EEPROM memory on the frequency converter main control board. When the DSP application of the frequency converter is running, the upgrade information input by the user is received through the external keyboard and written into the EEPROM for saving, where specifically, the upgrade information written into and saved may be the first flag is 1 and a filename of a preset upgrade file, and in this embodiment, the first memory is an EEPROM memory.
Step S208, whether a reset instruction exists is detected. Specifically, in an embodiment, whether a reset instruction exists inside the frequency converter DSP is detected in real time, if the reset instruction exists, the reset instruction is executed to the DSP, and if the reset instruction does not exist, the frequency converter DSP normally operates.
And S209, if a reset instruction exists, executing software reset on the DSP, wherein the software reset comprises watchdog reset and program jump reset.
Specifically, in one embodiment, the reset is a watchdog reset. After the reset is executed, the program jumps from the DSP application program to the entry address 0x80000 of the DSP bottom layer program, and then the bottom layer program is executed to upgrade the application program in the DSP.
In addition, the step S201 of obtaining the upgrade information of a preset upgrade file specifically includes:
and obtaining the upgrading information of the preset upgrading file from the first memory.
In the embodiment, the method and the device receive upgrade information of a preset upgrade file input by a user and store the upgrade information into the first memory, the upgrade information comprises a file name and a first mark of the preset upgrade file, whether a reset instruction exists or not is detected, and if the reset instruction exists, software reset is executed on the DSP. The upgrading method comprises a first upgrading mode and a second upgrading mode, if the upgrading mode to be adopted is the first upgrading mode, a preset upgrading file is written through a first programming rule to upgrade the application program in the DSP, if the upgrading mode to be adopted is the second upgrading mode, whether the requirement for upgrading the application program exists is judged and determined through the preset upgrading rule within first preset time, and if the requirement for upgrading the application program exists, the preset upgrading file is written through the second programming rule to upgrade the application program in the DSP. The method and the device can effectively solve the problems of troublesome operation, difficult application program upgrading and updating, overlong upgrading time, higher upgrading cost and the like in the existing method for upgrading the DSP application program, are convenient for a user to carry out upgrading operation, can realize online upgrading of the DSP application program without additional tools, can save the cost for upgrading the application program, greatly shorten the upgrading time, improve the upgrading efficiency and improve the user experience effect.
In an embodiment, please refer to fig. 6, which is a flowchart illustrating a step 204 of an application program upgrading method according to a second embodiment of the present invention, as shown in fig. 6, if an upgrading method required in the step 204 is the second upgrading method, the step of determining whether an upgrading condition is satisfied according to the upgrading information and a preset upgrading rule within a first preset time specifically includes the following steps S204a to S204e.
S204a, judging whether the current time is within a first preset time.
Specifically, whether the current timing time is within the first preset time is determined according to the count value, if the current timing time is within the first preset time, step S204b may be executed, and if not, the DSP application program is directly skipped to be executed. The first preset time can be 3 seconds, 5 seconds and 10 seconds, the first preset time is not particularly limited, and the first preset time can be set by a user in a self-defined mode according to actual application requirements.
And S204b, if the current time is within a first preset time, judging whether the requirement of upgrading the application program exists according to the first mark.
And S204c, if the requirement of upgrading the application program does not exist, judging whether an upgrading command exists in the serial port of the DSP.
Specifically, in one embodiment, the upgrade command may be input by 485 communication and received by a corresponding serial port.
S204d, if the requirement of upgrading the application program exists or an upgrading command exists, judging that an upgrading condition is met; and if the upgrading command does not exist, returning to execute the step of judging whether the current time is within the first preset time or not.
And S204e, if the time is not within the first preset time, skipping to execute the application program in the DSP.
Specifically, the whole process of judging whether the DSP application program needs to be updated needs to be completed within a first preset time, if the first preset time is exceeded, the DSP application program is directly skipped to execute, and the upgrading time can be effectively saved.
Please refer to fig. 7, which is a schematic block diagram of an application upgrading apparatus 100 according to a first embodiment of the present invention. As shown in fig. 7, the application upgrading apparatus 100 corresponds to the application upgrading method shown in fig. 1. The application upgrading apparatus 100 includes means for performing the application upgrading method, and the application upgrading apparatus 100 may be configured in a Digital Signal Processor (DSP), or in a DSP-equipped device such as a frequency converter. In particular, the application upgrading apparatus 100 may be configured to update an application requiring upgrading within an upgrading DSP. Referring to fig. 7, the application upgrading apparatus 100 includes a first obtaining unit 101, a first rule determining unit 102, a first programming unit 103, a first upgrading determining unit 104, a second programming unit 105, and a first jump executing unit 106.
The first obtaining unit 101 is configured to obtain upgrade information of a preset upgrade file, where the upgrade information is used to determine an application program to be upgraded in the DSP.
Specifically, the obtained upgrade information is stored in a first memory, and specifically, in an embodiment, the application program upgrade method is applied to a frequency converter DSP, where the first memory may be an EEPROM memory on a main control board of the frequency converter.
The first rule determining unit 102 is configured to determine an upgrade manner to be adopted according to a preset rule, where the upgrade manner includes a first upgrade manner and a second upgrade manner.
Specifically, the first rule judging unit 102 is configured to read the second flag from the second memory; and the upgrading mode required to be adopted is judged according to the read second mark, wherein the second mark comprises a first preset value and a second preset value, the first preset value corresponds to the first upgrading mode, and the second preset value corresponds to the second upgrading mode.
The first programming unit 103 is configured to, if the upgrade mode to be adopted is the first upgrade mode, program the preset upgrade file according to the upgrade information and the first programming rule to upgrade the application program in the DSP.
In one embodiment, as shown in fig. 8, the first writing unit 103 includes: a first device detecting unit 103a, a first mounting unit 103b, a first reading unit 103c, a first programming subunit 103d, a first generating unit 103e, a first setting unit 103f, a second setting unit 103g, and a first jump executing subunit 103h. The first device detecting unit 103a is used for detecting whether a removable storage device exists within a second preset time; the first mounting unit 103b is configured to mount a preset file system if the removable storage device is detected within a second preset time; the first reading unit 103c is configured to read a preset upgrade file corresponding to the file name in the removable storage device according to the file name and the mounted preset file system; the first programming subunit 103d is configured to program the preset upgrade file into the second memory by calling a programming function, so as to upgrade the application program in the DSP; a first generating unit 103e for generating a programming result flag value; a first setting unit 103f, configured to set the first flag to the programming result flag value and store the set value; a second setting unit 103g, configured to set the second flag to a second preset value and store the second preset value; and a first jump execution subunit 103h, configured to jump execute the application program in the DSP if it is determined that the removable storage device is not detected within the second preset time.
In an embodiment, the first device detecting unit 103a is specifically configured to determine, according to a count value, whether a current timing time is within a second preset time; the mobile storage device is used for detecting whether the mobile storage device exists or not within a second preset time; the mobile storage device is used for judging that the mobile storage device exists in a second preset time if the mobile storage device exists; if the removable storage device does not exist, judging that the removable storage device does not exist within a second preset time; and if the time is not within the second preset time, skipping to execute the application program in the DSP.
In an embodiment, the first mount unit 103b is configured to automatically mount a preset file system, and is specifically configured to register and load a driver corresponding to the removable storage device into the preset file system, so that the preset file system knows the existence of the removable storage device, and the preset file system may operate the removable storage device by calling a file operation function interface in a file library. The mobile storage device comprises a U disk, a mobile hard disk and other mobile storage devices, and the preset file system can be a FatFS file system.
In an embodiment, the first reading unit 103c further includes a determining unit 103c1 and a reading sub-unit 103c2. The determining unit 103c1 is configured to determine, according to the file name, a preset upgrade file corresponding to the file name from a plurality of preset files stored in the removable storage device; the reading subunit 103c2 is configured to read the determined preset upgrade file into the third memory according to a cyclic batch reading rule through the mounted preset file system.
In an embodiment, the first programming subunit 103d is specifically configured to call a programming function from a Flash API function library; and the preset upgrading file is burnt into the second memory from the third memory through the called burning function so as to upgrade the application program in the DSP.
The first upgrade determining unit 104 is configured to determine whether an upgrade condition is satisfied within a first preset time according to the upgrade information and a preset upgrade rule if the upgrade mode to be adopted is the second upgrade mode.
The second programming unit 105 is configured to, if the upgrade condition is met, program a preset upgrade file according to a second programming rule to upgrade the application program in the DSP.
In one embodiment, as shown in FIG. 9, the second programming unit 105 includes: a second device detection unit 105a, a second mounting unit 105b, a second reading unit 105c, a second programming subunit 105d, a second generation unit 105e, a third setting unit 103f, an erasing unit 105g, and a second jump execution subunit 103h. The second device detecting unit 105a is configured to detect whether a removable storage device exists within a second preset time if the upgrade condition is met; a second mounting unit 105b, configured to mount the preset file system if the removable storage device is detected within a second preset time; the second reading unit 105c is configured to read a preset upgrade file corresponding to the file name in the removable storage device according to the file name and the mounted preset file system; an erasing unit 105g for erasing the DSP application stored in the second memory by calling an erasing function; the second programming subunit 105d is configured to program the preset upgrade file into the second memory by calling a programming function, so as to upgrade the application program in the DSP; a second generating unit 105e for generating a programming result flag value; a third setting unit 105f, configured to set the first flag to the programming result flag value and store the set value; and a second jump execution subunit 105h, configured to jump and execute the application program in the DSP if it is determined that the removable storage device is not detected within the second preset time.
In an embodiment, the erasing unit 105g is specifically configured to call an erasing function from a Flash API function library; and the DSP application program stored in the second memory is erased through the called erasing function.
The first jump execution unit 106 is configured to jump to execute the application program in the DSP if it is determined that the DSP application program is not updated within the first preset time or within the first preset time.
It should be noted that, as will be clear to those skilled in the art, the specific implementation process and effect of the application program upgrading apparatus 100 and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
Please refer to fig. 10, which is a schematic block diagram of an application upgrading apparatus 200 according to a second embodiment of the present invention. As shown in fig. 10, the application upgrading apparatus 200 corresponds to the application upgrading method shown in fig. 5. An information receiving unit 207, a reset instruction detecting unit 208, and a resetting unit 209 are added to the application program upgrading apparatus 200 provided by the second embodiment of the present invention, that is, the apparatus 200 includes a second obtaining unit 201, a second rule determining unit 202, a third programming unit 203, a second upgrading determining unit 204, a fourth programming unit 205, a second jump performing unit 206, an information receiving unit 207, a reset instruction detecting unit 208, and a resetting unit 209. The second obtaining unit 201, the second rule determining unit 202, the third programming unit 203, the second upgrade determining unit 204, the fourth programming unit 205, and the second jump performing unit 206 are similar to the first obtaining unit 101, the first rule determining unit 102, the first programming unit 103, the first upgrade determining unit 104, the second programming unit 105, and the first jump performing unit 106 in the foregoing embodiment, and since the application process and the corresponding functions thereof are similar to those of the corresponding units in the foregoing embodiment, they are not described herein again.
The information receiving unit 207 is configured to receive upgrade information of a preset upgrade file input by a user and store the upgrade information in the first memory, where the upgrade information includes a file name and a first flag of the preset upgrade file.
The reset instruction detection unit 208 is configured to detect whether a reset instruction exists.
The reset unit 209 is configured to perform software reset on the DSP if a reset instruction exists, where the software reset includes watchdog reset and program jump reset.
The second obtaining unit 201 is configured to obtain upgrade information of the preset upgrade file from the first memory.
In one embodiment, as shown in fig. 11, the second upgrade determining unit 204 includes: a time judging unit 204a, a flag judging unit 204b, a command judging unit 204c, a judgment upgrading unit 204d, and a returning unit 204e.
The time judging unit 204a is configured to judge whether the current time is within a first preset time.
The flag determining unit 204b is configured to determine whether there is a need to upgrade the application program according to the first flag if the current time is within a first preset time.
The command determining unit 204c is configured to determine whether an upgrade command exists in the serial port of the DSP if there is no need to upgrade the application program.
And the judging and upgrading unit 204d is configured to meet the upgrading condition if there is a need to upgrade the application program or there is an upgrading command.
The returning unit 204e is configured to return to execute the step of determining whether the current time is within the first preset time if the upgrade command does not exist.
The second jump execution unit 206 is further configured to jump execute the application program in the DSP if the second jump execution unit is not within the first preset time.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process and effect of the application upgrading apparatus 200 and each unit may refer to the corresponding description in the foregoing method embodiments, and are not described herein again for convenience and conciseness of description.
The above-described system may be implemented in the form of a computer program that can be run on a frequency converter as shown in fig. 12.
Please refer to fig. 12, which is a schematic block diagram of a frequency converter according to an embodiment of the present invention. The frequency converter 600 includes a Digital Signal Processor (DSP) 602, a memory, which may include a non-volatile storage medium 603 and an internal memory 604, and a communication interface 605 connected by a system bus 601.
The non-volatile storage medium 603 may store an operating system 6031 and computer programs 6032. The computer program 6032 includes program instructions that, when executed, cause the DSP processor 602 to perform an application upgrade method, where the application upgrade method may be specifically used to upgrade applications that need to be upgraded within the processor 602.
The internal memory 604 provides an environment for the execution of a computer program 6032 on the non-volatile storage medium 603, which computer program 6032, when executed by the processor 602, causes the processor 602 to perform an application upgrade method.
The communication interface 605 is used for communication with other devices. It will be understood by those skilled in the art that the structure shown in fig. 12 is a block diagram of only a portion of the structure associated with the present application, and does not constitute a limitation on the frequency converter 600 to which the present application is applied, and that a particular frequency converter 600 may include more or fewer components than shown in the figures, or may combine certain components, or have a different arrangement of components.
Wherein the DSP processor 602 is configured to run a computer program 6032 stored in memory to implement the application upgrade method described above.
It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiments may be implemented by a computer program. The computer program includes program instructions, and the computer program may be stored in a storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a computer-readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program comprises program instructions. The program instructions, when executed by the processor, cause the processor to perform the application upgrade method as described above.
The storage medium may be a Flash Memory device (Flash), a usb disk, a removable hard disk, a Read-only Memory (ROM), a magnetic disk, or an optical disk, which can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the system of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a frequency converter (which may be other embedded devices configured with a DSP, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. An application program upgrading method applied to a DSP is characterized by comprising the following steps:
acquiring upgrading information of a preset upgrading file, wherein the upgrading information is used for determining an application program required to be upgraded in the DSP, and the upgrading information comprises a file name and a first mark of the preset upgrading file;
judging an upgrading mode required to be adopted according to a preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode, the first upgrading mode is adopted if the DSP never writes a DSP bottom layer program, and the second upgrading mode is adopted if the DSP writes the DSP bottom layer program;
if the required upgrading mode is the first upgrading mode, executing the following steps:
detecting whether a removable storage device exists within a second preset time;
if the movable storage equipment does not exist, skipping to execute the application program in the DSP;
if the movable storage equipment is detected within the second preset time, mounting a preset file system;
determining a preset upgrading file corresponding to the file name from a plurality of preset files stored in the movable storage equipment according to the file name;
reading the determined preset upgrading file into a third memory according to a cyclic batch reading rule through the mounted preset file system;
programming the preset upgrading file into a second memory by calling a programming function so as to upgrade the application program in the DSP;
generating a programming result flag value;
setting the first flag as the programming result flag value and storing; and
setting a second mark as a second preset value and storing the second preset value;
if the upgrading mode required to be adopted is the second upgrading mode, the following steps are executed:
judging whether the current time is within a first preset time or not;
if the current time is within a first preset time, judging whether the requirement of upgrading the application program exists or not according to the first mark;
if the requirement for upgrading the application program does not exist, judging whether an upgrading command exists in the serial port of the DSP;
if the requirement for upgrading the application program exists or an upgrading command exists, judging that an upgrading condition is met;
if the upgrading command does not exist, returning to the step of judging whether the current time is within the first preset time or not;
if the time is not within the first preset time, skipping to execute the application program in the DSP;
and if the upgrading condition is met, programming the preset upgrading file according to a second programming rule so as to upgrade the application program in the DSP.
2. The method for upgrading the application program according to claim 1, wherein before the step of obtaining upgrade information of a preset upgrade file, the upgrade information being used for determining the application program to be upgraded in the DSP, the method further comprises:
receiving upgrade information of a preset upgrade file input by a user and storing the upgrade information into a first memory, wherein the upgrade information comprises a file name and a first mark of the preset upgrade file;
detecting whether a reset instruction exists;
if a reset instruction exists, executing software reset on the DSP, wherein the software reset comprises watchdog reset and program jump reset; and
the step of obtaining the upgrade information of a preset upgrade file includes:
and obtaining the upgrading information of the preset upgrading file from the first memory.
3. The method for upgrading an application program according to claim 1, wherein the upgrading modes required to be adopted are judged according to preset rules, the upgrading modes include a first upgrading mode and a second upgrading mode, and the method includes:
reading a second flag from a second memory; and
and judging an upgrading mode required to be adopted according to the read second mark, wherein the second mark comprises a first preset value and a second preset value, the first preset value corresponds to the first upgrading mode, and the second preset value corresponds to the second upgrading mode.
4. The application program upgrading method according to claim 1, wherein the upgrading information comprises a file name of a preset upgrading file and a first flag;
if the upgrade condition is met, programming the preset upgrade file according to a second programming rule to upgrade the application program in the DSP, wherein the method comprises the following steps:
if the upgrade condition is met, detecting whether the movable storage equipment exists or not within second preset time;
if the movable storage equipment is detected within the second preset time, mounting a preset file system;
reading a preset upgrading file corresponding to the file name in the movable storage equipment according to the file name and the mounted preset file system;
erasing the DSP application program stored in the second memory by calling an erasing function;
programming the preset upgrading file into the second memory by calling a programming function so as to upgrade the application program in the DSP;
generating a programming result flag value; and
and setting the first flag as the programming result flag value and storing.
5. An application program upgrade apparatus, comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the upgrading information of a preset upgrading file, the upgrading information is used for determining an application program required to be upgraded in the DSP, and the upgrading information comprises the file name and a first mark of the preset upgrading file;
the first reading judgment unit is used for judging an upgrading mode required to be adopted according to a preset rule, wherein the upgrading mode comprises a first upgrading mode and a second upgrading mode, the first upgrading mode is adopted if the DSP never writes a DSP bottom layer program, and the second upgrading mode is adopted if the DSP writes the DSP bottom layer program;
the first equipment detection unit is used for detecting whether the removable storage equipment exists within second preset time;
the first jump execution subunit is used for executing the application program in the DSP in a jump manner if the fact that the movable storage device does not exist in the second preset time is judged;
the first mounting unit is used for mounting a preset file system if the movable storage equipment is detected within second preset time;
the first reading unit is used for reading a preset upgrading file corresponding to the file name in the movable storage equipment according to the file name and the mounted preset file system;
the first programming subunit is used for programming the preset upgrading file into a second memory by calling a programming function so as to upgrade the application program in the DSP;
the first generating unit is used for generating a programming result flag value;
the first setting unit is used for setting the first mark as the programming result mark value and storing the programming result mark value;
the second setting unit is used for setting the second mark as a second preset value and storing the second preset value;
the time judging unit is used for judging whether the current time is within a first preset time or not;
the mark judging unit is used for judging whether the requirement of upgrading the application program exists or not according to the first mark if the current time is within a first preset time;
the command judging unit is used for judging whether an upgrading command exists in the serial port of the DSP if the requirement for upgrading the application program does not exist;
the judging and upgrading unit is used for meeting the upgrading condition if the requirement of upgrading the application program exists or an upgrading command exists;
the return unit is used for returning and executing the step of judging whether the current time is within the first preset time or not if the upgrading command does not exist;
the second jump execution unit is used for jumping and executing the application program in the DSP if the second jump execution unit is not in the first preset time;
and the second programming unit is used for programming the preset upgrade file according to a second programming rule to upgrade the application program in the DSP if the upgrade condition is met.
6. Frequency converter, characterized in that it comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program, implements the application upgrade method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the application program upgrade method according to any one of claims 1-4.
CN201811589859.5A 2018-12-25 2018-12-25 Application program upgrading method and device, frequency converter and storage medium Active CN109683935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811589859.5A CN109683935B (en) 2018-12-25 2018-12-25 Application program upgrading method and device, frequency converter and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811589859.5A CN109683935B (en) 2018-12-25 2018-12-25 Application program upgrading method and device, frequency converter and storage medium

Publications (2)

Publication Number Publication Date
CN109683935A CN109683935A (en) 2019-04-26
CN109683935B true CN109683935B (en) 2022-10-11

Family

ID=66189382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811589859.5A Active CN109683935B (en) 2018-12-25 2018-12-25 Application program upgrading method and device, frequency converter and storage medium

Country Status (1)

Country Link
CN (1) CN109683935B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879717B (en) * 2019-11-27 2023-06-27 四川虹美智能科技有限公司 EEPROM parameter programming device and method
CN112988209B (en) * 2021-03-31 2023-07-21 清华大学 Method and apparatus for online program upgrades in a rotor suspension control system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
US8826261B1 (en) * 2010-02-25 2014-09-02 Bloom Energy Corporation Programming processors through CAN interface without changing the boot mode select pins
CN104881301A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Burning method and device for DSP (digital signal processing) chip program upgrading
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN108255508A (en) * 2018-01-18 2018-07-06 晶晨半导体(上海)股份有限公司 A kind of method for upgrading system and embedded device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8826261B1 (en) * 2010-02-25 2014-09-02 Bloom Energy Corporation Programming processors through CAN interface without changing the boot mode select pins
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
CN104881301A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Burning method and device for DSP (digital signal processing) chip program upgrading
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN108255508A (en) * 2018-01-18 2018-07-06 晶晨半导体(上海)股份有限公司 A kind of method for upgrading system and embedded device

Also Published As

Publication number Publication date
CN109683935A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109933348B (en) Method and device for updating Bootloader in electronic control unit
CN102902556B (en) The multistage boot load method of a kind of embedded equipment
US20080184072A1 (en) Firmware ROM Patch Method
US20050268195A1 (en) Apparatus and method for improving emulation speed of high-level languages in on-chip emulation systems
US5935006A (en) Debug apparatus and method for debugging game program in ROM cartridge
CN109683935B (en) Application program upgrading method and device, frequency converter and storage medium
CN101553789A (en) Method and system for managing a suspend request in a flash memory
CN109933326B (en) Compiling method and device for rewriting codes and corresponding terminal
CN106909480B (en) Cross debugging method and device for embedded system
CN105718281A (en) Touch screen firmware upgrading method and device
CN111679839B (en) On-line programming method of MCU FLASH
CN101169729A (en) Embedded type system and method for renewing application program
CN116541032B (en) Data burning method, device, equipment and computer storage medium
US6925522B2 (en) Device and method capable of changing codes of micro-controller
CN112306782B (en) Debugging test-oriented operating system kernel guiding and loading hardware and method
CN111459508B (en) BootLoader self-upgrading method and system
CN110765008A (en) Data processing method and device
CN217640186U (en) TMS320F 28335-based IAP online upgrading module
CN112764379B (en) IAP control method based on DSP system
CN111078261B (en) Flash memory upgrading device and vehicle
CN113590153B (en) Firmware upgrading method, system, equipment and medium of CPLD
CN114138588B (en) Method, system, equipment and medium for deriving debug information of controller
CN102799466B (en) Guide device and guide method applied to PowerPC minimum system
KR101113342B1 (en) Boot-loader version managing method for mobile communication terminal
CN100385421C (en) Method for preventing rewriting to programmable chip software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant