CN111522588B - Chip operation interaction method and communication system based on SWD protocol - Google Patents
Chip operation interaction method and communication system based on SWD protocol Download PDFInfo
- Publication number
- CN111522588B CN111522588B CN202010301374.2A CN202010301374A CN111522588B CN 111522588 B CN111522588 B CN 111522588B CN 202010301374 A CN202010301374 A CN 202010301374A CN 111522588 B CN111522588 B CN 111522588B
- Authority
- CN
- China
- Prior art keywords
- chip
- command
- cortex
- preset address
- reading
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/173—Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mathematical Physics (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a chip operation interaction method and a communication system based on SWD protocol, which are characterized in that an address A, an address B, an address C and corresponding storage space are preset in a CORTEX chip, and a specific command interaction mode is adopted, so that the normal operation interaction of an upper computer and the CORTEX chip is ensured, the CORTEX chip can receive data simultaneously in the process of processing own transaction, no extra expenditure is generated due to the received data, the integrity of data transmission can be ensured, and the operation interaction process of the upper computer and the chip is simplified.
Description
Technical Field
The invention relates to the technical field of operation control of electronic circuits, in particular to a chip operation interaction method and a communication system based on an SWD protocol.
Background
Products of ARM company after the classic processor ARM11 are named after Cortex, and are divided into A, R and M types, and the products are used for providing services for various markets. ARM Cortex TM The a-series application-type processor may provide an all-round solution to devices hosting rich OS platforms and user applications, from ultra-low cost cell phones, smart phones, mobile computing platforms, digital televisions and set-top boxes to enterprise networks, printers and server solutions. ARM Cortex-R series application type processor capable of providing high-performance meter for embedded system requiring reliability, high availability, fault tolerance function, maintainability and real-time response by real-time processorA solution is calculated. ARM Cortex TM The M-series application-type processor is an upwardly compatible, energy-efficient, easy-to-use series of processors intended to help developers meet the needs of future embedded applications. These needs include providing more functionality at lower cost, increasing connections, improving code reuse, and improving energy efficiency.
Although the Cortex series chip has strong processing capability, if the core X chip receives data again in the process of processing own transaction, additional expenditure is generated, and normal interaction between the upper computer and the core X chip can be obviously affected.
Disclosure of Invention
The invention aims to provide a chip operation interaction method based on an SWD protocol, and the mechanism can realize that a CORTEX series chip can simultaneously receive data in the process of processing own transactions, does not generate any extra overhead due to the received data, can ensure the integrity of data transmission and simplifies the operation interaction process of an upper computer and the chip. The invention is realized by the following technical scheme:
the chip operation interaction mechanism based on the SWD protocol is characterized in that:
the steps executed by the upper computer end comprise:
(1) Initializing a SWD bus;
(2) Taking out a command to be sent to the core chip;
(3) Sending commands over the SWD bus, comprising:
(3-1) transmitting the writing length and the command data content to a preset address A in the CORTEX chip;
(3-2) sending a command code to a preset address B in the CORTEX chip;
(4) Reading ACK response content stored in a preset address C in the CORTEX chip after the CORTEX chip finishes processing the command;
(5) Repeating the steps (2) to (4) until all commands of the upper computer are sent;
the CORTEX chip end execution steps comprise:
(1) initializing a CORTEX chip;
(2) reading a command code in a preset address B;
(3) reading the length in the preset address A and reading corresponding length data;
(4) forming a complete command according to the data read in the steps (2) and (3), and executing the corresponding command;
(5) after the command is executed, clearing a command code in a preset address B so as to receive the next command;
(6) writing ACK response content into a preset address C;
(7) and (5) repeatedly executing the steps (2) - (6).
In the step (4), if the ACK response content in the preset address C in the core chip cannot be read, the reading is repeated until the ACK response content is read.
As a specific technical scheme, in the step (2), if the command code cannot be read in the preset address B in the core chip, repeating the reading until the command code is read.
The invention also provides a communication system, which comprises an upper computer and a CORTEX chip, and is characterized in that: and the upper computer and the CORTEX chip cooperatively execute the chip operation interaction method based on the SWD protocol.
The invention has the beneficial effects that: by presetting the address A, the address B, the address C and the corresponding storage space in the CORTEX chip and adopting a specific command interaction mode, the normal operation interaction of the upper computer and the CORTEX chip is ensured, the CORTEX chip can receive data simultaneously in the process of processing own transactions, no extra overhead is generated due to the received data, the integrity of data transmission can be ensured, and the operation interaction process of the upper computer and the chip is simplified.
Drawings
Fig. 1 is a flowchart of a chip operation interaction mechanism based on SWD protocol according to an embodiment of the present invention.
Detailed Description
According to the communication system provided by the embodiment, the upper computer and the CORTEX chip are communicated through the SWD protocol, and because the SWD protocol can realize asynchronous data transmission, a specific command interaction mode is required to be adopted to ensure that the upper computer and the CORTEX chip are normally interacted in operation.
Referring to fig. 1, in the SWD protocol-based chip operation interaction method provided in this embodiment, an address a, an address B, an address C, and a corresponding storage space are preset in advance in a core chip. The following description is given from the upper computer end and the core chip end, respectively, as follows:
the steps executed by the upper computer end comprise:
(1) Initializing a SWD bus;
(2) Taking out a command to be sent to the core chip;
(3) Sending commands over the SWD bus, comprising:
(3-1) transmitting the writing length and the command data content to a preset address A in the CORTEX chip;
(3-2) sending a command code to a preset address B in the CORTEX chip;
(4) Reading ACK (Acknowledgement character) response content stored in a preset address C in the CORTEX chip after the command processing of the CORTEX chip is finished; if the ACK response content stored in the preset address C in the CORTEX chip cannot be read, repeatedly reading;
(5) Repeating the steps (2) to (4) until all commands of the upper computer are sent;
the CORTEX chip end execution steps comprise:
(1) initializing a CORTEX chip;
(2) reading the content in the preset address B, if the command code is read, executing the step (3), otherwise, executing the step (2);
(3) reading the length in the preset address A and reading corresponding length data;
(4) forming a complete command according to the data read in the steps (2) and (3), and executing the corresponding command;
(5) after the command is executed, clearing a command code in a preset address B so as to receive the next command;
(6) writing ACK response content into a preset address C;
(7) and (5) repeatedly executing the steps (2) - (6).
The above embodiments are merely for fully disclosing the present invention, but not limiting the present invention, and substitution of equivalent technical features based on the gist of the present invention, which can be achieved without inventive labor, should be considered as the scope of the present disclosure.
Claims (4)
1. A chip operation interaction method based on SWD protocol is characterized in that:
the steps executed by the upper computer end comprise:
(1) Initializing a SWD bus;
(2) Taking out a command to be sent to the core chip;
(3) Sending commands over the SWD bus, comprising:
(3-1) transmitting the writing length and the command data content to a preset address A in the CORTEX chip;
(3-2) sending a command code to a preset address B in the CORTEX chip;
(4) Reading ACK response content stored in a preset address C in the CORTEX chip after the CORTEX chip finishes processing the command;
(5) Repeating the steps (2) to (4) until all commands of the upper computer are sent;
the CORTEX chip end execution steps comprise:
(1) initializing a CORTEX chip;
(2) reading a command code in a preset address B;
(3) reading the length in the preset address A and reading corresponding length data;
(4) forming a complete command according to the data read in the steps (2) and (3), and executing the corresponding command;
(5) after the command is executed, clearing a command code in a preset address B so as to receive the next command;
(6) writing ACK response content into a preset address C;
(7) and (5) repeatedly executing the steps (2) - (6).
2. The SWD protocol based chip operation interaction method according to claim 1, wherein in the step (4), if the ACK response content in the preset address C in the core chip cannot be read, the reading is repeated until the ACK response content is read.
3. The SWD protocol based chip operation interaction method according to claim 1, wherein in the step (2), if the command code cannot be read in the preset address B in the core chip, the reading is repeated until the command code is read.
4. The utility model provides a communication system, includes host computer and CORTEX chip, its characterized in that: the upper computer and the core chip cooperate to execute the chip operation interaction method based on the SWD protocol according to any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010301374.2A CN111522588B (en) | 2020-04-16 | 2020-04-16 | Chip operation interaction method and communication system based on SWD protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010301374.2A CN111522588B (en) | 2020-04-16 | 2020-04-16 | Chip operation interaction method and communication system based on SWD protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111522588A CN111522588A (en) | 2020-08-11 |
CN111522588B true CN111522588B (en) | 2023-05-05 |
Family
ID=71901415
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010301374.2A Active CN111522588B (en) | 2020-04-16 | 2020-04-16 | Chip operation interaction method and communication system based on SWD protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111522588B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5551052A (en) * | 1993-08-02 | 1996-08-27 | Xerox Corporation | Data bus protocol for high speed chip to chip data transfer |
CN105204393A (en) * | 2015-08-13 | 2015-12-30 | 彭增金 | Single-chip microcomputer production research and development tool based on virtual nucleus single-chip microcomputer and realization method thereof |
WO2016090908A1 (en) * | 2014-12-12 | 2016-06-16 | 国家电网公司 | Memory simulation testing board system and testing method for embedded application of intelligent electric meter |
CN108243185A (en) * | 2017-12-21 | 2018-07-03 | 中国科学院西安光学精密机械研究所 | Scientific grade CCD gigabit Ethernet communication system and method based on AX88180 |
CN109085798A (en) * | 2018-08-06 | 2018-12-25 | 常州轻工职业技术学院 | A kind of embedded system G code asynchronous communication mechanism, agreement and programmed method |
CN110457053A (en) * | 2019-07-02 | 2019-11-15 | 苏州大学 | A kind of terminal remote automatic update system based on NB-IoT |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6996106B2 (en) * | 2001-11-29 | 2006-02-07 | Koninklijke Philips Electronics N.V. | High-speed interchip interface protocol |
-
2020
- 2020-04-16 CN CN202010301374.2A patent/CN111522588B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5551052A (en) * | 1993-08-02 | 1996-08-27 | Xerox Corporation | Data bus protocol for high speed chip to chip data transfer |
WO2016090908A1 (en) * | 2014-12-12 | 2016-06-16 | 国家电网公司 | Memory simulation testing board system and testing method for embedded application of intelligent electric meter |
CN105204393A (en) * | 2015-08-13 | 2015-12-30 | 彭增金 | Single-chip microcomputer production research and development tool based on virtual nucleus single-chip microcomputer and realization method thereof |
CN108243185A (en) * | 2017-12-21 | 2018-07-03 | 中国科学院西安光学精密机械研究所 | Scientific grade CCD gigabit Ethernet communication system and method based on AX88180 |
CN109085798A (en) * | 2018-08-06 | 2018-12-25 | 常州轻工职业技术学院 | A kind of embedded system G code asynchronous communication mechanism, agreement and programmed method |
CN110457053A (en) * | 2019-07-02 | 2019-11-15 | 苏州大学 | A kind of terminal remote automatic update system based on NB-IoT |
Non-Patent Citations (3)
Title |
---|
徐岳清 ; .STM32系列单片机脱机批量烧录器的设计与实现.长春工程学院学报(自然科学版).2015,(01),全文. * |
王玉荣 ; 赵飞 ; 郭依帆 ; 魏钰轩 ; 李文涛 ; 茅靖峰 ; .基于ARM和WiFi的互联网多终端病房监护***设计.南通职业大学学报.2018,(01),全文. * |
石盼 ; 雷英栋 ; 何东伟 ; 徐博铭 ; .基于HID的STM32离线下载器的设计.机电一体化.2017,(01),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111522588A (en) | 2020-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113259155B (en) | Access method, device, gateway, medium and electronic equipment of Internet of things equipment | |
CN103414579A (en) | Cross-platform monitoring system applicable to cloud computing and monitoring method thereof | |
CN103645994A (en) | Data processing method and device | |
CN114564435A (en) | Inter-core communication method, device and medium for heterogeneous multi-core chip | |
CN111522588B (en) | Chip operation interaction method and communication system based on SWD protocol | |
CN111443946B (en) | Interaction method, system, server and storage medium of IOS system and page | |
CN111443898A (en) | Method for designing flow program control software based on priority queue and finite-state machine | |
CN112527535B (en) | Interaction method and terminal based on native WebView extension application | |
CN115470172A (en) | Communication method, device, system and medium for double CPUs in POS machine | |
CN112231409B (en) | Database synchronization initialization loading method, device, equipment and storage medium | |
CN114925120A (en) | Insurance business information query method and related equipment | |
CN114595080A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN113791777B (en) | Picture display method and device, computer readable storage medium and electronic equipment | |
CN110442442B (en) | Nuclear power plant DCS platform engineer station software maintenance network communication method | |
CN114116375A (en) | Data transmission method and device based on PLDM protocol | |
CN112882774A (en) | Intelligent contract chip device and method executed in parallel and block chain link point device | |
CN116601616A (en) | Data processing device, method and related equipment | |
CN104572316A (en) | Game program and running platform interaction method and system | |
CN114928377B (en) | Output transmission method, device and equipment for reducing transparent transmission bandwidth of USB data | |
CN116743587B (en) | Virtual network interface implementation method and device based on heterogeneous computing accelerator card | |
CN116489536B (en) | Efficient point location acquisition method and device based on modbusRTU protocol communication | |
CN117632621B (en) | Multiplexing interface configuration method and device based on multi-FPGA verification platform | |
CN116846977A (en) | Network sharing method, device and system, electronic equipment and storage medium | |
CN111988310A (en) | IEC61850 protocol-based data acquisition method and device | |
CN113411231A (en) | CORBA middleware communication delay performance optimization method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |