CN114625677A - Data access system, method, upper computer and tool MCU - Google Patents

Data access system, method, upper computer and tool MCU Download PDF

Info

Publication number
CN114625677A
CN114625677A CN202011462151.0A CN202011462151A CN114625677A CN 114625677 A CN114625677 A CN 114625677A CN 202011462151 A CN202011462151 A CN 202011462151A CN 114625677 A CN114625677 A CN 114625677A
Authority
CN
China
Prior art keywords
data
mcu
upper computer
instruction
tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011462151.0A
Other languages
Chinese (zh)
Inventor
林少钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaohua Semiconductor Co ltd
Original Assignee
Huada Semiconductor 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 Huada Semiconductor Co ltd filed Critical Huada Semiconductor Co ltd
Priority to CN202011462151.0A priority Critical patent/CN114625677A/en
Publication of CN114625677A publication Critical patent/CN114625677A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/105Program control for peripheral devices where the programme performs an input/output emulation function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a data access system, a data access method, an upper computer and a tool MCU. According to the data access method, the upper computer is used for setting parameters to generate a configuration file and sending the configuration file to the tool MCU; sending an instruction to control the tool MCU to access a target MCU; analyzing data received from a tool MCU according to a defined format of a configuration file, and displaying the data in a visual mode, wherein the tool MCU is used for waiting for an instruction of an upper computer; when the received instruction is not a working instruction, judging whether parameters need to be configured; and/or entering a parameter configuration process when the parameters are to be configured so as to configure the parameters according to the configuration file received from the upper computer; and/or entering a work execution phase when a work order is entered upon receipt of said order.

Description

