当前位置:网站首页>How to check the variable waveform when debugging the program? Look here

How to check the variable waveform when debugging the program? Look here

2022-06-11 00:05:00 Tianwaifeixian CUG

0b0b4faaf11b4d8e398e9c5b0e37f81a.png

When we debug the single chip program , You often need to view the value of a variable or array , In general , Can pass “Add xxx to Watch” Check it out. , Or view the memory directly . But sometimes , such as ADC When sampling , It is not intuitive to simply look at the value of variables , It is very convenient to view the waveform changes of the whole array .

There are many ways to view waveforms , It is transmitted to the upper computer through the serial port to view 《 Serial port waveform display software SerialChart Use 》, Or through the debugging tool 《Jlink One of the skills RTT and J-Scope》.

Today, let's introduce another way to view waveforms , A debugging assistant software :Keil Array Visualization. Just look at the name , The software is compatible with Keil The use of .

The software is very convenient to use , First of all, configure Keil. stay Edit->Configuration Under menu , Enable the options in the following figure .

36d1f9117d3966b6e573c83080b2b75c.png

Then connect the emulator , Burn the program , Enter debugging state .

Open software , Enter the port number , Click to connect , The following will prompt whether the connection is successful .

06f5bfa138d130ef5a3c083f24130dd7.png

After successful connection , Enter the name or address of the variable you want to view (16 Base address ); Enter the size of the variable to be viewed ( The size is in bytes ); Select data type ; Select byte order (STM32 In small end format ). Then click read to view the waveform . You can also enter the interval for automatic reading , Click read , Start automatic reading .

With ADC Sampling as an example , The sampled data is stored in ADC_Buf Array , The array length is 128, The data type is short,0.5 Read once per second , The waveform diagram is as follows: :

e2dbe44bf4aed2329686ccdff4c75194.gif

The software also supports waveform scaling 、 Data export and other functions .

Download link :

link :https://pan.baidu.com/s/139dSa9ynRx4kiBzTKKwhSw

Extraction code :m4ph

In fact, the software is also based on Keil Provided interface development , Friends who are interested in exploring by themselves can see here :

https://developer.arm.com/documentation/kan198/latest/

Welcome to my Technology Group

887ec549fa2604fd3b4a0174c746cbc4.png

Recommended reading :

Avoid the pit and see !STM32G0 Series multichannel ADC The problem of

STM32 Timer application collection

ADS1220 Several applications of ( Including source code )

    Welcome to the official account " Development of Embedded Technology ", You can leave a message for me backstage . If you think the official account is helpful to you , Also welcome to recommend and share with others .

原网站

版权声明
本文为[Tianwaifeixian CUG]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020927112515.html