CN106445574A - Method for realizing on-line programming of DSP (Digital Signal Processor) system - Google Patents
Method for realizing on-line programming of DSP (Digital Signal Processor) system Download PDFInfo
- Publication number
- CN106445574A CN106445574A CN201510494231.7A CN201510494231A CN106445574A CN 106445574 A CN106445574 A CN 106445574A CN 201510494231 A CN201510494231 A CN 201510494231A CN 106445574 A CN106445574 A CN 106445574A
- Authority
- CN
- China
- Prior art keywords
- data
- dsp
- program
- group
- update
- 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
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a method for realizing the on-line programming of a DSP (Digital Signal Processor) system, and belongs to the field of data communication and data processing. Particularly, the method comprises program design that a DSP terminal is updated, and design that a PC (Personal Computer) upper computer updates software. When the DSP needs to be updated, a serial port is adopted to carry out data interaction on the DSP and the PC, the data which needs to be updated is received, the correctness of the data is judged, then, the data is stored into FLASH, and the updated grogram is executed to finish final DSP system update. The method has the advantages of being simple in operation, stable in flashing and the like, and can be widely applied to the update configuration of embedded equipment software.
Description
Technical field
The present invention relates to data communication and data processing field, in particular, the present invention is used for dsp system being carried out online programming, to system
The method upgraded.
Technical background
Developing rapidly with microelectric technique, the cost performance of nextport universal digital signal processor NextPort improves constantly, and in Digital Signal Processing, communication, controls
More and more extensive Deng field utilization.And the method to dsp program general at present is to download FLASH write-in program and code by jtag interface
Data is run in DSP piece, realizes the programming to FLASH.This mode jtag interface can not meet long-distance transmissions and require it is difficult to realize remote
The online programming of end system;And can not work under the complex environments such as high and low temperature;Interface signal is too much it is difficult to answer in small device simultaneously
With.
The invention provides a kind of method that DSP online programming is carried out using RS232 serial ports.This method makes the renewal of DSP code departing from imitative
True device, improves ease for use and the maintainability of DSP equipment.Due to using serial line interface, interface signal is simple;RS232 serial transmission simultaneously has
The features such as have distance remote (being capable of strange land download program), good in anti-interference performance, environmental suitability strong, be suitable for Industry Control, remote measurement controls,
The dsp system program field such as automatically controlling updates.
Content of the invention
The invention provides a kind of DSP online programming method realized by RS232 serial ports, based on the method in the case of not using JTAG
By the DSP code needing to update write FLASH, the main contents of this method are:
(1) DSP electrifying startup, executes Control program after the completion of startup, judge when the DSP program in FLASH is the need of renewal.
(2) if not needing to update, directly will bring into operation in the internal RAM of the program copy in FLASH to DSP, if necessary to update, then
Enter the pattern updating, original program erasing in FLASH initializes RS232 serial ports, the program that PC end will need to update simultaneously
Section prepares to transmit to DSP.
(3) communicated with PC end, receive need update the corresponding binary data of code, be stored in after reception in FLASH code segment.
(4) after finishing receiving, the code segment after updating is copied in the internal RAM of DSP, start to execute the program after updating, renewal completes.
The present invention can be configured to DSP by RS232, so that DSP code is updated and depart from emulator, it is to avoid plug during code update
Emulator and the dismounting damage that causes of DSP equipment, so that DSP code is updated becomes more simple, easy to operate.With traditional JTAG upgrading side
Formula is compared, and update time increased, but solves high-altitude, the difficulty of the in particular cases program upgrading such as airtight.This method have simple to operate,
The advantages of programming is stablized, in can extensively applying the renewal with embedded device software to configure, is inevitable requirement and the trend of intelligent equipment.
Brief description
Fig. 1 is a kind of hardware connection figure of the system applying this software
Fig. 2 is the self-starting flow chart of DSP in Fig. 1
Fig. 3 is DSP Configuration Online flow chart
The flow chart that Fig. 4 executes Control program for DSP
The flow chart that Fig. 5 position PC end upper computer software executes renewal process
Specific embodiment
Below in conjunction with the accompanying drawings the specific embodiment of the present invention is elaborated.
Fig. 1 is a kind of hardware connection figure of the system applying this software, including DSP, FLASH, MAX232EUE, PC end.
DSP:For needing the object being updated configuring, need the DSP being updated must support mode and the serial communication of self-starting, certainly
Start execution Control program segment after startup to be updated.
FLASH:Storage 3 section programs coexist in FLASH, first paragraph is DSP bootstrap, starts for DSP;Second segment is Cnotrol program,
For updating DSP;3rd section is user program, and that is, the normal program run of DSP, changes this section of program when needing and updating DSP.
MAX3232:This chip carries out level format conversion to this data, and the digital signal of DSP is converted into RS232 corresponding physical level signal,
The RS232 of computer end is converted into the digital signal of DSP.
PC:PC end is used for carrying out data interaction with DSP, and the present invention devises special upper computer software and carries out data by RS232 with DSP
Exchange, upper computer software needs to load the user program needing to update, and configures RS232 serial ports, need when being updated to accept to judge DSP simultaneously
Feedack, sends the user program having loaded.
Fig. 2 be Fig. 1 in DSP self-starting flow chart, after dsp chip electrification reset, EDMA automatically from FLASH copy 1KB data to
At DSP memory address 0, then DSP starts to execute the 1KB program code copying at address 0.But the present invention is not intended to limit the side of self-starting
Formula, only need to execute Contral program segment after starting.Comprise the following steps that:
Step 1:System reset, initialize EDMA, on piece bootloader from FLASH space duplication before 1KB code to DSP internal RAM
At address 0;
Step 2:Cpu reset, bootstrap replicates complete application program and runs address to it, jumps to the entrance of application program after the completion of duplication
Address, i.e. c_int00;
Step 3:Jump to c_int00, initialize C language running environment, jump to principal function main (), execute application program;
Fig. 3 is DSP Configuration Online flow chart, comprises the following steps:
Step 1:After upper electricity automatically by the program copy of 1k front in FLASH in DSP internal RAM, execute bootstrap;
Step 2:Bootstrap copies to the Control program segment in FLASH in DSP internal RAM, starts to execute Control program segment;
Step 3:Read the exterior arrangement of DSP, the user program judging DSP is the need of renewal;
Step 4:If not needing to update, replicating original user program section in DSP internal RAM, starting to execute user program;
Step 5:If necessary to update, remove the data of the original user program section in FLASH, then PC end data is received by RS232, will be new
Program segment write FLASH;
Step 6:Replicate new user program section in DSP internal RAM, start to execute user program;
The flow chart that Fig. 4 executes Control program for DSP, comprises the following steps:
Step 1:Initialization RS232 serial ports, sends 0xFF to PC end, represents that request updates user program;
Step 2:Receive PC end data, be stored in array, after waiting PC end to send the time of one group of data;
Step 3:Judge that this group data has or not parity error, then return 0xFF to PC end without mistake, represent and receive successfully, simultaneously
The data of reception is stored in FLASH, continues to next and organize data;
Step 4:If there is mistake, then remove this group data, return 0x00 to PC end simultaneously, represent in receiving and go wrong, wait PC weight
Newly send upper one group of data;
Step 5:If after waiting PC end to send the time of one group of data, being not received by data and complete then it is assumed that updating, now replicate after updating
Program in RAM, execute user program;
The flow chart that Fig. 5 position PC end upper computer software executes renewal process, comprises the following steps:
Step 1:Open the user program corresponding hex file needing to update, hexadecimal data therein is grouped;
Step 2:Initialization RS232, reads the data that DSP sends;
Step 3:Judge whether the data that DSP sends is 0xFF, if it is starting to update, first group of data being sent by serial ports, if not being
0xFF then terminates this program;
Step 4:After having sent first group, read DSP and send data, determine whether 0xFF, if it is send next group, if fruit is 0x00
Then resend one group of data, then terminate this program if other data;
Step 5:Send last group and terminated this program after receiving DSP return 0xFF, renewal has completed.
Claims (8)
1. one kind is used for realizing dsp system online programming method it is characterised in that comprising the steps of:
Step 1:DSP electrifying startup, executes Control program after the completion of startup, judge when the DSP program in FLASH is the need of renewal;
Step 2:If not needing to update, directly will bring into operation in the internal RAM of the program copy in FLASH to DSP, if necessary to update,
Then enter the pattern of renewal, original program erasing in FLASH initializes RS232 serial ports, PC end will be accurate for the program segment needing to update simultaneously
Standby transmit to DSP;
Step 3:Communicated with PC end, receive need update the corresponding binary data of code, be stored in after reception in FLASH code segment;
Step 4:After finishing receiving, the code segment after updating is copied in the internal RAM of DSP, start to execute the program after updating, updated
Become.
2. one kind according to claim 1 be used for realizing dsp system online programming method it is characterised in that:The Control journey of described step 1
Sequence design concrete grammar be:
Step 1:Initialization RS232 serial ports, sends 0xFF to PC end, represents that request updates user program;
Step 2:Receive PC end data, be stored in array, after waiting PC end to send the time of one group of data;
Step 3:Judge that this group data has or not parity error, then return 0xFF to PC end without mistake, represent and receive successfully, simultaneously
The data of reception is stored in FLASH, continues to next and organize data;
Step 4:If there is mistake, then remove this group data, return 0x00 to PC end simultaneously, represent in receiving and go wrong, wait PC weight
Newly send upper one group of data;
Step 5:If after waiting PC end to send the time of one group of data, being not received by data and complete then it is assumed that updating, now replicate after updating
Program in RAM, execute user program.
3. one kind according to claim 1 be used for realizing dsp system online programming method it is characterised in that:Lead to PC end in described step 2
Cross RS232 to be communicated, to judge that data is correct using parity check bit.
4. one kind according to claim 1 be used for realizing dsp system online programming method it is characterised in that:The PC end of described step 3 is upper
The concrete grammar of machine software design is:
Step 1:Open the user program corresponding hex file needing to update, hexadecimal data therein is grouped;
Step 2:Initialization RS232, reads the data that DSP sends;
Step 3:Judge whether the data that DSP sends is 0xFF, if it is starting to update, first group of data being sent by serial ports, if not being
0xFF then terminates this program;
Step 4:After having sent first group, read DSP and send data, determine whether 0xFF, if it is send next group, if fruit is 0x00
Then resend one group of data, then terminate this program if other data;
Step 5:Send last group and terminated this program after receiving DSP return 0xFF, renewal has completed.
5. the concrete grammar of Control programming according to claim 2 is it is characterised in that to ensure using with PC end handshake communication in step 4
The data correctness receiving.
6. the concrete grammar of Control programming according to claim 2 is it is characterised in that final in step 5 judge to update being masked as of completing
It is not received by new data.
7. the concrete grammar of PC end upper computer software design according to claim 4 is it is characterised in that enter first after reading more new file in step 1
Send after row packet, send 128 bytes every time.
8. according to claim 4 PC end upper computer software design concrete grammar it is characterised in that in step 5 finally terminate update judgement
Condition is to receive last group data receiver success of DSP end response.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510494231.7A CN106445574A (en) | 2015-08-13 | 2015-08-13 | Method for realizing on-line programming of DSP (Digital Signal Processor) system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510494231.7A CN106445574A (en) | 2015-08-13 | 2015-08-13 | Method for realizing on-line programming of DSP (Digital Signal Processor) system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106445574A true CN106445574A (en) | 2017-02-22 |
Family
ID=58092441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510494231.7A Pending CN106445574A (en) | 2015-08-13 | 2015-08-13 | Method for realizing on-line programming of DSP (Digital Signal Processor) system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445574A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107229494A (en) * | 2017-05-25 | 2017-10-03 | 北京计算机技术及应用研究所 | A kind of method for realizing DSP online programmings |
CN108038067A (en) * | 2017-12-27 | 2018-05-15 | 西安奇维科技有限公司 | A kind of method that DSP program firings are carried out by serial ports |
-
2015
- 2015-08-13 CN CN201510494231.7A patent/CN106445574A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107229494A (en) * | 2017-05-25 | 2017-10-03 | 北京计算机技术及应用研究所 | A kind of method for realizing DSP online programmings |
CN108038067A (en) * | 2017-12-27 | 2018-05-15 | 西安奇维科技有限公司 | A kind of method that DSP program firings are carried out by serial ports |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101192165B (en) | Master-slave mode multiprocessor system and software version loading method | |
CN109522033B (en) | ECU program and data upgrading method based on device operation self-programming and double-interrupt vector table | |
CN104077204B (en) | Reconfigurable 8 RSIC singlechip emulators | |
CN106547574A (en) | The outside download system and method for a kind of DSP programs and FPGA programs | |
WO2018018978A1 (en) | Universal serial bus controller verification method, system and device | |
CN109002310A (en) | firmware upgrade method | |
CN103970565A (en) | Method for implementing FPGA multi-path downloading configuration in server system | |
CN104407882B (en) | A kind of board card device | |
CN101008898A (en) | Update and repair method of intellectualized equipment and system thereof | |
CN108111929B (en) | Python-based automatic test method, system and test terminal | |
WO2021136200A1 (en) | Bootloader loading method, storage medium, and embedded terminal | |
CN110187909A (en) | A kind of single-chip microcontroller firmware upgrade method based on android system | |
CN112000351A (en) | Updating method, updating device, updating equipment and storage medium of BMC (baseboard management controller) firmware | |
CN101267623A (en) | A booting construction method for a mobile phone | |
CN116541032B (en) | Data burning method, device, equipment and computer storage medium | |
CN113657069B (en) | SOC simulation verification method and device, verification server and storage medium | |
CN106445574A (en) | Method for realizing on-line programming of DSP (Digital Signal Processor) system | |
CN110673862A (en) | Wireless upgrading method, equipment and medium for embedded equipment firmware with dual-use multi-mode | |
CN104461638A (en) | Bootloader based XFP optical module upgrading method | |
CN113703914A (en) | Test method and test system | |
CN111414182B (en) | SPI-based FPGA remote upgrading method | |
CN108536458A (en) | A kind of FPGA online upgradings method, apparatus, equipment and storage medium | |
CN113360161A (en) | Resource upgrading method and related product | |
CN102043654A (en) | DSP simple development method based on TMS320VC55xx | |
CN115495136B (en) | BMC quick online upgrading method based on domestic Feiteng platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170222 |
|
WD01 | Invention patent application deemed withdrawn after publication |