CN113179178A - DSP (digital signal processor) upgrading method and device based on measurement and control host - Google Patents

DSP (digital signal processor) upgrading method and device based on measurement and control host Download PDF

Info

Publication number
CN113179178A
CN113179178A CN202110432273.3A CN202110432273A CN113179178A CN 113179178 A CN113179178 A CN 113179178A CN 202110432273 A CN202110432273 A CN 202110432273A CN 113179178 A CN113179178 A CN 113179178A
Authority
CN
China
Prior art keywords
measurement
control host
spiboottask
file
dsp
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.)
Pending
Application number
CN202110432273.3A
Other languages
Chinese (zh)
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 Tianchen Defense Communication Technology Co ltd
Original Assignee
Shenzhen Tianchen Defense Communication Technology 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 Tianchen Defense Communication Technology Co ltd filed Critical Shenzhen Tianchen Defense Communication Technology Co ltd
Priority to CN202110432273.3A priority Critical patent/CN113179178A/en
Publication of CN113179178A publication Critical patent/CN113179178A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention relates to the technical field of DSP (digital signal processor) upgrading, and discloses a DSP upgrading method and device based on a measurement and control host, wherein the method comprises the following steps: adding SpiBootTask task process and TCP and UDP service processes in the main process of the measurement and control host, and carrying out the processes concurrently; the TCP service process monitors whether corresponding TCP protocol command packet writing exists or not; if yes, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC. The invention is convenient for upgrading the DSP through the Ethernet, and improves the upgrading efficiency of the DSP.

Description

