Microcontroller, testing method of microcontroller, and system including microcontroller
The observation points and test conditions are set through an external debugging tool, and the control circuit or debugging tool of the microcontroller is used to determine whether the memory data meets the conditions, and outputs a trigger signal when the conditions are met. This solves the problem of repeatedly changing the test program in the prior art, and realizes a simplified microcontroller debugging process.
Patent Information
- Application Number
- CN202111612064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-31
- Filing Date
- 2021-12-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-12-27
AI Technical Summary
The prior art requires repeated changes to the test program during the microcontroller debugging process, which increases the complexity and uncertainty of debugging.
Set observation points and test conditions through external debugging tools, use the microcontroller's control circuit or debugging tools to determine whether the memory data meets the conditions, and output a trigger signal when the conditions are met to trigger the external instrument, so as to realize the connection between the microcontroller, debugging tools and instruments, and avoid modifying the loaded test program.
Reduces the complexity of microcontroller debugging and can be done without repeatedly changing the test program.
Smart Images

Figure CN114690683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a microcontroller, and in particular to a testing method applied to the microcontroller. Background Art
[0002] A corresponding test program is loaded into the microcontroller to debug the microcontroller. Specifically, the test program is loaded into the microcontroller for execution. During this process, external instruments are often required to measure the signals generated by the microcontroller. The measurement results determine whether the test program's execution flow is consistent with expectations.
[0003] During debugging, memory blocks within the microcontroller can be monitored. When the value stored in the memory block meets the test conditions set by the test program (for example, the stored value exceeds a threshold), the microcontroller can correspondingly change its output signal (for example, from a low voltage level to a high voltage level), thereby triggering external equipment (such as a fan or oscilloscope) to perform its corresponding function. Designers can determine whether the test results are consistent with expectations based on the current measured signal waveform, signal voltage state, and actual measured value.
[0004] However, changing test conditions requires modifying the test program and reloading the microcontroller. Consequently, debugging may require multiple test program changes. This not only increases debugging complexity but also adds numerous variables. Therefore, a solution is needed to complete microcontroller debugging without requiring repeated test program changes. Summary of the Invention
[0005] The present invention is directed to a microcontroller and a testing method for the microcontroller, which can complete the debugging of the microcontroller without repeatedly changing the testing program.
[0006] According to an embodiment of the present invention, a microcontroller testing method includes: a user setting test conditions and a watchpoint via an external debugging tool, wherein the watchpoint points to a memory of the microcontroller; a control circuit in the microcontroller determines whether the data in the memory satisfies the test conditions; and when the data in the memory satisfies the test conditions, the control circuit controls the microcontroller to output a trigger signal, wherein the trigger signal is used to trigger an external instrument.
[0007] According to an embodiment of the present invention, a microcontroller testing method includes: a user setting test conditions and an observation point via an external debugging tool, wherein the observation point points to the memory of the microcontroller; polling the memory data via the debugging tool to determine whether the test conditions are met; and when the memory data meets the test conditions, the debugging tool outputs a trigger signal, wherein the trigger signal is used to trigger an external instrument.
[0008] According to an embodiment of the present invention, a microcontroller testing method includes: a user setting test conditions and an observation point via an external debugging tool, wherein the observation point points to a memory of the microcontroller; reading the memory via the debugging tool, and determining by the debugging tool whether the data in the memory meets the test conditions; and when the data in the memory meets the test conditions, the debugging tool outputs a trigger signal, wherein the trigger signal is used to trigger an external instrument.
[0009] According to an embodiment of the present invention, a microcontroller includes a memory and a control circuit. The control circuit is coupled to the memory, an external debugging tool, and an external instrument. The control circuit is configured to determine whether data in the memory meets a test condition. When the data in the memory meets the test condition, the control circuit outputs a trigger signal to trigger the instrument. The test condition and observation point are set by a user via the external debugging tool, and the observation point is set to the memory.
[0010] According to an embodiment of the present invention, a microcontroller includes a memory and a control circuit. The control circuit is coupled to the memory and an external debugging tool. The control circuit is configured to determine whether data in the memory meets test conditions. When the data in the memory meets the test conditions, the debugging tool outputs a trigger signal, which triggers an external instrument. The test conditions and observation point are set by a user via the debugging tool, and the observation point is set to the memory.
[0011] According to an embodiment of the present invention, a microcontroller includes a memory. The memory is used to store data for reading by an external debugging tool. The debugging tool is used to continuously read the memory data based on an observation point to determine whether the memory data meets test conditions. When the memory data meets the test conditions, the debugging tool outputs a trigger signal to trigger an external instrument. The test conditions and observation point are set by a user via the debugging tool, and the observation point points to the memory.
[0012] According to an embodiment of the present invention, a system including a microcontroller includes the aforementioned microcontroller, a debugging tool, and an instrument. The debugging tool is coupled to the microcontroller. The instrument is coupled to the microcontroller and the debugging tool.
[0013] Based on the above, the present invention allows the use of debugging tools to set observation points and test conditions, achieving a coordinated effect among the microcontroller, debugging tool, and instrument. Most importantly, when test conditions need to be changed, the user only needs to use the debugging tool to modify the test conditions, without having to modify the test program already loaded on the microcontroller. Therefore, debugging complexity is reduced. Furthermore, microcontroller debugging can be completed without repeatedly changing the test program. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1A A circuit block diagram of a microcontroller according to a first embodiment of the present invention is shown.
[0015] Figure 1B A flowchart showing the steps of a microcontroller testing method according to a first embodiment of the present invention.
[0016] Figure 1C A circuit diagram showing a control circuit of a microcontroller according to a first embodiment of the present invention.
[0017] Figure 1D FIG. 1 is a circuit diagram showing another implementation of the control circuit in the first embodiment.
[0018] Figure 2A A circuit block diagram of a microcontroller according to a second embodiment of the present invention is shown.
[0019] Figure 2B A flowchart showing the steps of a microcontroller testing method according to a second embodiment of the present invention.
[0020] Figure 3A A circuit block diagram of a microcontroller according to a third embodiment of the present invention is shown.
[0021] Figure 3B A flowchart showing the steps of a microcontroller testing method according to a third embodiment of the present invention. DETAILED DESCRIPTION
[0022] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0023] Figure 1A A circuit block diagram of a microcontroller according to a first embodiment of the present invention is shown. Figure 1A The diagram shows a microcontroller 110, a debugging tool 120, and an instrument 130. Microcontroller 110 and debugging tool 120 are coupled to each other, and microcontroller 110 and instrument 130 are coupled to each other. There is at least one instrument 130. Instrument 130 can be a fan and / or an oscilloscope. Microcontroller 110 includes memory 111, a CPU 112, a debugging interface 113, watchpoint content 114, and control circuitry 115. A debugging tool (also known as a debugger, debugger, or debugger) refers to a computer program and tool used for debugging. A debugging tool can display the source code where the error is located and make it visible in an integrated development environment for troubleshooting and debugging.
[0024] A user can set a watchpoint and corresponding test conditions through the debugging tool 120, where the watchpoint can point to the memory 111 in the microcontroller 110. The watchpoint and the corresponding test condition can be presented as an expression in the user interface of the debugging tool 120. The watchpoint and the corresponding test condition are stored in the watchpoint content 114 through the debugging interface 113. In other words, the watchpoint content 114 may include information pointing to the address of the memory 111 and the corresponding test condition. In detail, the purpose of setting a watchpoint is to monitor the situation in which a specific address (which may be an address used to store a specific variable) is written to or read from by the CPU 112. In this embodiment, the watchpoint content 114 is set independently of the CPU 112, but the present invention is not limited to this. In other embodiments, the watchpoint content 114 may be part of the CPU 112.
[0025] A watchpoint and corresponding test condition are established in the watchpoint content 114 of the microcontroller 110 via the debugging tool 120 and the debugging interface 113. The watchpoint points to the memory 111. The CPU 112 can continuously update the data in the memory 111 based on, for example, a temperature value sensed by a temperature sensor. The CPU 112 is coupled to the watchpoint content 114 and the memory 111. In a first embodiment, the CPU 112 can monitor and determine whether the data stored in the memory 111 meets the test condition (e.g., the temperature value stored in the memory 111 is greater than or equal to a threshold of 50°C) based on the watchpoint content 114, and indicate this by setting a flag. For example, when the data stored in the memory 111 changes from not meeting the test condition to meeting the test condition (e.g., the data stored in the memory 111 is updated from 49°C to 50°C), the flag set by the CPU 112 changes from 0 to 1. In contrast, when the data stored in the memory 111 changes from satisfying the test condition to not satisfying the test condition (for example, the data stored in the memory 111 is updated from 50° C. to 49° C.), the flag given by the CPU 112 changes from 1 to 0.
[0026] It should be noted that, generally, when a CPU program reaches a watchpoint, a flag indicating that a condition has been met (indicating that the watchpoint has been reached) is generated and provided to the CPU. The CPU will then halt execution based on the flag indicating that the condition has been met. However, in the present invention, this flag indicating that the condition has been met can be configured not to be provided to the CPU. That is, when a watchpoint is reached, only the flag indicating that the condition has been met can be provided to other control circuits. Therefore, unlike the typical situation where CPU 112 halts program execution when it reaches a watchpoint, in the present invention, CPU 112 does not halt the currently executing program. When the data stored in memory 111 meets the test condition, CPU 112 sets the flag and continues program execution. The control circuit 115 can detect that the data stored in memory 111 meets the test condition based on the flag's target state (e.g., 1). At this point, the control circuit 115 can generate a trigger signal T (e.g., via an additional instruction pointer (IP)) and output the trigger signal T via the microcontroller 110's own input / output pins. The instrument 130 is coupled to the microcontroller 110 to receive a trigger signal T. For example, the trigger signal T can be used to trigger a fan to start cooling. Alternatively, the trigger signal T can be used to trigger an oscilloscope to start measurement.
[0027] After the instrument 130 is triggered and activated by the trigger signal T, the instrument 130 (e.g., an oscilloscope) can transmit information from the microcontroller 110 back to the instrument 130 via a probe (not shown) for measurement. This allows confirmation of the normal operating status of the other pins of the microcontroller 110. In the first embodiment, the control circuit 115 can output the trigger signal T via a general-purpose input / output (GPIO) pin.
[0028] In the first embodiment, a control circuit 115 can be configured on the microcontroller 110 to trigger a GPIO pin when a test condition is met, thereby activating the instrument 130 to execute the corresponding function. However, the present invention is not limited to this. In other embodiments, multiple test conditions can be set via the debugging tool 120, and different pins of the microcontroller 110 can be triggered when different test conditions are met. Furthermore, the control circuit 115 can be configured to trigger the instrument 130 only after the test condition is met a certain number of times.
[0029] In the first embodiment, the user can set observation points and test conditions through the debugging tool 120, thereby achieving a coordinated effect among the microcontroller 110, the debugging tool 120, and the instrument 130. More importantly, when the test conditions need to be changed (for example, to change the threshold from 50°C to 60°C), the user only needs to modify the test conditions through the debugging tool 120, without having to modify the test program already loaded into the microcontroller.
[0030] Figure 1B A flowchart showing the steps of the microcontroller testing method according to the first embodiment of the present invention is shown. Figure 1A and Figure 1B First, the debug tool 120 initializes the watchpoint content 114 and the related settings of the control circuit 115. During this stage, the control circuit 115 is configured to select the output form of the trigger signal T to trigger the microcontroller 110 pin to output a high voltage level, a low voltage level, or a signal pulse (step S110). The debug tool 120 initializes the watchpoint content 114 to complete the watchpoint and test condition settings and clears the flag (e.g., resets it to 0) (step S120). After the watchpoint content 114 is initialized, the CPU 112 continuously monitors the memory 111. When the data stored in the memory 111 meets the test condition, the CPU 112 changes the flag target state, for example, from 0 to 1 (step S130). If the test condition is met, the process proceeds to step S140; otherwise, the process returns to step S130. In step S140, the watchpoint content 114 can inform the control circuit 115 of the judgment result (by confirming the flag target state). In step S150 , the control circuit 115 generates a trigger signal T of a predetermined type to trigger the instrument 130 . After being triggered, the instrument 130 (eg, an oscilloscope) begins to measure the current signal waveform of the microcontroller 110 .
[0031] In the first embodiment, the control circuit 115 can be configured during the initialization process (i.e., step S110) to inquire through the debugging tool 120 whether to perform another test condition initialization process (step S160) after executing step S150. If so, the process proceeds to step S120 again. If not, the process proceeds to step S170, where the control circuit 115 clears the flag. In other embodiments, the control circuit 115 can also be configured during the initialization process (i.e., step S110) to cease operation upon completion of a single trigger. In other words, after executing step S150, the process proceeds directly to step S170, where the control circuit 115 clears the flag.
[0032] Figure 1C A circuit diagram showing a control circuit of a microcontroller according to a first embodiment of the present invention is shown. Figure 1A and Figure 1C, the control circuit 115 includes a multiplexer M, a gate controller G, and an output pin selector SEL. During the initialization phase of the control circuit 115, the output type of the trigger signal T can be selected by the debugging tool 120 (via the selection signal Ty). The selection signal Ty can be expressed as a binary value. The multiplexer M can select the output signal of the corresponding form to be generated by the multiplexer M based on the selection signal Ty. There are multiple selectable forms, each corresponding to a different value. Figure 1C The selectable configurations include a transition from a high voltage level to a low voltage level, a transition from a low voltage level to a high voltage level, a signal pulse, or other types of configurations. For example, if the selection signal Ty is 1 (001 in binary), the default output signal of the multiplexer M is a transition from a low voltage level to a high voltage level.
[0033] The multiplexer M receives the flag F and generates a default output signal (e.g., a state from a low voltage level to a high voltage level) based on the flag F. The gate controller G receives the output of the multiplexer M and the enable signal S_EN. The key to controlling the timing of the gate controller G generating the aforementioned default output signal (i.e., the trigger signal T) lies in the enable signal S_EN. The voltage level of the enable signal S_EN changes according to the state of the flag F. Specifically, when the flag F changes from 0 to 1, the CPU 112 generates the enable signal S_EN at a high voltage level. When the flag F changes from 1 to 0, the CPU 112 generates the enable signal S_EN at a low voltage level. When the enable signal S_EN is at a high voltage level, the output signal of the multiplexer M can pass through the gate controller G and be output truthfully. The output pin selector SEL is coupled to multiple output pins of the microcontroller 110, namely, pins PA0 to PAn. The output pin selector SEL is configured to select a pin through which the output signal of the gate controller G is to be output. In this way, a trigger signal T of a predetermined type can be generated by the control circuit 115 .
[0034] Figure 1D FIG1 is a circuit diagram showing another embodiment of the control circuit in the first embodiment. Figure 1D , Figure 1D and Figure 1C The only difference is Figure 1DA setting circuit C is added. The setting circuit C can be set on the output path of the enable signal S_EN to the gate controller G. The setting circuit C can accumulate the number of times the flag F changes from 0 to 1 according to the user's settings, and output the enable signal S_EN with a high voltage level to the gate controller G only when the aforementioned number reaches a threshold. Before the aforementioned threshold is not reached, the setting circuit C will only output the enable signal S_EN with a low voltage level even if it receives the enable signal S_EN at a high voltage level. In simple terms, the setting circuit C can extend the output time point of the enable signal S_EN with a high voltage level according to a user-set condition. The setting circuit C can also be set to other setting conditions, which are not limited by the present invention. Adjusted enable signal
[0035] In terms of hardware, the control circuit 115 may be, for example, a microprocessor, a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or other similar devices or a combination of these devices.
[0036] Figure 2A A circuit block diagram of a microcontroller according to a second embodiment of the present invention is shown. Figure 2A The diagram shows a microcontroller 210, a debugging tool 220, and an instrument 230. The microcontroller 210 is coupled to the debugging tool 220, which is in turn coupled to the instrument 230 (e.g., an oscilloscope and / or a fan). The microcontroller 210 includes a memory 211, a CPU 212, a debugging interface 213, and watchpoint content 214. Similar to the first embodiment, a user can set a watchpoint and corresponding test conditions via the debugging tool 220, where the watchpoint can point to the memory 211 in the microcontroller 210. The watchpoint and corresponding test conditions are stored in the watchpoint content 214 via the debugging interface 213. In other words, the watchpoint content 214 may include information pointing to the address of the memory 211 and the corresponding test conditions. The data in the memory 211 (e.g., a sensed temperature value) is continuously updated by the CPU 212. The CPU 212 can monitor and determine whether the data stored in the memory 211 meets the test conditions based on the watchpoint content 214. When the data stored in the memory 211 meets the test condition, the CPU 212 sets a flag of the corresponding status and continues to execute the program.
[0037] Different from Figure 1A The microcontroller 110 is coupled to a debugging tool 120 and an instrument 130. Figure 2A In the second embodiment, the microcontroller 210 is indirectly coupled to the instrument 230 via the debugging tool 220. Furthermore, the microcontroller 210 does not include the control circuit 115 described in the first embodiment (no changes are required to the existing configuration of the microcontroller 210). In the second embodiment, the debugging tool 220 triggers the instrument 230. The debugging tool 220 directly polls the flag provided by the CPU 212 via the debugging interface 213 to determine when the test condition is met. Once the test condition is met, the debugging tool 220 generates a trigger signal T to trigger the instrument 230.
[0038] Figure 2B A flowchart showing the steps of the microcontroller testing method according to the second embodiment of the present invention is shown. Figure 2A and Figure 2B First, the debug tool 220 is initialized to select the form of the trigger signal T (step S210). Also, the debug tool 220 initializes the observation point and test condition and clears the observation point flag (step S220). Next, the debug tool 220 polls the flag to determine whether the test condition is met based on the flag target state (step S230). For example, when the flag is 1, it indicates that the test condition is met. If the test condition is judged to be met, step S240 is entered. If the test condition is judged not to be met, step S230 is continuously executed until the test condition is met. In step S240, the debug tool 220 generates a trigger signal T to trigger the instrument 230 (e.g., an oscilloscope) to start capturing information from the microcontroller 210. In step S250, the debug tool 220 inquires whether to select another condition to test (including the case of triggering the same condition multiple times). If so, the process returns to step S220. If not, the process proceeds to step S260 , where the debugging tool 220 clears the flag.
[0039] Although the triggering instrument bodies differ, both the first and second embodiments utilize a debugging tool to set observation points and test conditions, achieving a coordinated effect among the microcontroller, debugging tool, and instrument. Similarly, when test conditions need to be modified, the user only needs to use the debugging tool 220 to do so, without having to modify the test program already loaded into the microcontroller.
[0040] Figure 3A A circuit block diagram of a microcontroller according to a third embodiment of the present invention is shown. Figure 3AThe diagram shows a microcontroller 310, a debugging tool 320, and an instrument 330 (e.g., a fan and / or an oscilloscope). A user can set a watchpoint via the debugging tool 320, where the watchpoint can point to a memory 311 in the microcontroller 310. The watchpoint is stored in watchpoint content 314 via the debugging interface 313. That is, watchpoint content 314 may include information pointing to the address of the memory 311. The data in the memory 311 (e.g., the sensed temperature value) is continuously updated by the CPU 312.
[0041] Similar to the architecture of the second embodiment, the microcontroller 310 is indirectly coupled to the instrument 330 via the debugging tool 320. Furthermore, the operation of triggering the instrument 330 is performed by the debugging tool 320. Figure 3A The third embodiment shown here directly sets test conditions within the debugging tool 320. Furthermore, the debugging tool 320 directly and continuously reads data stored in the memory 311 and independently determines whether the data meets the test conditions. In other words, once the CPU 312 writes a value to the memory 311, the debugging tool 320 reads the value through the debugging interface 313 and determines whether the value meets the test conditions. If the test conditions are determined to be met, the debugging tool 320 immediately triggers the instrument 330.
[0042] Figure 3B A flowchart showing the steps of the microcontroller testing method according to the third embodiment of the present invention is shown. Figure 3A and Figure 3B First, the debugging tool 320 is initialized to select the form of the trigger signal T and set the test conditions (step S310). Next, the debugging tool 320 directly reads the memory 311 and determines whether the test conditions are met (step S320). If the test conditions are not met, step S320 is repeated. If the test conditions are met, the process proceeds to step S330. In step S330, the debugging tool 320 generates the trigger signal T to trigger the instrument 330. Finally, the debugging tool 320 records the time point when the test conditions are met and the relevant data information (step S340) and returns to step S320.
[0043] The first through third embodiments described above all utilize debugging tools to set observation points and test conditions, achieving a coordinated effect among the microcontroller, debugging tool, and instrument. Most importantly, when test conditions need to be changed, the user simply uses the debugging tool, without having to modify the test program already loaded into the microcontroller. This reduces debugging complexity and allows microcontroller debugging to be completed without repeatedly modifying the test program.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for testing a microcontroller, characterized in that: This test method is applicable to testing the microcontroller, and includes: A user sets test conditions and an observation point via an external debugging tool, wherein the observation point points to a memory of the microcontroller, and the debugging tool tests the microcontroller; Determining, by a control circuit in the microcontroller, whether the data in the memory satisfies the test condition; and When the program of the microcontroller executes to the observation point and the data in the memory meets the test condition, the control circuit controls the microcontroller to output a trigger signal, wherein the trigger signal is used to trigger an external instrument.
2. The microcontroller testing method according to claim 1, wherein: Also includes: When the data in the memory meets the test condition, a flag is given as a basis for the control circuit to determine whether the data in the memory meets the test condition.
3. The microcontroller testing method according to claim 2, wherein: Also includes: The user sends a selection signal via the debugging tool, and the controller selects one of a plurality of signal types as a default signal type according to the selection signal; as well as When the flag changes from the first state to the second state, the control circuit generates an output signal with the default signal type as the trigger signal.
4. A method for testing a microcontroller, characterized in that: This test method is applicable to testing the microcontroller, and includes: A user sets test conditions and an observation point via an external debugging tool, and the debugging tool tests the microcontroller, wherein the observation point points to a memory of the microcontroller; polling the data in the memory by the debugging tool to see whether it meets the test condition; and When the program of the microcontroller executes to the observation point and the data in the memory meets the test condition, the microcontroller outputs a trigger signal, wherein the trigger signal is used to trigger an external instrument.
5. A method for testing a microcontroller, characterized in that: This test method is applicable to testing the microcontroller, and includes: A user sets test conditions and an observation point via an external debugging tool, and the debugging tool tests the microcontroller, wherein the observation point points to a memory of the microcontroller; The memory is read by the debugging tool, and the debugging tool determines whether the data in the memory meets the test condition; and When the program of the microcontroller executes to the observation point and the data in the memory meets the test condition, the microcontroller outputs a trigger signal, wherein the trigger signal is used to trigger an external instrument.
6. A microcontroller, characterized in that: include: Memory; as well as A control circuit is coupled to the memory, an external debugging tool, and an external instrument, wherein the debugging tool is operated to set test conditions and observation points. During the period when the debugging tool tests the microcontroller, the control circuit is used to determine whether the data in the memory meets the test conditions. When the program of the microcontroller executes to the observation point and the data in the memory meets the test conditions, the control circuit outputs a trigger signal to trigger the instrument. The test condition and the observation point are set by the user via an external debugging tool, and the observation point points to the memory.
7. The microcontroller according to claim 6, characterized in that When the data in the memory meets the test condition, a flag is given to serve as a basis for the control circuit to judge whether the data in the memory meets the test condition.
8. A microcontroller comprising: Memory; as well as A control circuit is coupled to the memory and an external debugging tool, wherein the debugging tool is operated to set test conditions and observation points, wherein during the debugging tool testing the microcontroller, the control circuit is used to determine whether the data in the memory meets the test conditions, When the program of the microcontroller executes to the observation point and the data in the memory meets the test condition, the control circuit outputs a trigger signal, which is used to trigger an external instrument. The test condition and the observation point are set by the user via the debugging tool, and the observation point points to the memory.
9. A microcontroller, characterized in that: include: Memory, used to store data for external debugging tools to read, The debugging tool is operated to set test conditions and observation points, test the microcontroller, and continuously read the data in the memory according to the observation points to determine whether the data in the memory meets the test conditions. When the program of the microcontroller executes to the observation point and the data in the memory meets the test conditions, the microcontroller outputs a trigger signal to trigger an external instrument. The test condition and the observation point are set by the user via the debugging tool, and the observation point points to the memory.
10. A system comprising a microcontroller, characterized in that include: Microcontroller; and memory; a debugging tool coupled to the microcontroller, wherein the debugging tool tests the microcontroller, wherein the debugging tool is operated to set a test condition and a watchpoint, wherein when a program of the microcontroller executes to the watchpoint and data in the memory satisfies the test condition, the microcontroller outputs a trigger signal; as well as An instrument is coupled to the microcontroller and the debugging tool, wherein the microcontroller outputs a trigger signal to trigger the instrument.
Citation Information
Patent Citations
Multifunctional automated test method and system
CN109144861A