CN108170487B - Program programming method and device in DSP (digital Signal processor) and vehicle - Google Patents

Program programming method and device in DSP (digital Signal processor) and vehicle Download PDF

Info

Publication number
CN108170487B
CN108170487B CN201611108191.9A CN201611108191A CN108170487B CN 108170487 B CN108170487 B CN 108170487B CN 201611108191 A CN201611108191 A CN 201611108191A CN 108170487 B CN108170487 B CN 108170487B
Authority
CN
China
Prior art keywords
program
dsp
programming
instruction
source file
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
CN201611108191.9A
Other languages
Chinese (zh)
Other versions
CN108170487A (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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201611108191.9A priority Critical patent/CN108170487B/en
Publication of CN108170487A publication Critical patent/CN108170487A/en
Application granted granted Critical
Publication of CN108170487B publication Critical patent/CN108170487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44573Execute-in-place [XIP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method, a device and a vehicle for programming a program in a DSP (digital signal processor). the method for programming the program in the DSP comprises the steps of connecting the DSP with an upper computer, and detecting whether a programming instruction for programming the program in the DSP exists; generating a language forbidden instruction when a programming instruction exists, wherein the language forbidden instruction is used for forbidding devices except the DSP in a CAN network to which the DSP belongs to send messages; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; and converting the file format of the source file to obtain a converted program, and programming the program in the DSP according to the converted program. The invention can effectively improve the successful probability of program upgrading, reduce the network load rate, improve the program programming speed and reduce the program upgrading time.

Description

Program programming method and device in DSP (digital Signal processor) and vehicle
Technical Field
The invention relates to the technical field of automobiles, in particular to a method and a device for programming in a DSP (digital signal processor) and a vehicle.
Background
With the continuous development of automobile technology and CAN (Controller Area Network) Network technology, the traditional method for directly updating programs on a hardware board of a Controller by using an emulator cannot meet the user requirements.
In the related art, for example, in the invention patent with the publication number of CN104216714A and the invention name of "method for programming DSP program based on CAN bus", whether the target program needs to be upgraded is judged by using the upgrade flag bit, and then whether the target program CAN enter the programming flow is judged by unlocking the interactive signal, wherein the program programmed into the DSP chip converts the source file of the target program into hexadecimal format, and then converts the source file into binary format for programming.
The conversion process of the scheme is too complicated, the program programming speed is low, and devices except the DSP on the same CAN network on the vehicle work when the program upgrading is not considered on a real vehicle.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present invention is to provide a method for programming a program in a DSP, which can effectively improve the probability of successful program upgrade, reduce the network load rate, improve the program programming speed, and reduce the program upgrading time.
The invention also aims to provide a program programming device in the DSP.
Another object of the invention is to propose a vehicle.
In order to achieve the above object, a method for programming a program in a DSP according to an embodiment of the first aspect of the present invention includes: connecting the DSP and the upper computer, and detecting whether a programming instruction for programming the program in the DSP exists; generating a language forbidden instruction when the programming instruction exists, wherein the language forbidden instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages; sending the language forbidden instruction to the equipment, and receiving a source file of a target program to be burned according to the burning instruction; and converting the file format of the source file to obtain a converted program, and programming the program in the DSP according to the converted program.
According to the program programming method in the DSP provided by the embodiment of the first aspect of the invention, when a programming instruction exists, a language forbidden instruction is generated, wherein the language forbidden instruction is used for forbidding the equipment except the DSP from sending messages in a CAN network to which the DSP belongs; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
In order to achieve the above object, a program writing device in a DSP according to an embodiment of the second aspect of the present invention includes: the connecting module is used for connecting the DSP and the upper computer; the detection module is used for detecting whether a programming instruction for programming the program in the DSP exists; the first generation module is used for generating a forbidden language instruction when the programming instruction exists, wherein the forbidden language instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages; a first sending module, configured to send the language-prohibiting instruction to the device; the first receiving module is used for receiving a source file of a target program to be burned according to the burning instruction; the conversion module is used for converting the file format of the source file to obtain a converted program; and the programming module is used for programming the program in the DSP according to the converted program.
In the program programming device in a DSP provided in the embodiment of the second aspect of the present invention, when there is a program programming instruction, a prohibit instruction is generated, where the prohibit instruction is used to prohibit a device other than the DSP from sending a message in a CAN network to which the DSP belongs; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
In order to achieve the above object, a vehicle according to a third aspect of the present invention includes: the program programming device in the DSP according to the embodiment of the second aspect of the invention.
In the vehicle provided by the embodiment of the third aspect of the present invention, when there is a write command, a prohibit command is generated, where the prohibit command is used to prohibit devices other than the DSP from sending a message in the CAN network to which the DSP belongs; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a program writing method in a DSP according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for programming a DSP according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for programming a DSP according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for programming a DSP according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a program writing device in a DSP according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a program writing device in a DSP according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a vehicle according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Fig. 1 is a flowchart illustrating a program writing method in a DSP according to an embodiment of the present invention. The embodiment of the invention is exemplified by the method for programming the program in the DSP being configured as a device for programming the program in the DSP.
Referring to fig. 1, the program programming method in the DSP includes:
s11: and connecting the DSP with an upper computer.
In an embodiment of the present invention, the model of DSP (Digital Signal Processing) may be, for example, 28335; the upper computer can be generated based on a LabView development environment.
In the related technology, whether the target program can be upgraded is judged by judging the upgrading flag bit and unlocking the interactive signal, and the influence of interference factors of network load rate caused by devices except a DSP on a real vehicle is not considered, and the program written into the DSP chip is to convert a source file of the target program into a hexadecimal format and then convert the source file into a binary format for burning.
In the embodiment of the invention, when a programming instruction for programming the program in the DSP exists, the device except the DSP in the CAN network to which the DSP belongs is forbidden to send messages, so that the success rate of the target program CAN be effectively improved, the network load rate is reduced, the source file of the out-format target program is converted into the hex-format file, the file format of the source file of the target program (the out format) is converted into the hex format, and the program in the DSP is programmed according to the converted program, so that the programming speed of the program CAN be improved, and the program upgrading time is reduced.
Optionally, after the DSP is connected to the upper computer, firstly, the DSP hardware to be programmed needs to be uncapped, a bootloader program written by CCS (Code Composer Studio) software is flushed into the DSP chip by using the emulator, for the same hardware, the operation generally needs to be performed only once, unless the bootloader program needs to be upgraded, the same operation needs to be performed for the second time, then, the memory of the DSP CAN be allocated, the program in the DSP is allocated to one of the Flash sectors, then, data communication CAN be performed through an ECAN (enhanced Controller area network) module, and in the bootloader program of the CAN network, the ECAN module is responsible for downloading data required by the bootloader program, and performing signal interaction between the upper computer and the lower computer.
In some embodiments, referring to fig. 2, after step S11, the method for programming in the DSP further includes:
s21: a path selection inlet is provided in a control panel of the upper computer.
For example, a diagnostic interface in the vehicle CAN network may be used as a path selection entry by using an upper computer generated based on the LabView development environment.
S22: and receiving a storage path of a source file of the target program required to be burned selected by the user based on the path selection inlet.
In the embodiment of the invention, the target program is a program which needs to be burned in the DSP finally, the source file of the target program is in the format of the out format, the embodiment of the invention needs to convert the source file in the out format into a file in the hex format, and finally the target program in the file in the hex format is executed by the DSP.
Optionally, an upper computer generated based on a LabView development environment is used, a corresponding baud rate and a CAN channel are selected directly through a diagnosis interface in a vehicle CAN network, and a CAN box is used for receiving a storage path of a source file of a target program to be burned on CCS software selected by a user so as to write the target program into a DSP chip.
A user can directly select a source file of a target program to be burned, namely a source file of an out format, from a control panel of the upper computer, and the operation is simple and convenient.
In the embodiment, the path selection inlet is provided in the control panel of the upper computer, and the storage path of the source file of the target program to be burned selected by the user is received based on the path selection inlet, so that the operation steps can be simplified, and the burning speed of the DSP can be improved.
S12: and detecting whether a program writing instruction for writing the program in the DSP exists.
In the embodiment of the present invention, the programming instruction is used to trigger programming of a program in the DSP, and the programming instruction may be triggered by the upper computer.
Optionally, detecting whether a programming instruction for programming the program in the DSP exists, and running the program in the DSP if the programming instruction does not exist; when a programming instruction exists, the device except the DSP in the CAN network to which the DSP belongs is prohibited from sending messages, so that the successful upgrading probability of the target program CAN be effectively improved, and the network load rate is reduced.
S13: and generating a language forbidden instruction when a programming instruction exists, wherein the language forbidden instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages.
It should be noted that, due to the influence of the load rate of the vehicle network, in the process of program upgrading, in the CAN network to which the DSP to be programmed on the vehicle belongs, the devices other than the DSP may be powered on to work at the same time, that is, the CAN data information is sent to the CAN network, which has a great influence on the load rate of the CAN network, and when the load rate exceeds a certain threshold, the content of the CAN data may be influenced, and the success rate of program upgrading may be reduced.
Therefore, the embodiment of the invention provides the language forbidden strategy, namely, when the programming instruction exists, the language forbidden instruction is generated, the device except the DSP in the CAN network to which the DSP belongs is forbidden to send the message, the load rate of the CAN network CAN be reduced, and the transmission rate and the success rate of program upgrading are effectively improved.
S14: and sending the language-forbidden instruction to the equipment, and receiving a source file of the target program to be burned according to the burning instruction.
In the embodiment of the invention, the source file of the target program to be burned CAN be received through the diagnosis interface in the CAN network.
Optionally, when there is a write command, the bootloader program may periodically send a talk inhibiting command to the CAN network to which the DSP belongs, and after receiving the talk inhibiting command, the device in the CAN network except the DSP stops sending the CAN message to the CAN network. And meanwhile, a diagnostic interface in the CAN network receives a source file of a target program to be burned so as to update the program in the DSP.
In some embodiments, referring to fig. 3, after step S14,
s31: and receiving a preset zone bit sent by the upper computer.
In the embodiment of the present invention, the preset flag is, for example, a transmission flag, and is used to determine whether a source file of a target program to be burned is received by a Bootloader program.
Optionally, after the upper computer finishes transmitting all the source files of the target program to be burned, a transmission flag bit, that is, a preset flag bit, may be sent, and the bootloader program receives the preset flag bit sent by the upper computer to determine whether the source files of the target program to be burned are received completely.
S32: and judging whether the source file of the target program to be burnt is received or not according to the preset zone bit.
Optionally, whether the source file of the target program to be burned is received completely is judged according to a preset flag bit, when the source file of the target program to be burned is not received completely, the bootloader program can judge whether the time for receiving the source file exceeds a preset time threshold according to the transmission speed of the upper computer, if the time for receiving the source file does not exceed the preset time threshold, the bootloader program continues to wait for receiving the source file of the target program to be burned (see step S414 below), otherwise, the program in the DSP is operated; and when the source file of the target program to be burned is received, generating an forbidding instruction, and allowing the devices except the DSP in the CAN network to which the DSP belongs to send messages.
S33: and when the source file of the target program to be burned is received, generating a forbidding instruction, wherein the forbidding instruction is used for allowing the devices except the DSP to send messages in the CAN network to which the DSP belongs.
Optionally, when the source file of the target program to be burned is received, an unblocking instruction is generated, and the device except the DSP in the CAN network to which the DSP belongs is allowed to send a message.
S34: and sending the forbidding instruction to the equipment to allow the equipment to send the message in the CAN network.
The prohibition releasing instruction is sent to the equipment to allow the equipment to send the message in the CAN network, so that the normal operation of other equipment in the whole vehicle CAN not be influenced, and the stability of the system is ensured.
In the embodiment, when the source file of the target program to be burned is received, the forbidding instruction is generated, wherein the forbidding instruction is used for allowing the devices except the DSP to send the message in the CAN network to which the DSP belongs, and the forbidding instruction is sent to the devices so as to allow the devices to send the message in the CAN network, so that the normal operation of other devices in the whole vehicle CAN be unaffected, and the stability of the system is ensured.
S15: and converting the file format of the source file to obtain a converted program.
In an embodiment of the invention, a source file in a.out format can be converted into a file in a.hex format based on a LabView development environment, and program code in the file in the hex format can be used as a converted program.
First, each code of the source file in the out format generated by the CCS software can be converted into 32 bytes (equal byte length processing is convenient for the receiving processing of bootloader codes) based on the LabView development environment, and the content of the generated file in the hex format is sequentially the number of valid codes of the line code, the start address of the line code, the start flag bit of the line code, the valid code content of the line code, and the check code of the line code, wherein the number of valid codes, the start address, and the start flag bit are named as "head", and the check code is named as "tail". And then, the codes of the hex-format file CAN be further processed by using an upper computer or other modes, effective codes in the file are extracted by adopting a head and tail pinching mode, namely, the head and tail of the generated hex-format file are removed based on a LabView development environment, and then the CAN communication is utilized to realize the signal communication between the upper computer and the lower computer.
Optionally, the source file in the out format can be converted into a file in the hex format based on a LabView development environment, so that the target program can be upgraded more conveniently; meanwhile, when CCS software is used for extracting a source file in the out format, the file in the cmd format needs to be modified, the size of the memory of the programming sector to which the target program to be programmed belongs is reasonably distributed, errors of the content of the target program caused by insufficient memory can be avoided, and the success rate of program upgrading is effectively improved.
S16: and programming the program in the DSP according to the converted program.
In the embodiment of the invention, the file in the hex format can be programmed into a chip of the DSP based on the LabView development environment, so as to program the program in the DSP according to the converted program.
In the embodiment, when a programming instruction exists, a language forbidden instruction is generated, wherein the language forbidden instruction is used for forbidding devices except a DSP (digital signal processor) in a CAN (controller area network) to which the DSP belongs to send messages; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
Fig. 4 is a flowchart illustrating a program writing method in a DSP according to another embodiment of the present invention.
S401: and connecting the DSP with an upper computer.
S402: a path selection inlet is provided in a control panel of the upper computer.
S403: and receiving a storage path of a source file of the target program required to be burned selected by the user based on the path selection inlet.
The execution processes of S401 to S403 may refer to the above embodiments, and are not described herein again.
S404: and detecting whether a programming instruction for programming the program in the DSP exists, if so, executing S405, otherwise, executing S415.
Optionally, detecting whether a programming instruction for programming the program in the DSP exists, and running the program in the DSP if the programming instruction does not exist; when a programming instruction exists, the device except the DSP in the CAN network to which the DSP belongs is prohibited from sending messages, so that the successful upgrading probability of the target program CAN be effectively improved, and the network load rate is reduced.
S405: and generating a language forbidden instruction, wherein the language forbidden instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages.
S406: a language-forbidden instruction is sent to the device.
S407: and receiving a source file of the target program to be burned according to the burning instruction.
S408: and receiving a preset zone bit sent by the upper computer.
The execution processes of S405 to S408 can refer to the above embodiments, and are not described herein again.
S409: and judging whether the source file of the target program to be burned is received or not according to the preset zone bit, if so, executing S410, and otherwise, executing S414.
Optionally, whether the source file of the target program to be burned is received completely is judged according to a preset flag bit, when the source file of the target program to be burned is not received completely, the bootloader program can judge whether the time for receiving the source file exceeds a preset time threshold according to the transmission speed of the upper computer, if so, the bootloader program continues to wait for receiving the source file of the target program to be burned, otherwise, the program in the DSP is operated; and when the source file of the target program to be burned is received, generating an forbidding instruction, and allowing the devices except the DSP in the CAN network to which the DSP belongs to send messages.
S410: and generating an unblocking instruction, wherein the unblocking instruction is used for allowing the devices except the DSP to send messages in the CAN network to which the DSP belongs.
S411: and sending the forbidding instruction to the equipment to allow the equipment to send the message in the CAN network.
S412: and converting the file format of the source file to obtain a converted program.
S413: and programming the program in the DSP according to the converted program.
The execution process of S410 to S413 can refer to the above embodiments, and is not described herein.
S414: and judging whether the time for receiving the source file exceeds a preset time threshold, if so, executing S415, otherwise, executing S407.
In the embodiment of the present invention, the preset time threshold is preset, and the preset time threshold may be, for example, program writing time in the DSP.
Optionally, if the time for the upper computer to send the target program to be burned is T1, and the time for the bootloader program to receive the target program is T2, the program writing time T in the DSP is T1+ T2, that is, the preset time threshold is T1+ T2.
Optionally, when the time for receiving the source file is within a preset time threshold T, continuing to wait for receiving the source file of the target program to be burned; and when the time for receiving the source file exceeds a preset time threshold T, running the program in the DSP.
S415: and running the program in the DSP.
In the embodiment, the path selection inlet is provided in the control panel of the upper computer, and the storage path of the source file of the target program to be burned selected by the user is received based on the path selection inlet, so that the operation steps can be simplified, and the burning speed of the DSP can be improved. When the programming instruction exists, the language forbidden instruction is generated, wherein the language forbidden instruction is used for forbidding the DSP in the CAN network to which the equipment except the DSP sends the message, so that the load rate of the CAN network CAN be reduced, and the transmission rate and the success rate of program upgrading CAN be effectively improved. When the source file of the target program to be burned is received, the forbidding instruction is generated, wherein the forbidding instruction is used for allowing the DSP to send messages in the CAN network to which the equipment except the DSP belongs, and the forbidding instruction is sent to the equipment so as to allow the equipment to send the messages in the CAN network, so that the normal operation of other equipment in the whole vehicle CAN be not influenced, and the stability of the system is ensured. The converted program is obtained by converting the file format of the source file, and the program in the DSP is programmed according to the converted program, so that the error of the content of the target program caused by insufficient memory can be avoided, and the success rate of program upgrading is effectively improved.
Fig. 5 is a schematic structural diagram of a program writing device in a DSP according to an embodiment of the present invention. The program programming means 50 in the DSP may be implemented by software, hardware or a combination of both.
Referring to fig. 5, the program programming apparatus 50 in the DSP includes: the device comprises a connection module 501, a detection module 502, a first generation module 503, a first sending module 504, a first receiving module 505, a conversion module 506 and a programming module 507. Wherein the content of the first and second substances,
and the connection module 501 is used for connecting the DSP and the upper computer.
Optionally, the model of the DSP is 28335; and the upper computer is generated based on a LabView development environment.
The detecting module 502 is configured to detect whether there is a program writing instruction for writing a program in the DSP.
The first generating module 503 is configured to generate a prohibit instruction when there is a write instruction, where the prohibit instruction is used to prohibit devices other than the DSP from sending a message in a CAN network to which the DSP belongs.
A first sending module 504 for sending a language-disable instruction to the device.
The first receiving module 505 is configured to receive a source file of a target program to be burned according to a burning instruction.
Optionally, the first receiving module 505 is specifically configured to: and receiving a source file of a target program to be burned through a diagnosis interface in the CAN network.
The converting module 506 is configured to convert the file format of the source file to obtain a converted program.
Optionally, the conversion module 506 is specifically configured to: and converting the source file in the out format into a file in the hex format based on the LabView development environment, and taking the program code in the file in the hex format as a converted program.
And a programming module 507, configured to perform programming on a program in the DSP according to the converted program.
Optionally, the programming module 507 is specifically configured to: and burning the file in the hex format into a chip of the DSP based on the LabView development environment so as to burn and write the program in the DSP according to the converted program.
In some embodiments, referring to fig. 6, the program programming device 50 in the DSP may further include:
the second receiving module 508 is configured to receive a preset flag bit sent by the upper computer.
The determining module 509 is configured to determine whether to receive the source file of the target program to be burned according to the preset flag.
The second generating module 510 is configured to generate a disable instruction when the source file of the target program to be burned is received, where the disable instruction is used to allow devices other than the DSP to send a message in the CAN network to which the DSP belongs.
The second sending module 511 is configured to send the disable instruction to the device, so as to allow the device to send a message in the CAN network.
And the providing module 512 is used for providing a path selection inlet in a control panel of the upper computer.
A third receiving module 513, configured to receive, based on the path selection entry, a storage path of a source file of the target program to be burned, where the source file is selected by the user.
It should be noted that the explanation of the embodiment of fig. 1 to fig. 4 for the method for programming a program in a DSP is also applicable to the device 50 for programming a program in a DSP of the embodiment, and the implementation principle is similar, and therefore, no further description is given here.
In the embodiment, when a programming instruction exists, a language forbidden instruction is generated, wherein the language forbidden instruction is used for forbidding devices except a DSP (digital signal processor) in a CAN (controller area network) to which the DSP belongs to send messages; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
Based on the embodiment, the invention further provides a vehicle.
Fig. 7 is a schematic structural diagram of a vehicle according to an embodiment of the present invention. As shown in fig. 7, the vehicle 1000 includes the program programming device 50 in the DSP of the above embodiment.
It should be noted that, for details not disclosed in the vehicle 1000 according to the embodiment of the present invention, please refer to details disclosed in the program programming device 50 in the DSP according to the embodiment of the present invention, which are not described herein again.
According to the vehicle provided by the embodiment of the invention, when a programming instruction exists, a language forbidden instruction is generated, wherein the language forbidden instruction is used for forbidding the devices except the DSP in a CAN network to which the DSP belongs to send messages; sending the language forbidden instruction to equipment, and receiving a source file of a target program to be burned according to the burning instruction; the file format of the source file is converted to obtain a converted program, and the program in the DSP is programmed according to the converted program, so that the successful probability of program upgrading can be effectively improved, the network load rate is reduced, the program programming speed is increased, and the program upgrading time is shortened.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (17)

1. A program programming method in a DSP is characterized by comprising the following steps:
connecting the DSP and the upper computer, and detecting whether a programming instruction for programming the program in the DSP exists;
generating a language forbidden instruction when the programming instruction exists, wherein the language forbidden instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages;
sending the language forbidden instruction to the equipment, and receiving a source file of a target program to be burned according to the burning instruction;
and converting the file format of the source file to obtain a converted program, and programming the program in the DSP according to the converted program.
2. The method for programming a program in a DSP according to claim 1, wherein after receiving a source file of a target program to be programmed, further comprising:
receiving a preset zone bit sent by the upper computer;
judging whether the source file of the target program needing to be burnt is received or not according to the preset zone bit;
when the source file of the target program to be burned is received, generating a forbidding instruction, wherein the forbidding instruction is used for allowing the devices except the DSP in the CAN network to which the DSP belongs to send messages;
and sending the forbidding instruction to the equipment to allow the equipment to send a message in the CAN network.
3. The program writing method in DSP according to claim 1, wherein said converting the file format of the source file to obtain a converted program comprises:
and converting the source file in the out format into a file in a hex format based on a LabView development environment, and taking the program code in the file in the hex format as the converted program.
4. The program burning method in DSP according to claim 1, wherein said receiving a source file of a target program to be burned comprises:
and receiving the source file of the target program to be burned through a diagnosis interface in the CAN network.
5. The method for programming a program in a DSP according to claim 3, wherein said programming the program in the DSP according to the converted program comprises:
and burning the file in the hex format into a chip of the DSP based on the LabView development environment so as to burn and write the program in the DSP according to the converted program.
6. The program writing method in the DSP according to any one of claims 1 to 5, wherein a model number of the DSP is 28335.
7. The program programming method in DSP according to any of claims 1-5, wherein the upper computer is generated based on a LabView development environment.
8. The program programming method in DSP according to claim 1, further comprising, after said connecting DSP and upper computer:
providing a path selection inlet in a control panel of the upper computer;
and receiving a storage path of the source file of the target program required to be burned, which is selected by a user, based on the path selection inlet.
9. A program programming device in DSP is characterized by comprising:
the connecting module is used for connecting the DSP and the upper computer;
the detection module is used for detecting whether a programming instruction for programming the program in the DSP exists;
the first generation module is used for generating a forbidden language instruction when the programming instruction exists, wherein the forbidden language instruction is used for forbidding the devices except the DSP in the CAN network to which the DSP belongs to send messages;
a first sending module, configured to send the language-prohibiting instruction to the device;
the first receiving module is used for receiving a source file of a target program to be burned according to the burning instruction;
the conversion module is used for converting the file format of the source file to obtain a converted program;
and the programming module is used for programming the program in the DSP according to the converted program.
10. The program writing apparatus in DSP according to claim 9, further comprising:
the second receiving module is used for receiving the preset zone bit sent by the upper computer;
the judging module is used for judging whether the source file of the target program needing to be burnt is received or not according to the preset zone bit;
the second generation module is used for generating a forbidding instruction when the source file of the target program needing to be burned is received, wherein the forbidding instruction is used for allowing the devices except the DSP in the CAN network to which the DSP belongs to send messages;
and the second sending module is used for sending the forbidding instruction to the equipment so as to allow the equipment to send a message in the CAN network.
11. The program-programming device in DSP of claim 9, wherein the conversion module is specifically configured to:
and converting the source file in the out format into a file in a hex format based on a LabView development environment, and taking the program code in the file in the hex format as the converted program.
12. The program programming apparatus in a DSP according to claim 9, wherein the first receiving module is specifically configured to:
and receiving the source file of the target program to be burned through a diagnosis interface in the CAN network.
13. The program programming apparatus in a DSP according to claim 11, wherein the programming module is specifically configured to:
and burning the file in the hex format into a chip of the DSP based on the LabView development environment so as to burn and write the program in the DSP according to the converted program.
14. The program writing device in DSP according to any one of claims 9-13, wherein model number of said DSP is 28335.
15. The program programming apparatus in DSP according to any one of claims 9 to 13, wherein the upper computer is generated based on a LabView development environment.
16. The program writing apparatus in DSP according to claim 9, further comprising:
the providing module is used for providing a path selection inlet in a control panel of the upper computer;
and the third receiving module is used for receiving the storage path of the source file of the target program required to be burned, which is selected by the user, based on the path selection inlet.
17. A vehicle, characterized by comprising:
a program writing device in a DSP according to any one of claims 9-16.
CN201611108191.9A 2016-12-06 2016-12-06 Program programming method and device in DSP (digital Signal processor) and vehicle Active CN108170487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611108191.9A CN108170487B (en) 2016-12-06 2016-12-06 Program programming method and device in DSP (digital Signal processor) and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611108191.9A CN108170487B (en) 2016-12-06 2016-12-06 Program programming method and device in DSP (digital Signal processor) and vehicle

Publications (2)

Publication Number Publication Date
CN108170487A CN108170487A (en) 2018-06-15
CN108170487B true CN108170487B (en) 2020-08-25

Family

ID=62526086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611108191.9A Active CN108170487B (en) 2016-12-06 2016-12-06 Program programming method and device in DSP (digital Signal processor) and vehicle

Country Status (1)

Country Link
CN (1) CN108170487B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112362983A (en) * 2020-10-10 2021-02-12 东风时代(武汉)电池***有限公司 Battery management system diagnosis method, upper computer and system
CN114237647B (en) * 2021-12-20 2022-10-14 深圳市德仪电子科技有限公司 Single-chip microcomputer programming control system and single-chip microcomputer programming control method
CN115442233A (en) * 2022-08-09 2022-12-06 北京罗克维尔斯科技有限公司 ECU upgrading method and device, electronic equipment, storage medium and vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102230374A (en) * 2011-06-13 2011-11-02 电子科技大学 Underground program remote update device based on 485 bus
CN104216714A (en) * 2014-09-03 2014-12-17 东方电气(乐山)新能源设备有限公司 DSP (Digital Signal Processor) programming method based on CAN (Controller Area Network) bus
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN105700924A (en) * 2016-01-13 2016-06-22 深圳市盛弘电气股份有限公司 Method and device for burning program of multiple modules

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882731B (en) * 2012-10-22 2015-08-05 南京依维柯汽车有限公司 A kind of commercial car CAN network management method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102230374A (en) * 2011-06-13 2011-11-02 电子科技大学 Underground program remote update device based on 485 bus
CN104216714A (en) * 2014-09-03 2014-12-17 东方电气(乐山)新能源设备有限公司 DSP (Digital Signal Processor) programming method based on CAN (Controller Area Network) bus
CN105183523A (en) * 2015-09-29 2015-12-23 国网智能电网研究院 Method for remote upgrade of digital signal processor (DSP) program
CN105700924A (en) * 2016-01-13 2016-06-22 深圳市盛弘电气股份有限公司 Method and device for burning program of multiple modules

Also Published As

Publication number Publication date
CN108170487A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108958787B (en) Block chain system upgrading method, device, equipment and storage medium
CN108170487B (en) Program programming method and device in DSP (digital Signal processor) and vehicle
US8990776B2 (en) Computing device and device driver debugging method
CN102279789B (en) Debugging system and debugging method for embedded system of production phase
CN108037938B (en) Card opening method of eMMC
CN109791497B (en) Method, device and terminal for executing hot patch
CN116541032B (en) Data burning method, device, equipment and computer storage medium
CN104063319A (en) Debugging method of embedded system and device thereof
CN106909362A (en) The method and apparatus that the method and apparatus of BMC firmwares generation, BMC systems start
CN102195817A (en) Software upgrading method and device and software rollback method and device
CN106990983B (en) Singlechip programming method, device and system and singlechip
CN104407878A (en) On-line upgrading method of C6000 digital signal processor
CN106406962A (en) Wind power generation controller failed remote upgrade recovery method based on ARM
CN109189423A (en) Vehicle-carrying display screen upgrade method, storage medium, equipment and in-vehicle multi-media system
CN106657332A (en) Breakpoint continuous transmission method
CN106371871A (en) Method for preventing upgrading mismatching BIN file
CN104036193A (en) Local cross-domain vulnerability detection method and device for application program
CN107885523B (en) Rapid and stable serial port software upgrading method
CN116560688A (en) Software updating method for domain controller
CN111352764A (en) Chip repairing method, device, equipment and storage medium
CN116300780A (en) Component configuration method, device, electronic equipment and storage medium
CN116450109A (en) Modbus communication library adaptation method under MATLAB and CCS combined development mode
CN107908418B (en) Method for upgrading logic program of fiber channel node card and fiber channel bus equipment
US8347387B1 (en) Addressing security in writes to memory
CN102640129B (en) For direct memory access (DMA) device and the method for operating thereof of multiple nucleus system

Legal Events

Date Code Title Description
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