Data access system, method, upper computer and tool MCU
Technical Field
The invention relates to the field of MCU online analysis, in particular to a data access system and method for online reading and writing of internal data of a Micro Controller Unit (MCU), an upper computer and an MCU. The system is used for online observation and rewriting of internal data including but not limited to internal registers of the MCU and/or variables of corresponding addresses and the like through a Serial Wire Debug (SWD) interface.
Background
For input and output signals of the MCU, the existing method for observing the change and the size of the signals is mainly to observe through an oscilloscope, but the oscilloscope can only observe the numerical value of the external input or output signals, and cannot observe the numerical value of a register inside the MCU, the variable of a designated address and the like. Meanwhile, in the case of external input and output signals, if impedance is easily affected or the application occasions with higher precision requirements are adopted, signals are monitored through the oscilloscope, certain errors are caused by the fact that the oscilloscope collects input impedance of a probe and a channel, data can not be judged to be accurate due to the fact that the input impedance of the probe and the channel comes in and goes out of an actual value, and an observed value and an internal value are more difficult to correspond.
For some situations that an MCU is directly connected to read internal data by using interfaces such as Serial communication and Universal Serial Bus (USB), if the application is complex and the amount of detection is required to be large, the program design will be more complex and the target variable to be read and written will not be changed flexibly; if the program is in some occasions with high speed and strict requirements on the program running time, the mode can easily influence the program running, and the read data is possibly not real-time data, so that the program is easy to operate by mistake.
Disclosure of Invention
The invention aims to provide a data access system, a data access method, an upper computer and a tool MCU.
According to a first aspect of the invention, a data access method is provided, which is applied to an upper computer and comprises setting parameters to generate a configuration file and sending the configuration file to a tool MCU; sending an instruction to control a tool MCU to access a target MCU; and analyzing the data received from the tool MCU according to the defined format of the configuration file, and displaying the data in a visual mode.
The method according to the above aspect of the present invention further includes sending a parameter configuration instruction to control the tool MCU to perform parameter configuration according to a configuration file sent by the upper computer, where the configuration file includes a register or variable specifying an address to the target MCU, a sampling period, and a group packing manner; and/or sending a working instruction to control the tool MCU to execute read or write operation; and/or judging whether the data is written successfully or not when receiving the data read out from the written address by the tool MCU; and/or presenting the parsed data in a visual manner including a report form, a graph form, a real-time window, and/or an edit box.
The method according to the above aspect of the present invention, further comprises parsing the received data into a waveform display of high and low levels; and/or for the condition of displaying the numerical value in real time, displaying the numerical value acquired in real time in a corresponding edit box; and/or writing the numerical value to a register or a variable of the specified address by inputting the address and the numerical value in the specified edit box; and/or for the condition that the report form needs to be obtained, selecting the option of the report form and the variable to be obtained by the report form, and exporting the report form when stopping; and/or defining the display form and the number of the display variables through the configuration file, and issuing the well-defined configuration file to the tool MCU.
According to a second aspect of the present invention, there is provided a data access method, applied to a tool MCU, including waiting for an instruction from an upper computer; and/or judging whether parameters need to be configured or not when the received instruction is not a working instruction; and/or entering a parameter configuration process when the parameters are to be configured so as to configure the parameters according to the configuration file received from the upper computer; and/or entering a work execution phase when a work order is entered upon receipt of said order.
According to the method of the above aspect of the present invention, the configuration parameters include the register address or the address of the variable of the target MCU to be read, the number of parameters, the display format, the packaging mode, and the reporting condition.
The method according to the above aspect of the present invention, further comprising:
when receiving a work entering instruction, judging whether the parameters are configured or not; and/or
When the parameters are configured, entering a work execution stage, and judging whether the received command is a data reading command or a data writing command; and/or for a read data instruction, executing the read data instruction; and/or for a write data instruction, executing the write data instruction.
The method according to the above aspect of the present invention, further comprising reading data of a specified address from the target MCU; and/or packing the data according to a data format preset by a configuration file; and/or uploading the packed data to an upper computer in a universal serial bus mode.
The method according to the above aspect of the present invention further includes reading data from the target MCU to obtain real-time data every time the timer is interrupted at a time interval set by the timer; and/or when the reporting condition is met and the last sending is finished, sending the packed data to an upper computer.
The method according to the above aspect of the present invention further includes receiving data of a designated address after receiving a write data instruction from the upper computer; and/or judging whether the designated address is consistent with an address defined by a configuration file; and/or when the designated address is consistent with the address defined by the configuration file, writing the data to be written to the designated address of the target MCU, and reading the data from the written designated address of the target MCU; and/or reporting the data of the written address read from the target MCU to the upper computer.
According to the method of the above aspect of the present invention, the tool MCU reads data from the target MCU via the serial debug interface or writes data into the target MCU and reads data of the written address, and/or reports the read data to the upper computer via the universal serial bus interface.
According to a third aspect of the present invention, there is provided a data access system, comprising a receiving module, a reading module and a sending module; the receiving module is used for receiving an instruction and/or a configuration file sent by the upper computer, wherein the instruction comprises a parameter configuration instruction and/or an instruction for reading or writing a target MCU; and/or the reading module is used for reading data corresponding to the specified address and/or the written data of the specified address from the target MCU, and/or putting the data into a data packet of the tool MCU; and/or the sending module is used for sending the data packet to an upper computer so that the upper computer can analyze and/or display the data of the data packet according to a configuration file.
According to a fourth aspect of the present invention, there is provided an upper computer, comprising a processor and a memory; the memory is used for storing a computer program; and/or the processor is connected with the memory and used for executing the computer program stored in the memory so as to enable the upper computer to execute the data access method in any one of the first aspect.
According to a fifth aspect of the present invention, there is provided a tool MCU, comprising a processor and a memory; the memory is used for storing a computer program; and/or the processor is connected with the memory and used for executing the computer program stored in the memory so as to enable the upper computer to execute the data access method in any one of the second aspects.
According to a sixth aspect of the present invention, there is provided a data access system, comprising the upper computer according to the fourth aspect of the present invention, and/or the tool MCU according to the fifth aspect of the present invention; the upper computer is used for setting parameters to generate a configuration file and sending the configuration file to the tool MCU; sending an instruction to control a tool MCU to access a target MCU; analyzing data received from the tool MCU according to the defined format of the configuration file, and displaying the data in a visual mode; the tool MCU is used for waiting for instructions of the upper computer; when the received upper computer instruction is not a working instruction, judging whether parameters need to be configured; entering a parameter configuration process when parameters are to be configured so as to configure the parameters according to the configuration file received from the upper computer; and when the received upper computer instruction enters a working instruction, entering a working execution stage.
According to the above aspects of the invention, the data access system, the method, the upper computer and the tool MCU of the invention perform online observation and rewriting of internal data including internal registers of the MCU and variables of corresponding addresses by various MCUs with SWD interfaces, and the above operation process is realized by the SWD interfaces. Therefore, the method can be applied to the situation that a simulation tool cannot be used, but the register value or the value of the designated address variable must be read in real time, so that the operation of the device is not influenced, and the key data of the target MCU can be acquired or modified. In addition, the invention can also be applied to the condition of high-speed operation, thereby meeting the harsh requirement of the target MCU on time operation and not influencing the internal operation logic. For complex application in a debugging stage, the method can read the core register value or the variable value of a target MCU in the application to perform auxiliary debugging. The invention can also inquire the register value or variable value in the target MCU when the field debugging equipment is applied, thereby being convenient for analyzing and solving the problem. In the event of unpredictable errors, the problem can be resolved analytically using the present invention. The invention can also flexibly read and rewrite the data in the target MCU on line, so as to facilitate the field technicians to debug the target MCU.
In addition, the invention utilizes visual display, for the application needing to visually display the waveform, by setting the display form, the curve formed by the change process of the data read by the specified address can be displayed, and at most, a numerical curve of 8 variables can be displayed, for example, but the invention is not limited to the method.
For the real-time display of the numerical value, the real-time acquired numerical value is displayed in the corresponding edit box through an upper computer software interface, and the numerical value can be written into a register or a variable of a designated address by inputting the address and the numerical value in the designated edit box.
For the condition that the report needs to be obtained, the option of the report and the variable to be obtained by the report can be selected, and the report can be directly exported when the report stops.
The display form and the number of the display variables can be defined by a configuration file defined by the upper computer, the well-defined configuration file is issued to the tool MCU, and the tool MCU and the upper computer are matched together to realize the above effects. The number of the collected variables, the format of the data packet, the address definition and the like are predefined in the form of the configuration file, so that the observation and modification of the variables or the registers on the internal address of the target MCU can be realized very flexibly.
Drawings
FIG. 1 shows a schematic flow chart diagram of one example of a data access method in accordance with one embodiment of the present invention;
FIG. 2A shows a schematic flow chart diagram of one example of a data access method in accordance with one embodiment of the present invention;
FIG. 2B shows a schematic flow chart diagram of one example of a data access method in accordance with one embodiment of the present invention;
FIG. 2C shows a schematic flow diagram of one example of a data access method in accordance with one embodiment of the invention;
FIG. 2D shows a schematic flow chart diagram of one example of a data access method in accordance with one embodiment of the present invention;
FIG. 3 shows a schematic flow chart diagram of one example of a data access method in accordance with one embodiment of the present invention;
FIG. 4 shows a schematic block diagram of one example of a data access system in accordance with one embodiment of the present invention;
FIG. 5 shows a schematic block diagram of one example of a data access device in accordance with one embodiment of the present invention;
FIG. 6 shows a schematic block diagram of one example of a data access system in accordance with one embodiment of the present invention.
Description of the element reference numerals
402 receiving module
404 read module
406 sending module
502 processor
504 memory
610 upper computer
620 MCU tool
630 target MCU
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and its several details are capable of modifications and variations in various respects, all without departing from the spirit of the invention. It should be noted that, in the following embodiments, features in the embodiments may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and therefore, the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, the type, quantity and proportion of the components in actual implementation can be changed freely, and the layout of the components can be more complicated.
Although the following description sets forth various implementations that may be shown, for example, in a system architecture, implementations of the techniques and/or arrangements described herein are not limited to a particular system architecture and/or computing system and may be implemented by any architecture and/or computing system for similar purposes. For example, various architectures and/or various computing devices and/or electronic devices employing, for example, one or more integrated circuit chips and/or packages, may implement the techniques and/or arrangements described herein. Furthermore, although the following description may set forth numerous specific details (e.g., logical implementations, types and interrelationships of system components, logical partitioning/integration choices, etc.), claimed subject matter may be practiced without these specific details. In other instances, some materials (e.g., control structures and complete software instruction sequences) may not be shown in detail in order not to obscure the material disclosed herein. The materials disclosed herein may be implemented in hardware, firmware, software, or any combination thereof.
The materials disclosed herein may also be implemented as instructions stored on a machine-readable medium or memory that may be read and executed by one or more processors. A computer-readable medium may include any medium and/or mechanism for storing or transmitting information in a form readable by a machine (e.g., a computing device). For example, a machine-readable medium may include Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media; an optical storage medium; a flash memory device; and/or other media. In another form, a non-transitory article (e.g., a non-transitory computer readable medium) can be used for any of the above-mentioned examples or other examples, including such elements (e.g., RAM, etc.) that can temporarily store data in a "transient" manner.
The data access system, the data access method, the upper computer and the MCU can be used for executing MCU internal data access through the SWD interface so as to realize online observation and rewriting of internal data of various MCUs with the SWD interface, wherein the internal data include but are not limited to an internal register of the MCU, and/or variables of corresponding addresses and the like.
FIG. 1 illustrates an example of a data access method according to one embodiment of the present invention. The method can be used for online reading and writing of the internal data of the MCU. In one embodiment, the method may be used in an upper computer.
As shown in FIG. 1, at block 102, parameters are set to generate a configuration file that is sent to the tool MCU.
Specifically, the interaction between the tool MCU and the target MCU, the communication regulation between the tool MCU and the upper computer, and the like may be agreed in the form of a configuration file. And the upper computer generates a configuration file after setting parameters. Specifically, the upper computer can set parameters such as registers or variables, sampling periods, and packaging modes of the target MCU designated address, and issues the set parameters to a tool kit (tool MCU) in the form of a configuration file. Specifically, the upper computer may control the tool MCU to perform parameter configuration according to the configuration file sent by the upper computer by sending a parameter configuration instruction.
Specifically, the upper computer may wait for feedback of the tool MCU after issuing the configuration file to the tool MCU. And the upper computer receives the feedback information of the tool MCU and then indicates that the tool MCU has set one or more parameters during working, such as the address and the number of observation parameters of the target MCU, the data format reported to the upper computer and the like. The form of the configuration file can greatly improve the flexibility of the tool MCU, and the misoperation condition of the upper computer and the target MCU can be better prevented.
At block 104, an instruction is sent to control the tool MCU to access the target MCU.
Specifically, the upper computer may control the tool MCU to enter the execution phase by sending a work instruction. For example, the upper computer may control the tool MCU to perform a read/write operation on the target MCU by transmitting a work instruction. If the parameters of the tool MCU are not configured, the upper computer can send the parameter configuration instruction and/or the configuration file to the tool MCU again when receiving the notification of the tool MCU to indicate that the parameters are configured and then the upper computer starts to work and execute, so that the tool MCU can perform parameter configuration. For the instruction of modifying the specified address data, if the upper computer receives the notification that the address is not in the matching range from the tool MCU, the upper computer can send the parameter configuration instruction and/or the configuration file and/or the working instruction and the like to the tool MCU again.
At block 106, the data received from the tool MCU is parsed according to the defined format of the configuration file and presented in a visual manner.
Specifically, after receiving the data reported by the tool MCU, the upper computer parses the data according to the datagram format set at the parameter setting stage, and displays the data as required.
Specifically, in one embodiment, the tool MCU may be implemented by a Field Programmable Gate Array (FPGA) to read data at a higher rate.
Specifically, for the case of modifying the designated address data, the upper computer may determine whether the data writing is successful or not when receiving the data read out from the written address by the tool MCU.
Specifically, the upper computer may be displayed in a report form, a curve form, a real-time window, an edit box, or other visualization manners, but the present invention is not limited thereto.
Specifically, the upper computer may also display, but is not limited to, the read data reported by the tool MCU, the completion parameter configuration notification reported by the tool MCU, the notification that the parameter configuration is not completed, the notification that the parameter configuration is completed and then the work is performed, the notification that the address is not in the matching range, and/or the result of determining whether the writing is successful or not by the upper computer.
Specifically, the tool MCU and the target MCU are distinguished in the present invention because the tool MCU accesses the internal data of the target MCU, but does not represent a difference between the tool MCU and the target MCU. But the invention is not limited thereto.
Specifically, for some occasions with higher requirements, the acquired data can be analyzed into high and low level waveforms through internal conversion for display, so that the message of data change can be conveniently checked on occasions where the oscilloscope cannot be used, and the function of protocol analysis can be expanded. For an application requiring a waveform to be visually displayed, by setting a display form, a curve formed by a change process of data read by a specified address can be displayed, and a numerical curve of, for example, 8 variables can be displayed at the same time, but the present invention is not limited thereto.
Specifically, for the case of displaying the numerical value in real time, the numerical value obtained in real time is displayed in the corresponding edit box through the software interface of the upper computer, and the numerical value can also be written into the register or the variable of the designated address by inputting the address and the numerical value in the designated edit box.
Specifically, for the condition that the report needs to be acquired, the option that needs the report and the variable that the report needs to be acquired can be selected, and the report can be directly exported when the report stops.
Specifically, the display form and the number of the display variables can be defined by a configuration file defined by the upper computer, and the defined configuration file is issued to the tool MCU, and the tool MCU and the upper computer are matched together to realize the display. The number of the collected variables, the format of the data packet, the address definition and the like are predefined in the form of the configuration file, so that the observation and modification of the variables or the registers on the internal address of the target MCU can be realized very flexibly.
FIG. 2A illustrates an example of a data access method in accordance with one embodiment of the present invention. In one embodiment, the method may be used in a tool kit (e.g., a tool MCU).
As shown in FIG. 2A, at block 202, a host computer instruction is awaited.
In particular, the toolkit may include, but is not limited to, for example, a 32-bit MCU as a processor. The tool MCU is connected with the upper computer through a USB interface so as to receive configuration files and/or control instructions from the upper computer. Compared with a Universal Asynchronous Receiver/transmitter (UART) communication mode, the USB communication mode can greatly improve the communication speed, any transmission speed is not limited in the highest speed range of the USB, and the USB communication speed is not limited as long as the upper limit of the USB communication speed is not exceeded; the length of the transmission data is flexible and changeable, packet loss and the like caused by too long data length can be avoided, and the reliability of communication between the MCU and the upper computer can be improved.
Specifically, the tool MCU initializes a data format and/or used peripherals after power-on or reset, such as but not limited to General Purpose Input/output (gpio), a timer, a USB, Direct Memory Access (DMA), a watchdog, a system clock, and the like, and configures the peripherals into a required mode.
At block 204, when the received instruction is not an enter work instruction, a determination is made as to whether to configure parameters.
Specifically, when receiving an instruction of the upper computer, the tool MCU may determine whether the instruction is a work instruction, and whether the execution stage is required. If the instruction is not a work instruction or a command requiring to enter an execution stage, the tool MCU can judge whether the instruction is a parameter configuration instruction or not and whether the parameter is to be configured or not. When the received command is not a parameter configuration command and does not configure parameters, the tool MCU enters a stage of waiting for the command of the upper computer again (block 202).
At block 206, when a parameter is to be configured, a parameter configuration process is entered.
Specifically, the configured parameters may include, but are not limited to, the register address or the address of the variable of the target MCU to be read, the number of parameters, the display form, the packaging mode, the reporting condition, and the like. And the configured parameters are issued to the tool MCU by the upper computer in a configuration file format. And after receiving the configuration file, the tool MCU executes related parameter initialization according to the requirement of the configuration file, and sets the received configuration parameter to the tool MCU according to the requirement of the configuration file.
Specifically, the tool MCU notifies the host computer after completing the parameter configuration, and enters the stage of waiting for the host computer instruction, for example, waiting for the start of a read or write command again (block 202). The feedback information of the tool MCU can represent various parameters of the tool MCU when the tool MCU works, including but not limited to the address and the number of observation parameters of the target MCU, the data format reported to the upper computer, and the like. And after the tool MCU completes the parameter configuration, the tool MCU informs the upper computer and enters a stage of waiting for instructions (for example, starting read-write commands) of the upper computer again.
FIG. 2B illustrates an example of a data access method in accordance with one embodiment of the present invention. In one embodiment, the method may be used for a tool MCU.
As shown in FIG. 2B, at block 208, it waits until the upper computer instruction is received again.
At block 210, upon receiving an enter work instruction, a determination is made as to whether the parameters have been configured.
Specifically, if an enter work instruction is received, an execution stage is entered, and whether the parameters are configured or not can be judged. When the parameters are not configured, the method returns to the stage of waiting for the instruction of the upper computer (block 202), and informs the upper computer to configure the parameters first and then start the work execution stage.
At block 212, when the parameters are configured, the work execution phase is entered to determine whether the received command is a read data command or a write data command.
At block 214, for a read data instruction, the read data instruction is executed.
Specifically, the tool MCU reads data of a designated address from the target MCU through the SWD interface, packages the data according to a preset data format, and uploads the packaged data to the upper computer in a USB mode.
At block 216, for a write data instruction, the write data instruction is executed.
Specifically, after receiving a write data instruction of the upper computer, the tool MCU writes data to be written to a designated address of the target MCU through the SWD interface, reads the data from the designated address of the target MCU, and reports the data to the upper computer.
FIG. 2C illustrates an example of a data access method in accordance with one embodiment of the present invention. In one embodiment, the method may be used for a tool MCU. In one embodiment, the method includes executing a read data instruction.
As shown in fig. 2C, at block 2141, the data at the address specified by the target MCU is read according to the requirement of the configuration file, and the data is put into the data packet of the tool MCU.
Specifically, the tool MCU reads data of a designated address from the target MCU through the SWD interface, and packages the data according to a preset data format. For the situation of requiring to acquire real-time data, in the work execution stage, the tool MCU starts to read data from the target MCU whenever the timer is interrupted according to the time interval set by the timer.
Specifically, GPIOs corresponding to the SWD interface of the tool MCU may include, but are not limited to, ordinary GPIOs. The tool MCU is controlled according to the SWD standard through the GPIO, input and output data are controlled through SWD standard logic, and effective data from the target MCU are analyzed from the input and output data.
In particular, the read data instruction may include, but is not limited to, an instruction instructing the tool MCU to read data, and/or an address of a target MCU where the data is located, such as a register address or an address of a variable of the data.
Specifically, a packet is a packet used to store data. For example, a Packet (Packet) is a data unit in TCP/IP protocol communication transmission, also called a data Packet, but the present invention is not limited to the data unit.
At block 2142, it is determined whether the packet satisfies a reporting condition.
Specifically, after the tool MCU packages the read data, it determines whether the packaged data package meets the reporting condition required by the configuration file. Specifically, the determining whether the data packet meets the reporting requirement of the configuration file requirement may include determining whether the data packet meets the data format or other reporting conditions of the reporting upper computer meeting the configuration file requirement. When the reporting condition is not met, the workpiece MCU continues to read the data at the designated address of the target MCU according to the requirement of the configuration file, and packages the data into a data packet according to the data format required by the configuration file (block 2141).
At block 2143, when the reporting condition is satisfied, the data is sent to the upper computer when the last reporting is completed.
Specifically, the tool MCU reports the data to the upper computer through the USB interface according to the format requirement of the configuration file after the last reporting is completed. And if the last reporting is not finished, the tool MCU waits for the last reporting to be finished and then sends the data to the upper computer. Specifically, the tool MCU uploads the packed data to the upper computer in a USB mode. After the current data is sent, but the stop instruction is not received, the flow returns to block 2141 to continue reading and packing the data. And if the stop instruction is received, returning to wait for the next upper computer instruction.
FIG. 2D illustrates an example of a method according to an embodiment of the invention. In one embodiment, the method may be used for a tool MCU. In one embodiment, the method includes executing a write data instruction.
As shown in fig. 2D, at block 2161, after a write data instruction is received from the host computer, data at the specified address is received.
Specifically, the tool MCU receives data to be written to a designated address of the target MCU via the USB interface.
At block 2162, a determination is made as to whether the specified address coincides with an address defined by a configuration file.
At block 2163, when the designated address coincides with an address defined by the configuration file, the data to be written is written to the designated address of the target MCU and read from the written designated address of the target MCU.
Specifically, the tool MCU writes data to be written into and reads data from a designated address of the target MCU via the SWD interface.
At block 2164, the data of the written address read from the target MCU is reported to the host computer.
Specifically, the tool MCU reports the data read from the target MCU to the upper computer through the USB interface. And then returns to wait for the next upper computer instruction.
Specifically, the upper computer prompts whether the data writing is successful or not by judging the received data. The upper computer can analyze the received data according to the defined format of the configuration file and display the data and/or the prompt in a visual mode.
At block 2165, when the specified address is inconsistent with the address defined by the configuration file, the upper computer is notified that the specified address is not within the matching range.
Specifically, the tool MCU sends the notification to the upper computer via the USB interface. Flow then returns to block 308 to continue waiting for the next host computer instruction.
Specifically, the upper computer may present the notification and the like in a visual manner.
Fig. 3 shows an example of a method of accessing MCU internal data online according to an embodiment of the present invention, wherein the method can be used for a tool MCU.
As shown in FIG. 3, at block 302, the tool MCU is powered on or reset.
At block 304, after power up or reset, the tool MCU initializes the data format, its own clock, peripherals used, etc.
Specifically, the peripheral includes, but is not limited to, a GPIO, SWD interface, timer, USB interface, DMA, watchdog, system clock, etc. to configure the peripheral into the required mode.
At decision block 306, a determination is made whether initialization is complete.
Specifically, if initialization is not complete, flow returns to block 304 to continue initialization.
At block 308, after initialization is complete, a standby waiting state for upper computer instructions is entered.
At block 310, it is determined whether a host computer instruction is received.
Specifically, when no host computer instructions are received, the flow returns to block 308 to continue waiting for host computer instructions.
In particular, the toolkit may include, but is not limited to, for example, a 32-bit MCU or the like as the processor. The tool MCU is connected with the upper computer through a USB interface to receive configuration files and/or control instructions from the upper computer.
At block 312, when an upper computer instruction is received, it is determined whether the received upper computer instruction is a work entry instruction, e.g., whether entry into an execution phase is required.
At block 314, when the received upper computer command is not an enter work command, it is determined whether the upper computer command requires parameter configuration.
Specifically, if the upper computer instruction is not to configure parameter instructions, then the flow returns to block 308 to continue waiting for the upper computer instruction.
In block 316, when the received upper computer instruction is a parameter configuration instruction, a configuration file sent by the upper computer is received, so as to perform parameter configuration according to the configuration file. Flow then returns to block 308.
Specifically, the configured parameters may include, but are not limited to, the register address or the address of the variable of the target MCU to be read, the number of parameters, the display form, the packaging mode, the reporting condition, and the like. And the configured parameters are issued to the tool MCU by the upper computer in a configuration file format. And after receiving the configuration file, the tool MCU executes related parameter initialization according to the requirement of the configuration file, and sets the received configuration parameter for the tool MCU according to the requirement of the configuration file.
Specifically, the tool MCU notifies the host computer after completing the parameter configuration, and enters a stage of waiting for an instruction of the host computer, for example, waiting for a read or write command to start again. The feedback information of the tool MCU can represent various parameters of the tool MCU when the tool MCU works, including but not limited to the address and the number of observation parameters of the target MCU, the data format reported to the upper computer, and the like.
At block 318, when the received host computer command is a work command, it is determined whether the parameters have been configured.
Specifically, if an enter work instruction is received, an execution stage is entered, and whether the parameters are configured or not can be judged. When the parameters are not configured, then the flow returns to the stage of waiting for host computer instructions (block 308). The tool MCU can inform the upper computer to configure parameters first and then start the work execution stage.
At block 320, when the parameters are configured, the work execution phase is entered to determine whether the received command is a read data command or a write data command.
At block 322, for a read data instruction, the read data instruction is executed.
Specifically, data at a specified address is read according to the configuration file requirements. And the tool MCU reads the data of the specified address from the target MCU through the SWD interface.
At block 324, the read data is placed into a data packet according to a preset format.
Specifically, the read data may be packaged according to a data format preset in the configuration file.
At block 326, it is determined whether the reporting condition is satisfied.
Specifically, the determining whether the data packet meets the reporting requirement of the configuration file requirement may include determining whether the data packet meets the data format or other reporting conditions of the reporting upper computer meeting the configuration file requirement.
Specifically, if the reporting condition is not satisfied, the flow returns to block 322 to continue reading the data at the specified address as required by the configuration file.
At block 328, when the reporting condition is satisfied, it is determined whether the last reporting has been completed.
At block 330, if the last report is not complete, then the last report is waited for.
At block 332, after the last report is completed, the data is sent.
Specifically, the tool MCU uploads the packed data to the upper computer in a USB mode.
At block 334, after the report is completed, it is determined whether a stop command is received.
Specifically, if a stop instruction is not received, flow returns to block 322 to continue reading data at the specified address as required by the configuration file.
If a stop instruction is received, the flow returns to 308 to continue waiting for the next instruction of the upper computer.
At block 336, for a write data instruction, the write data instruction is executed.
Specifically, the tool MCU receives data to be written to a designated address of the target MCU via the USB interface.
At block 338, a determination is made as to whether the specified address is consistent with an address defined by a configuration file.
In block 340, when the designated address is consistent with the address defined by the configuration file, the data to be written is written to the designated address of the target MCU, and the data of the written address of the target MCU is read out.
Specifically, the tool MCU writes data to be written into and reads data from a designated address written by the target MCU via the SWD interface.
At block 344, the data read from the target MCU is reported to the host computer in a preset format.
Specifically, the tool MCU reports the data read out from the target MCU to the upper computer through the USB interface according to a preset format. The flow then returns to block 308 to continue waiting for the next instruction from the upper computer.
At block 342, when the specified address is inconsistent with the address defined by the configuration file, the host computer is notified that the specified address is not within the matching range.
Specifically, the tool MCU sends the notification to the upper computer via the USB interface. Flow then returns to block 308 to continue waiting for the next host computer instruction.
Specifically, the upper computer can prompt whether the data writing is successful or not by judging the received data. The upper computer can analyze the received data according to the defined format of the configuration file and display the data and/or the prompt in a visual mode.
FIG. 4 illustrates an example of a data access system according to one embodiment of the present invention. In one embodiment, the data access system may be used for online observation and/or rewriting of internal data of various MCUs with SWD interfaces, including but not limited to internal registers of the MCUs, variables of corresponding addresses, and the like, and the above operations may be implemented through the SWD interfaces.
As shown in FIG. 4, in one embodiment, the data access system may include a receiving module 402, a reading module 404, and a sending module 406.
The receiving module 402 is configured to receive an instruction and/or a configuration file sent by the upper computer, where the instruction may include a parameter configuration instruction, a read or write instruction for a specified address of the target MCU, and the like, so as to perform parameter configuration and/or access (e.g., read or write, and the like) the specified address of the target MCU.
The reading module 404 is configured to read data of the target MCU corresponding to the specified address, and put the read data into a data packet with a preset format.
The sending module 406 is configured to send the data packet to an upper computer, so that the upper computer performs analysis and/or visual display according to a defined format.
In an embodiment, the structures and principles of the receiving module 402, the reading module 404, and the sending module 406 correspond to the respective flows of the data access method described above with reference to fig. 1, fig. 2A to fig. 2D, and fig. 3, and thus are not described again.
The division of the modules of the above system is only a division of logical functions, and the actual implementation may be wholly or partially integrated on one physical entity or may be physically separated. These modules may all be implemented in software invoked by a processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of processing element calling software, and part of the modules can be realized in the form of hardware. For example, one or more of the modules may be a separate processing element, or may be implemented by being integrated into a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the one or more processing elements of the apparatus may call and execute the functions of the one or more modules. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element may be an integrated circuit having signal processing capabilities. In implementation, the procedures of the above method and/or the above modules may be performed by integrated logic circuits of hardware in a processor element and/or instructions in the form of software.
For example, the above modules may be one or more Integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs) or one or more Field Programmable Gate Arrays (FPGAs), etc. when the above modules are implemented in the form of a Processing element that invokes program code, the Processing element may be a general-purpose Processor, such as a Central Processing Unit (CPU) or other Processor that may invoke the program code.
In one embodiment, the invention also includes a computer-readable storage medium on which is stored a computer program that, when executed by a processor, implements any of the data access methods described above.
Those skilled in the art will appreciate that all or part of the flow for implementing the embodiments described may be accomplished by hardware related to a computer program. The computer program may be stored in a computer readable storage medium. When executed, the program performs a process including the method embodiments described above. The storage medium includes, but is not limited to, ROM, RAM, magnetic disk, usb disk, optical disk, memory card, or various other media that can store program codes.
Fig. 5 shows an example of an upper computer or tool MCU according to an embodiment of the present invention.
As shown in FIG. 5, in one embodiment, the upper computer may include processors 502 and 504. The memory 504 is used for storing computer programs. The processor 502 is connected to the memory 504, and is configured to execute the computer program stored in the memory 502, so as to enable the tool MCU to execute the above data access method.
In another embodiment, the tool MCU may similarly include processors 502 and 504. The memory 504 is used for storing computer programs. The processor 502 is connected to the memory 504, and is configured to execute the computer program stored in the memory 502, so as to enable the tool MCU to execute the above data access method.
Specifically, the memory 504 may include, but is not limited to, various media that can store program codes, such as ROM, RAM, magnetic disks, optical disks, usb disks, memory cards, and the like.
The Processor 502 may include, but is not limited to, a general purpose Processor such as a CPU or Network Processor (NP), etc., and may also include, but is not limited to, a DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
In particular, in one embodiment, the tool MCU may be implemented by an FPGA to read data at a higher rate.
For some occasions with higher requirements, the acquired data can be analyzed into high and low level waveforms through internal conversion for display, so that the message of data change can be conveniently checked on occasions where the oscilloscope cannot be used, and the protocol analysis function can be expanded.
FIG. 6 illustrates an example of a data access system according to one embodiment of the present invention. In one embodiment, the data access system is used for performing online observation and/or rewriting internal data of various MCUs with SWD interfaces, including but not limited to internal registers of the MCUs and variables of corresponding addresses, and the above operations are implemented through the SWD interfaces.
As shown in FIG. 6, in one embodiment, the data access system includes a host computer 610 and a tool kit including a MCU 620 (tool MCU) as a tool.
Specifically, the upper computer 610 includes, but is not limited to, a computer.
The tool MCU 620 may be connected to the host computer 610 through a USB interface and/or connected to a target object to be read and/or written through an SWD interface. The tool MCU 620 may be used to perform a read or write operation on a target object, etc., and may be controlled by the upper computer 610. In particular, the target object may be any device or product or the like comprising a target MCU 630 with an SWD interface, such as a household appliance, an automobile accessory, a motor or the like.
Specifically, the tool MCU 620 is used to perform online observation, access and/or read/write of internal data of the target MCU 630, but the tool MCU 620 and the target MCU 630 may be the same or different.
As shown in fig. 6, the connection between the upper computer 610 and the tool MCU 620 may be a USB connection. Specifically, the communication mode of the USB can greatly improve the communication rate, and any transmission rate is not limited in the highest rate range of the USB as long as the upper limit of the communication rate of the USB is not exceeded. The length of the transmission data is flexible and changeable, and packet loss and the like caused by too long data length can be avoided. The USB is used as a complex Internet Protocol (IP) of the MCU, has a Direct Memory Access (DMA) transmission function inside, does not influence the operation of the MCU, and greatly improves the utilization rate of the MCU.
For the interaction between the tool MCU 620 and the target MCU 630, the communication protocol between the tool MCU 620 and the upper computer 610 may be agreed by the form of a configuration file. The upper computer 610 is configured to generate a configuration file after setting, issue the configuration file to the tool MCU 620, and wait for feedback of the tool MCU 620. The upper computer 610 is used for receiving feedback information of the tool MCU 620. For example, the feedback information may indicate that the tool MCU 620 has set various parameters during operation, such as the address and number of the observation parameters of the target MCU 630, and the data format reported to the upper computer. Specifically, the flexibility of the tool MCU 620 can be greatly improved by adopting a configuration file form, and the misoperation conditions of the upper computer 610 and the target MCU 630 can be better prevented.
The upper computer 610 may be configured to set parameters such as a register or a variable of the designated address of the target MCU 630, a sampling period, a group packing mode, and a reporting condition. The upper computer 610 is used for issuing the set parameters to the tool MCU 620 in the form of a configuration file. The upper computer 610 is used for controlling the tool kit (tool MCU 620) to work in an instruction mode. The upper computer 610 is used for analyzing the data received from the tool MCU 620 according to the defined format of the configuration file and displaying the data in a visual mode. Specifically, the visualization options may be in a report form, a curve form, a real-time window, an edit box, and the like. Specifically, for the case of modifying the designated address data, the upper computer may determine whether the data writing is successful or not when receiving the data read out from the written address by the tool MCU.
Specifically, the upper computer 610 may also visually display, but is not limited to, read data reported by the tool MCU 620, a notification of completing parameter configuration, a notification of not completing parameter configuration, a notification of starting to perform work after configuring parameters, a notification that an address is not within a matching range, and/or a result of determining whether writing is successful or not by the upper computer 610.
In one embodiment, tool MCU 620 may utilize, but is not limited to, a 32-bit MCU as a processor. The tool MCU 620 is connected with an upper computer through a USB, and is used for receiving configuration files and/or control instructions from the upper computer 610 and setting received configuration parameters to the tool MCU 620 according to the requirements of the configuration files. The SWD corresponding general purpose input/output of the tool MCU 620 includes, but is not limited to, general GPIOs. The tool MCU 620 is controlled by the GPIO according to the SWD standard, and input and output data are controlled by SWD standard logic and effective data from the target MCU 630 are analyzed from the input and output data.
In particular, in one embodiment, the tool MCU may be implemented by an FPGA to read data at a higher rate.
In one embodiment, MCU 630 powers up first to initialize its own clock, the peripherals used. Including but not limited to GPIOs, timers, USB, DMA, watchdog, system clock, etc., configure the peripheral into the required mode. In one embodiment, initialization may include initialization of MCU hardware resources and the like, and may also include initialization of variables, default parameters, and the like, related to the program. And after the initialization is finished, entering a state of waiting for the command of the upper computer in a standby mode.
The MCU 630 is in a state of waiting for the command of the upper computer after the power-on initialization is completed, and when the command of the upper computer is received, it is determined whether it is required to enter the execution stage.
If not, MCU 630 determines if it is a command to enter an execution phase. And if the command is a configuration parameter command, entering a configuration parameter process. The configuration parameters may include, but are not limited to, the register address or the address of the variable of the target MCU to be read, the number of parameters, the display format, the packing manner, etc. The parameter configuration is that the upper computer 610 issues related parameters and the like to the tool MCU 620 in a configuration file format, and the tool MCU 620 executes related parameter initialization according to the requirements of the configuration file after receiving the configuration file. After the tool MCU 620 completes the parameter configuration, it notifies the upper computer 610 and enters the stage of waiting for the start of the read/write command again. If the command is not the configuration parameter command, the command waiting phase is entered again.
If the execution phase is required to be entered, the tool MCU 620 judges whether the parameters are configured, if the parameters are not configured, the tool MCU returns to the phase of waiting for the command and informs the upper computer 610 to configure the parameters first and then start the work execution phase. And if the parameter configuration is finished, entering a work execution state.
In the work execution stage, the tool MCU 620 reads the data of the designated address from the target MCU 630 through the SWD interface, packages the data according to the preset data format, and uploads the packaged data to the upper computer 610 in the USB mode. For the case of real-time data acquisition, during the work execution phase, the tool MCU 620 will start to read data from the target MCU 630 whenever the timer is interrupted according to the time interval set by the timer. When the data packet has satisfied the condition required by the configuration file, the tool MCU 620 reports the data to the upper computer 610 via the USB according to the format requirement of the configuration file.
For the data with the modified designated address, the tool MCU 620, as long as it receives the write data command from the upper computer 610, writes the data to be written to the designated address by judging whether the designated address is consistent with the address defined by the configuration file, and reads the written data again and reports it to the upper computer 610, otherwise, notifies the upper computer 610 that the address is not within the matching range.
In the work execution stage, after receiving the data reported by the MCU 620, the upper computer 610 parses the data according to the datagram format set in the parameter setting stage, and displays the data as required.
Specifically, in the case of modifying the designated address data, the upper computer 610 may determine whether the data writing is successful or not upon receiving the data read out from the written address by the tool MCU 620.
Specifically, for some occasions with higher requirements, the acquired data can be analyzed into high and low level waveforms through internal conversion for display, so that the message of data change can be conveniently checked on occasions where the oscilloscope cannot be used, and the function of protocol analysis can be expanded. For an application requiring a visual display of a waveform, by setting a display form, a curve formed by a change process of data read at a specified address can be displayed, and a curve of numerical values of, for example, 8 variables can be displayed at the same time, but the present invention is not limited thereto.
Specifically, for the case of displaying the numerical value in real time, the numerical value obtained in real time is displayed in the corresponding edit box through the software interface of the upper computer 610, or the numerical value can be written to the register or variable of the designated address by inputting the address and the numerical value in the designated edit box.
Specifically, for the condition that the report needs to be acquired, the option that needs the report and the variable that the report needs to be acquired can be selected, and the report can be directly exported when the report stops.
Specifically, the display form and the number of the display variables may be defined by a configuration file defined by the upper computer 610, and the defined configuration file is issued to the tool MCU 620, and the tool MCU 620 and the upper computer 610 are cooperatively implemented. The number of the collected variables, the format of the data packet, the address definition and the like are predefined in the form of the configuration file, so that the observation and modification of the variables or the registers on the internal address of the target MCU can be realized very flexibly.
In one embodiment, the structure and principles of the data access system as described in FIG. 6 may be referenced to the flows described above in connection with any of the methods of FIGS. 1, 2A-2D, and 3.
In summary, according to the embodiments of the present invention, the data access system, the data access method, the upper computer and the MCU of the present invention perform online observation and rewriting of internal data, including the internal registers of the MCU and the variables corresponding to the addresses, of the various MCUs with the SWD interface, and the above operation processes are implemented through the SWD interface. Therefore, the method can be applied to the situation that a simulation tool cannot be used, but the register value or the value of the designated address variable must be read in real time, so that the operation of the device is not influenced, and the key data of the target MCU can be acquired or modified. In addition, the invention can also be applied to the condition of high-speed operation, thereby meeting the harsh requirement of the target MCU on time operation and not influencing the internal operation logic. For complex application in a debugging stage, the method can read the core register value or the variable value of a target MCU in the application to perform auxiliary debugging. The invention can also inquire the register value or variable value in the target MCU when the field debugging equipment is applied, thereby being convenient for analyzing and solving the problem. In the event of unpredictable errors, the problem can be resolved analytically using the present invention. The invention can also flexibly read and rewrite the data in the target MCU on line, so as to facilitate the field technicians to debug the target MCU.
In addition, the invention utilizes visual display, for the application needing to visually display the waveform, by setting the display form, the curve formed by the change process of the data read by the specified address can be displayed, and at most, a numerical curve of 8 variables can be displayed, for example, but the invention is not limited to the method.
For the real-time display of the numerical value, the real-time acquired numerical value is displayed in the corresponding edit box through an upper computer software interface, and the numerical value can be written into a register or a variable of a designated address by inputting the address and the numerical value in the designated edit box.
For the condition that the report needs to be obtained, the option of the report and the variable to be obtained by the report can be selected, and the report can be directly exported when the report stops.
The display form and the number of the display variables can be defined by a configuration file defined by the upper computer, the well-defined configuration file is issued to the tool MCU, and the tool MCU and the upper computer are matched together to realize the above effects. The number of the collected variables, the format of the data packet, the address definition and the like are predefined in the form of the configuration file, so that the observation and modification of the variables or the registers on the internal address of the target MCU can be realized very flexibly.
The above description is only an example of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A data access method is applied to an upper computer and is characterized by comprising the following steps:
setting parameters to generate a configuration file and sending the configuration file to the tool MCU; and/or
Sending an instruction to control a tool MCU to access a target MCU; and/or
And analyzing the data received from the tool MCU according to the defined format of the configuration file, and displaying the data in a visual mode.
2. The method of claim 1, further comprising:
the method comprises the steps that a parameter configuration instruction is sent to control a tool MCU to carry out parameter configuration according to a configuration file sent by an upper computer, wherein the configuration file comprises a register or a variable of a designated address of a target MCU, a sampling period and a group packaging mode; and/or
Sending a working instruction to control a tool MCU to execute read or write operation; and/or
When receiving data read out from the written address by the tool MCU, judging whether the data is written successfully or not; and/or
The parsed data is presented in a visual manner that includes a report form, a curve form, a real-time window, and/or an edit box.
3. The method of claim 1 or 2, further comprising:
analyzing the received data into high and low level waveforms for display; and/or
For the condition of displaying the numerical value in real time, displaying the numerical value acquired in real time in a corresponding edit box; and/or
Writing the numerical value to a register or a variable of a specified address by inputting the address and the numerical value in a specified edit box; and/or
Selecting options of the report and variables to be acquired of the report according to the condition of acquiring the report, and exporting the report when the report stops; and/or
And defining the display form and the number of the display variables through the configuration file, and issuing the well-defined configuration file to the tool MCU.
4. A data access method is applied to a tool MCU, and is characterized by comprising the following steps:
waiting for an instruction of an upper computer; and/or
When the received instruction is not a working instruction, judging whether parameters need to be configured; and/or
Entering a parameter configuration process when parameters are to be configured so as to configure the parameters according to the configuration file received from the upper computer; and/or
And when the received command is a work entering command, entering a work execution phase.
5. The method according to claim 4, wherein the configuration parameters include the register address or variable address of the target MCU to be read, the number of parameters, the display format, the packing mode, and the reporting condition.
6. The method of claim 4 or 5, further comprising:
when receiving a work entering instruction, judging whether the parameters are configured or not; and/or
When the parameters are configured, entering a work execution stage, and judging whether the received command is a data reading command or a data writing command; and/or
For a read data instruction, executing the read data instruction; and/or
For a write data instruction, the write data instruction is executed.
7. The method of claim 6, further comprising:
reading data of a specified address from a target MCU; and/or
Packing the data according to a data format preset by a configuration file; and/or
And uploading the packed data to an upper computer in a universal serial bus mode.
8. The method of claim 7, further comprising:
reading data from the target MCU whenever the timer is interrupted according to a time interval set by the timer to acquire real-time data; and/or
And when the reporting condition is met and the last sending is finished, sending the packed data to an upper computer.
9. The method of claim 6, further comprising:
after a data writing instruction of an upper computer is received, receiving data of a specified address; and/or
Judging whether the designated address is consistent with an address defined by a configuration file; and/or
When the designated address is consistent with the address defined by the configuration file, writing the data to be written to the designated address of the target MCU, and reading the data from the written designated address of the target MCU; and/or
And reporting the data of the written address read from the target MCU to the upper computer.
10. The method according to any of claims 6 to 9, wherein the tool MCU reads data from or writes data to the target MCU via a serial debug interface and reads data of the written address, and/or reports the read data to the upper computer via a universal serial bus interface.
11. A data access system is characterized by comprising a receiving module, a reading module and a sending module;
the receiving module is used for receiving an instruction and/or a configuration file sent by the upper computer, wherein the instruction comprises a parameter configuration instruction and/or an instruction for reading or writing a target MCU; and/or
The reading module is used for reading data corresponding to the specified address and/or the written data of the specified address from the target MCU and/or putting the data into a data packet of the tool MCU; and/or
The sending module is used for sending the data packet to an upper computer so that the upper computer can analyze and/or display the data of the data packet according to a configuration file.
12. An upper computer is characterized by comprising a processor and a memory;
the memory is used for storing a computer program; and/or
The processor is connected with the memory and used for executing the computer program stored in the memory so as to enable the upper computer to execute the data access method of any one of claims 1 to 3.
13. A tool MCU is characterized by comprising a processor and a memory;
the memory is used for storing a computer program; and/or
The processor is connected with the memory and is used for executing the computer program stored in the memory so as to enable the upper computer to execute the data access method of any one of claims 4 to 10.
14. A data access system comprising a host computer according to claim 12, and/or a tool MCU according to claim 13;
the upper computer is used for setting parameters to generate a configuration file and sending the configuration file to the tool MCU; sending an instruction to control a tool MCU to access a target MCU; analyzing data received from the tool MCU according to the defined format of the configuration file, and displaying the data in a visual mode;
the tool MCU is used for waiting for instructions of the upper computer; when the received upper computer instruction is not a working instruction, judging whether parameters need to be configured; entering a parameter configuration process when parameters are to be configured so as to configure the parameters according to the configuration file received from the upper computer; and when the received upper computer instruction enters a working instruction, entering a working execution stage.
CN202011462151.0A 2020-12-08 2020-12-08 Data access system, method, upper computer and tool MCU Pending CN114625677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011462151.0A CN114625677A (en) 2020-12-08 2020-12-08 Data access system, method, upper computer and tool MCU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011462151.0A CN114625677A (en) 2020-12-08 2020-12-08 Data access system, method, upper computer and tool MCU