DSP (digital signal processor) upgrading method and device based on measurement and control host
Technical Field
The invention relates to the technical field of DSP upgrading, in particular to a DSP upgrading method and device based on a measurement and control host.
Background
The measurement and control host is a control terminal device, and with the continuous upgrading and changing of the technology, the DSP of the measurement and control host needs to be updated iteratively.
Therefore, how to provide a method and a device for upgrading a DSP based on a measurement and control host to improve the efficiency of upgrading the DSP becomes an urgent technical problem to be solved.
Disclosure of Invention
The technical problem to be solved by the invention is how to provide a DSP upgrading method and device based on a measurement and control host machine so as to improve the DSP upgrading efficiency.
Therefore, according to a first aspect, an embodiment of the present invention discloses a method for upgrading a DSP based on a measurement and control host, including: adding SpiBootTask task process and TCP and UDP service processes in the main process of the measurement and control host, and carrying out the processes concurrently; the TCP service process monitors whether corresponding TCP protocol command packet writing exists or not; if yes, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC.
Optionally, before adding a SpiBootTask process and TCP and UDP service processes to the main process of the measurement and control host and performing concurrent processes, the method further includes: and initializing the network port in the main process of the measurement and control host.
Optionally, the TCP protocol command packet includes a header, a packet type, a packet length, a packet sequence number, a command, a parameter, and a check code.
Optionally, when the number of bytes of the programming file received by the UDP service process is consistent with the length of the programming file in the TCP protocol command packet, the service process releases the semaphore in the SpiBootTask process, and the SpiBootTask process is activated.
Optionally, when the header, the message type and the check code received by the TCP service of the DSP are consistent, the command item in the packet is resolved, and the next task is executed.
Optionally, the first 4 bytes of the data area of each UDP packet are set as Ox5555AAAA as a programming file flag, and the last 996 bytes are put into the byte content of the programming file.
According to a second aspect, an embodiment of the present invention discloses a DSP upgrading apparatus based on a measurement and control host, including: the adding module is used for adding a SpiBootTask task process and TCP and UDP service processes in a main process of the measurement and control host, and the processes are performed concurrently; the monitoring module is used for monitoring whether a corresponding TCP protocol command packet is written in the TCP service process; a reading module, configured to read a file length from the TCP protocol command packet if the file length exists, set a start-programming global variable boot-file-start to 1, and start receiving, by the UDP service process, a content of a programmed file; the judging module is used for judging whether the UDP service process is received completely; the releasing module is used for releasing the semaphore sem in the SpiBootTask task process if the semaphore sem is in the SpiBootTask task process; the execution module is used for activating the SpiBootTask task process and executing programming operation; and the loopback module is used for completing the programming operation and sending information back to the PC.
Optionally, the method further comprises: and the initial module is used for carrying out initialization operation on the network port in the main process of the measurement and control host.
According to a third aspect, an embodiment of the present invention discloses a computer apparatus, including a processor, where the processor is configured to execute a computer program stored in a memory to implement the method for upgrading a DSP based on a measurement and control host according to any one of the first aspect.
According to a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, where a processor is configured to execute the computer program stored in the storage medium to implement the method for upgrading a DSP based on a measurement and control host according to any one of the first aspect.
The invention has the following beneficial effects: the embodiment of the invention discloses a DSP upgrading method based on a measurement and control host, which is characterized in that a SpiBootTask task process and TCP and UDP service processes are added into a main process of the measurement and control host, and the processes are carried out concurrently; the TCP service process monitors whether corresponding TCP protocol command packet writing exists or not; if yes, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC. Compared with the prior art, the invention is convenient for upgrading the DSP through the Ethernet, and improves the upgrading efficiency of the DSP.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a DSP upgrading method based on a measurement and control host disclosed in this embodiment;
fig. 2 is a schematic structural diagram of a DSP upgrading apparatus based on a measurement and control host disclosed in this embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention discloses a DSP upgrading method based on a measurement and control host, which comprises the following steps as shown in figure 1:
step S101, adding a SpiBootTask task process and TCP and UDP service processes in a main process of a measurement and control host, and carrying out the processes concurrently;
step S102, the TCP service process monitors whether a corresponding TCP protocol command packet is written in;
step S103, if yes, reading the file length from the TCP command packet, setting the start to burn the global variable boot-file-start to be 1, and starting to receive the contents of the written file by the UDP service process;
step S104, judging whether the UDP service process is received;
step S105, if yes, releasing the semaphore sem in the SpiBootTask task process;
step S106, activating the SpiBootTask task process, and executing programming operation;
and step S107, completing the programming operation and sending information back to the PC.
It should be noted that, in the DSP upgrading method based on the measurement and control host disclosed in the embodiment of the present invention, a SpiBootTask process and TCP and UDP service processes are added to a main process of the measurement and control host, and the processes are performed concurrently; the TCP service process monitors whether a corresponding TCP protocol command packet is written or not; if so, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC. Compared with the prior art, the invention is convenient for upgrading the DSP through the Ethernet, and improves the upgrading efficiency of the DSP.
In an alternative embodiment, before step S101, the method further includes:
and step S100, initializing the network port in the main process of the measurement and control host.
In the specific implementation process, the TCP protocol command packet is composed of a header, a packet type, a packet length, a packet sequence number, a command, a parameter, and a check code.
In a specific implementation process, when the number of bytes of the programming file received by the UDP service process is consistent with the length of the programming file in the TCP protocol command packet, the service process releases the semaphore in the SpiBootTask process, and the SpiBootTask process is activated. After the SpiBootTask task process is activated, initializing the SPI interface, and executing flash programming operation and verification after programming.
In the specific implementation process, when the header, the message type and the check code received by the TCP service of the DSP are consistent, the command item in the packet is resolved, and the next task is executed.
In the specific implementation process, the initial 4 bytes of the data area of each UDP message are set as Ox5555AAAA to serve as a programming file mark, and the byte content of the programming file is placed into the last 996 bytes.
In the specific implementation process, the length of the IP data packet is 1500 bytes; when the file exceeds 1472 bytes, the file is subjected to fragmentation processing.
The embodiment of the invention discloses a DSP upgrading device based on a measurement and control host, as shown in figure 2, comprising: an adding module 201, configured to add a SpiBootTask process and TCP and UDP service processes to a main process of the measurement and control host, where the processes are performed concurrently;
the monitoring module 202 is used for monitoring whether a corresponding TCP protocol command packet is written in by a TCP service process;
the reading module 203 is configured to read the length of the file from the TCP protocol command packet if the length of the file exists, set a start-to-write global variable boot-file-start to be 1, and start to receive the content of the written file by the UDP service process;
a judging module 204, configured to judge whether the UDP service process is completely received;
a releasing module 205, configured to release the semaphore sem in the SpiBootTask process if the semaphore sem is in the SpiBootTask process;
the execution module 206 is used for activating the SpiBootTask task process and executing programming operation;
and the loopback module 207 is used for completing programming operation and looping back information to the PC.
In an optional embodiment, the method further comprises:
the initialization module 200 is configured to perform initialization operation on the network port in a main process of the measurement and control host.
In addition, an embodiment of the present invention further provides a computer apparatus, where a processor executes computer instructions, so as to implement the following method:
adding SpiBootTask task process and TCP and UDP service processes in the main process of the measurement and control host, and carrying out the processes concurrently; the TCP service process monitors whether a corresponding TCP protocol command packet is written or not; if so, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. The computer processor is used to execute a computer program stored in a storage medium to implement the following method:
adding SpiBootTask task process and TCP and UDP service processes in the main process of the measurement and control host, and carrying out the processes concurrently; the TCP service process monitors whether a corresponding TCP protocol command packet is written or not; if so, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process; judging whether the UDP service process is received completely; if so, releasing the semaphore sem in the SpiBootTask task process; activating the SpiBootTask task process and executing programming operation; and after the programming operation is finished, returning information to the PC.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. These should also be construed as the scope of the present invention, and they should not be construed as affecting the effectiveness of the practice of the present invention or the applicability of the patent. And are neither required nor exhaustive of all embodiments. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A DSP upgrading method based on a measurement and control host is characterized by comprising the following steps:
adding SpiBootTask task process and TCP and UDP service processes in the main process of the measurement and control host, and carrying out the processes concurrently;
the TCP service process monitors whether corresponding TCP protocol command packet writing exists or not;
if yes, reading the file length from the TCP protocol command packet, setting a start-programming global variable boot-file-start to be 1, and starting to receive the programming file content by the UDP service process;
judging whether the UDP service process is received completely;
if so, releasing the semaphore sem in the SpiBootTask task process;
activating the SpiBootTask task process and executing programming operation;
and after the programming operation is finished, returning information to the PC.
2. The measurement and control host-based DSP upgrading method according to claim 1, wherein adding a SpiBootTask process and TCP, UDP service processes in the host process of the measurement and control host, further comprising, before the processes are performed concurrently:
and initializing the network port in the main process of the measurement and control host.
3. The measurement and control host-based DSP upgrading method according to claim 1, wherein the TCP protocol command packet consists of a header, a packet type, a packet length, a packet sequence number, a command, a parameter, and a check code.
4. The measurement and control host-based DSP upgrading method according to claim 1, wherein when the number of bytes of the programming file received by the UDP service process is consistent with the length of the programming file in the TCP protocol command packet, the service process releases the semaphore in the SpiBootTask task process, and the SpiBootTask task process is activated.
5. The measurement and control host-based DSP upgrading method according to claim 1, wherein when the header, the message type and the check code received by the TCP service of the DSP are consistent, the command item in the packet is resolved, and the next task is executed.
6. The measurement and control host-based DSP upgrading method according to claim 1, wherein the first 4 bytes of the data area of each UDP message are set as Ox5555AAAA as a programming file mark, and the last 996 bytes are put into the byte content of the programming file.
7. The utility model provides a DSP upgrading device based on observe and control host computer which characterized in that includes:
the adding module is used for adding a SpiBootTask task process and TCP and UDP service processes in a main process of the measurement and control host, and the processes are performed concurrently;
the monitoring module is used for monitoring whether a corresponding TCP protocol command packet is written in the TCP service process;
a reading module, configured to read a file length from the TCP protocol command packet if the file length exists, set a start-programming global variable boot-file-start to 1, and start receiving, by the UDP service process, a content of a programmed file;
the judging module is used for judging whether the UDP service process is received completely;
the releasing module is used for releasing the semaphore sem in the SpiBootTask task process if the semaphore sem is in the SpiBootTask task process;
the execution module is used for activating the SpiBootTask task process and executing programming operation;
and the loopback module is used for completing the programming operation and sending information back to the PC.
8. The measurement and control host-based DSP upgrading device according to claim 7, further comprising:
and the initial module is used for carrying out initialization operation on the network port in the main process of the measurement and control host.
9. A computer arrangement comprising a processor for executing a computer program stored in a memory to implement the instrumentation host based DSP upgrade method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, wherein a processor is configured to execute the computer program stored in the storage medium to implement the measurement and control host-based DSP upgrade method according to any one of claims 1-6.
CN202110432273.3A 2021-04-22 2021-04-22 DSP (digital signal processor) upgrading method and device based on measurement and control host Pending CN113179178A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110432273.3A CN113179178A (en) 2021-04-22 2021-04-22 DSP (digital signal processor) upgrading method and device based on measurement and control host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110432273.3A CN113179178A (en) 2021-04-22 2021-04-22 DSP (digital signal processor) upgrading method and device based on measurement and control host

