CN111522588A - 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
- CN111522588A CN111522588A CN202010301374.2A CN202010301374A CN111522588A CN 111522588 A CN111522588 A CN 111522588A CN 202010301374 A CN202010301374 A CN 202010301374A CN 111522588 A CN111522588 A CN 111522588A
- Authority
- CN
- China
- Prior art keywords
- chip
- cortex
- command
- 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.)
- Granted
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 an SWD protocol, which ensure normal operation interaction of an upper computer and a CORTEX chip by presetting an address A, an address B, an address C and a corresponding storage space in the CORTEX chip and simultaneously adopting a specific command interaction mode, realize that the CORTEX chip can simultaneously receive data in the process of processing own transaction, avoid generating any extra expense due to the received data, ensure the integrity of data transmission and simplify the operation interaction process of the upper computer and the chip.
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
The ARM company products after the classical processor ARM11 are named after Cortex and are divided into three categories A, R and M, which are intended to serve various markets. ARM CortexTM-A series of applicationsA type processor can provide a full range of solutions 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. The ARM Cortex-R family of application-type processors are capable of real-time processors providing high performance computing solutions for embedded systems that require reliability, high availability, fault tolerance, maintainability, and real-time response. ARM CortexTMThe M-family application-type processors are a family of upwardly compatible, energy efficient, easy-to-use processors that are intended to help developers meet the needs of future embedded applications. These needs include providing more functionality at lower cost, increasing connectivity, improving code reuse, and improving energy efficiency.
Although the Cortex series chip has strong processing capability, if the Cortex chip receives data again in the process of processing own transaction, additional overhead is generated, and normal interaction between the upper computer and the Cortex chip is obviously influenced.
Disclosure of Invention
The invention aims to provide a chip operation interaction method based on an SWD protocol, and the mechanism can realize that CORTEX series chips can simultaneously receive data in the process of processing own transactions, does not generate any extra overhead due to data receiving, can ensure the integrity of data transmission, and simplifies the operation interaction process of an upper computer and the chips. The invention is realized by the following technical scheme:
a chip operation interaction mechanism based on SWD protocol is characterized in that:
the steps executed by the upper computer end comprise:
(1) initializing an SWD bus;
(2) taking out a command to be sent to a CORTEX chip;
(3) sending commands over the SWD bus, including:
(3-1) sending the write 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) after the CORTEX chip finishes processing the command, reading ACK response content stored in a preset address C in the CORTEX chip;
(5) repeating the step (2) to the step (4) until all commands of the upper computer are sent;
the CORTEX chip end executes the steps of:
initializing a CORTEX chip;
reading a command code in a preset address B;
reading the length in the preset address A and reading the data with the corresponding length;
fourthly, forming a complete command according to the data read in the second step and the third step, and executing the corresponding command;
after finishing executing the command, clearing the command code in the preset address B so as to receive the next command;
writing ACK response content into a preset address C;
seventhly, repeatedly executing the step (I) and the step (II).
As a specific technical scheme, in the step (4), if the ACK response content in the preset address C in the CORTEX chip cannot be read, the reading is repeatedly performed until the ACK response content is read.
As a specific technical scheme, in the second step, if the command code cannot be read from the preset address B in the CORTEX chip, the reading is repeated 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: the upper computer and the CORTEX chip are matched to execute the chip operation interaction method based on the SWD protocol.
The invention has the beneficial effects that: the address A, the address B, the address C and the corresponding storage space are preset in the CORTEX chip, and a specific command interaction mode is adopted, so that the normal operation interaction between the upper computer and the CORTEX chip is ensured, the CORTEX chip can receive data simultaneously in the process of processing own transactions, any extra overhead caused by data receiving is avoided, 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 an SWD protocol according to an embodiment of the present invention.
Detailed Description
According to the communication system provided by the embodiment, the upper computer is communicated with the CORTEX chip through the SWD protocol, and asynchronous data transmission can be realized through the SWD protocol communication, so that the normal operation interaction between the upper computer and the CORTEX chip can be ensured only by adopting a specific command interaction mode.
Referring to fig. 1, in the chip operation interaction method based on the SWD protocol provided in this embodiment, an address a, an address B, an address C, and a corresponding storage space are preset in the CORTEX chip. The following description is made from the upper computer end and the CORTEX chip end, respectively, as follows:
the steps executed by the upper computer end comprise:
(1) initializing an SWD bus;
(2) taking out a command to be sent to a CORTEX chip;
(3) sending commands over the SWD bus, including:
(3-1) sending the write 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) after the CORTEX chip finishes processing the command, reading ACK (Acknowledgement character) response content stored in a preset address C in the CORTEX chip; if the ACK response content stored in the preset address C in the CORTEX chip cannot be read, repeatedly reading;
(5) repeating the step (2) to the step (4) until all commands of the upper computer are sent;
the CORTEX chip end executes the steps of:
initializing a CORTEX chip;
reading the content in the preset address B, if a command code is read, executing the step III, otherwise, executing the step II;
reading the length in the preset address A and reading the data with the corresponding length;
fourthly, forming a complete command according to the data read in the second step and the third step, and executing the corresponding command;
after finishing executing the command, clearing the command code in the preset address B so as to receive the next command;
writing ACK response content into a preset address C;
seventhly, repeatedly executing the step (I) and the step (II).
The above embodiments are merely provided for full disclosure and not for limitation, and any replacement of equivalent technical features based on the gist of the present invention without creative efforts 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 an SWD bus;
(2) taking out a command to be sent to a CORTEX chip;
(3) sending commands over the SWD bus, including:
(3-1) sending the write 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) after the CORTEX chip finishes processing the command, reading ACK response content stored in a preset address C in the CORTEX chip;
(5) repeating the step (2) to the step (4) until all commands of the upper computer are sent;
the CORTEX chip end executes the steps of:
initializing a CORTEX chip;
reading a command code in a preset address B;
reading the length in the preset address A and reading the data with the corresponding length;
fourthly, forming a complete command according to the data read in the second step and the third step, and executing the corresponding command;
after finishing executing the command, clearing the command code in the preset address B so as to receive the next command;
writing ACK response content into a preset address C;
seventhly, repeatedly executing the step (I) and the step (II).
2. The chip operation interaction method based on the SWD protocol of claim 1, wherein in the step (4), if the ACK response content in the preset address C in the CORTEX chip cannot be read, the reading is repeated until the ACK response content is read.
3. The chip operation interaction method based on the SWD protocol as claimed in claim 1, wherein in the step two, if the command code cannot be read from the preset address B in the CORTEX 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 CORTEX chip are matched to execute the chip operation interaction method based on the SWD protocol in 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 true CN111522588A (en) | 2020-08-11 |
CN111522588B 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 (7)
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 |
US20030099238A1 (en) * | 2001-11-29 | 2003-05-29 | Koninklijke Philips Electronics N.V. | High-speed interchip interface protocol |
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 |
-
2020
- 2020-04-16 CN CN202010301374.2A patent/CN111522588B/en active Active
Patent Citations (7)
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 |
US20030099238A1 (en) * | 2001-11-29 | 2003-05-29 | Koninklijke Philips Electronics N.V. | High-speed interchip interface protocol |
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系列单片机脱机批量烧录器的设计与实现" * |
王玉荣;赵飞;郭依帆;魏钰轩;李文涛;茅靖峰;: "基于ARM和WiFi的互联网多终端病房监护系统设计" * |
石盼;雷英栋;何东伟;徐博铭;: "基于HID的STM32离线下载器的设计" * |
Also Published As
Publication number | Publication date |
---|---|
CN111522588B (en) | 2023-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021244194A1 (en) | Register reading/writing method, chip, subsystem, register group, and terminal | |
CN212135411U (en) | IO module and OCP keysets | |
CN104850516B (en) | A kind of DDR Frequency Conversion Designs method and apparatus | |
CN114706531A (en) | Data processing method, device, chip, equipment and medium | |
US20220327339A1 (en) | Smart card management device and smart card management method | |
CN111522588A (en) | Chip operation interaction method and communication system based on SWD protocol | |
CN112202855A (en) | Communication device for storing bare metal server and elastic block, intelligent network card and system | |
CN116185929A (en) | Communication conversion device for communication between master equipment and slave equipment | |
CN111443898A (en) | Method for designing flow program control software based on priority queue and finite-state machine | |
CN110750472A (en) | Method and device for converting INT interruption into MSI interruption and storage medium | |
CN110659143A (en) | Communication method and device between containers and electronic equipment | |
WO2022100148A1 (en) | Backplane communication device and control method therefor, and storage medium | |
CN115470172A (en) | Communication method, device, system and medium for double CPUs in POS machine | |
US20220365898A1 (en) | Multi-chip interconnection system based on pcie buses | |
CN112231409B (en) | Database synchronization initialization loading method, device, equipment and storage medium | |
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 | |
CN105376273A (en) | Standard cloud service interface and standard cloud service method | |
CN217640194U (en) | PCIE switching circuit based on sea light server | |
CN213934787U (en) | Data computing system and server with built-in data computing system | |
CN113472964B (en) | Image processing device and system | |
CN111796822B (en) | Scheme for realizing fast development of Http request of non-existing equipment | |
CN211087339U (en) | Electronic lock board card with serial F L ASH and card reading chip sharing data transmission interface | |
CN111988310B (en) | IEC61850 protocol-based data acquisition method and device | |
CN211349336U (en) | Storage device and electronic apparatus |
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 |