Publications (1)

Publication Number Publication Date
CN114625677A true CN114625677A (en) 2022-06-14

Family

ID=81895404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011462151.0A Pending CN114625677A (en) 2020-12-08 2020-12-08 Data access system, method, upper computer and tool MCU

Country Status (1)

Country Link
CN (1) CN114625677A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661859A (en) * 2023-07-27 2023-08-29 灵动集成电路南京有限公司 Driving method and device of MCU peripheral circuit module and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170133104A1 (en) * 2015-11-11 2017-05-11 Imagination Technologies Limited Hardware Monitor to Verify Memory Units
WO2018142103A1 (en) * 2017-01-31 2018-08-09 Nordic Semiconductor Asa Microcontroller peripheral configuration
CN109446134A (en) * 2018-09-18 2019-03-08 天津大学 A kind of USB high-speed interface based on FPGA
CN110147338A (en) * 2019-05-06 2019-08-20 电子科技大学 The method with host computer communication speed is improved based on muti-piece USB interface chip
CN111413899A (en) * 2020-03-25 2020-07-14 华大半导体有限公司 SWD-based data acquisition method and system and MCU
CN112035302A (en) * 2020-08-26 2020-12-04 天津飞腾信息技术有限公司 Real-time monitoring and analyzing method, device and system for bus data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170133104A1 (en) * 2015-11-11 2017-05-11 Imagination Technologies Limited Hardware Monitor to Verify Memory Units
WO2018142103A1 (en) * 2017-01-31 2018-08-09 Nordic Semiconductor Asa Microcontroller peripheral configuration
CN109446134A (en) * 2018-09-18 2019-03-08 天津大学 A kind of USB high-speed interface based on FPGA
CN110147338A (en) * 2019-05-06 2019-08-20 电子科技大学 The method with host computer communication speed is improved based on muti-piece USB interface chip
CN111413899A (en) * 2020-03-25 2020-07-14 华大半导体有限公司 SWD-based data acquisition method and system and MCU
CN112035302A (en) * 2020-08-26 2020-12-04 天津飞腾信息技术有限公司 Real-time monitoring and analyzing method, device and system for bus data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661859A (en) * 2023-07-27 2023-08-29 灵动集成电路南京有限公司 Driving method and device of MCU peripheral circuit module and terminal equipment
CN116661859B (en) * 2023-07-27 2023-10-10 灵动集成电路南京有限公司 Driving method and device of MCU peripheral circuit module and terminal equipment