Publications (1)

Publication Number Publication Date
CN113179178A true CN113179178A (en) 2021-07-27

Family

ID=76924828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110432273.3A Pending CN113179178A (en) 2021-04-22 2021-04-22 DSP (digital signal processor) upgrading method and device based on measurement and control host

Country Status (1)

Country Link
CN (1) CN113179178A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881302A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Burning method and device for DSP chip program upgrading
CN111857776A (en) * 2020-07-09 2020-10-30 天津津航计算技术研究所 Online upgrading method for application programs of DSP (digital Signal processor) board cards

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881302A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Burning method and device for DSP chip program upgrading
CN111857776A (en) * 2020-07-09 2020-10-30 天津津航计算技术研究所 Online upgrading method for application programs of DSP (digital Signal processor) board cards

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
易俊: "基于TMS320C6678网口的程序自更新应用技术", 《电子制作》 *

Similar Documents

Publication Publication Date Title
JP5278222B2 (en) Wireless communication apparatus, wireless communication method, and wireless communication program
CN110147240B (en) Cloud storage-based application program installation method, system and storage medium
CN110134418A (en) Vehicle upgrade method and device, storage medium and terminal based on space download technology
EP2701059A1 (en) Method and apparatus for loading application program
CN111078278B (en) Automatic packaging method supporting Flutter and iOS mixed editing project
JPH05509430A (en) Downloading the operating system over the network
CN109842610B (en) Interface request processing method and device, computer equipment and storage medium
CN109471738A (en) A kind of application program downloads recognition methods and the relevant device of channel
CN110727608A (en) Log data storage method, electronic equipment and storage medium
CN105786985A (en) Automatic method and device for expanding file systems automatically
CN107770299A (en) A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN114416135A (en) Internet of things cloud platform remote terminal upgrading system and method
CN113179178A (en) DSP (digital signal processor) upgrading method and device based on measurement and control host
CN110769411B (en) Method, device, equipment and system for stably realizing batch OTA (over the air) upgrade of terminal equipment
WO2023036064A1 (en) Firmware updating method and apparatus, electronic device and storage medium
CN111865978A (en) Method, device, equipment and medium for updating request identifier of micro-service
CN101882086B (en) Method for organizing upgrade data of serial port of set top box
CN110147246A (en) Version checking method and device, storage medium and the terminal of space download technology
CN107908418B (en) Method for upgrading logic program of fiber channel node card and fiber channel bus equipment
CN112230941B (en) Java Card package and application program installation method and tool
CN115604070A (en) Message transmission method, device, equipment and medium based on MCTP (Multi-function peripheral protocol)
CN108140005B (en) System and method for providing file information in a memory system protocol
CN111176693B (en) Upgrading method of digital television system
CN114237654A (en) OTA (over the air) upgrading method and system
CN111261206B (en) Read-write method and device, electronic equipment and readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210727