Similar Documents

Publication Publication Date Title
EP0129017B1 (en) Method and apparatus for modeling systems of complex circuits
JP4112886B2 (en) Device bus protocol compliant test method and system
US5630102A (en) In-circuit-emulation event management system
US7596719B2 (en) Microcontroller information extraction system and method
CN107907814B (en) Method for improving mass production test efficiency of chips
CN104471545A (en) Device having configurable breakpoint based on interrupt status
CN107656882A (en) A kind of USB controller verification method, system and equipment
CN113270137A (en) DDR2 test method based on FPGA embedded soft core
CN114625677A (en) Data access system, method, upper computer and tool MCU
CN114281624A (en) Method, system, device and equipment for testing I2C signal integrity
CN113364747B (en) Debugging method, device and system and data set generation method and device
CN111413899A (en) SWD-based data acquisition method and system and MCU
CN114003375A (en) Chip sampling control method, device, system, equipment and storage medium
JP2003015906A (en) Remote debugging method and device
JP3358759B2 (en) Data trace method for programmable controller
CN109582571B (en) Online debugging method and device, debugging slave computer, debugging host computer and system
US20070265822A1 (en) Data processing system and method
CN207302034U (en) Processor chips emulator
CN114741243A (en) Pin configuration method, control device and storage medium
KR20090036287A (en) System for real time control of total control system and method thereof
KR20050063023A (en) Embedded system debugger based on jtag interface and the method
JP2006323726A (en) Monitor program and real-time trace system
US20210173989A1 (en) Simulation signal viewing method and system for digital product
Rădoi et al. HDL simulation model for testing and verification of “system in package” sensor architectures
US20230376403A1 (en) Debug device, debug system, and debug method for testing storage device

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
TA01 Transfer of patent application right

Effective date of registration: 20220624

Address after: 201210 floor 10, block a, building 1, No. 1867, Zhongke Road, pilot Free Trade Zone, Pudong New Area, Shanghai

Applicant after: Xiaohua Semiconductor Co.,Ltd.

Address before: 201203 room 303-304, block a, No. 112, liangxiu Road, pilot Free Trade Zone, Pudong New Area, Shanghai

Applicant before: HUADA SEMICONDUCTOR Co.,Ltd.

TA01 Transfer of patent application right