Page 1 of 1

About XSCOPE

Posted: Tue Apr 03, 2018 9:29 am
by cjf1699
Hi everyone,
These days I have been learning xscope. I learned from AN00196 and the Xtimecomposer studio user guider that it seems that there are 2 methods to initialize xscope method,
one is to declare in the config.xscope file, for example:
<?xml version="1.0" encoding="UTF-8"?>

<!-- ======================================================= -->
<!-- The 'ioMode' attribute on the xSCOPEconfig -->
<!-- element can take the following values: -->
<!-- "none", "basic", "timed" -->
<!-- -->
<!-- The 'type' attribute on Probe -->
<!-- elements can take the following values: -->
<!-- "STARTSTOP", "CONTINUOUS", "DISCRETE", "STATEMACHINE" -->
<!-- -->
<!-- The 'datatype' attribute on Probe -->
<!-- elements can take the following values: -->
<!-- "NONE", "UINT", "INT", "FLOAT" -->
<!-- ======================================================= -->

<xSCOPEconfig ioMode="none" enabled="true">
<Probe name="Value" type="CONTINUOUS" datatype="UINT" units="Value" enabled="true"/>
</xSCOPEconfig>
The other way is to define a init function in the file where you use xscope, like this:
void xscope_user_init ( void ) {
xscope_register (2,
XSCOPE_CONTINUOUS , " Microphone Left ", XSCOPE_UINT , "mV",
XSCOPE_CONTINUOUS , " Microphone Right ", XSCOPE_UINT , "mV"
);
}
Am I right? And is there any difference between these 2 methods?
Thanks a lot!

Re: About XSCOPE

Posted: Wed Apr 04, 2018 8:41 am
by infiniteimprobability
No real difference although I suppose one is less intrusive in your source file. Also, using the .xscope method you don't need -fxscope in the Makefile, although it won't hurt if you do have it.

Re: About XSCOPE

Posted: Fri Apr 06, 2018 7:50 am
by cjf1699
Thank you for your answer. I met a strange problem which had confused me for a long time. I 'm working on the example AN00162 and I want to trace my data in real-time mode. I used xSCOPE in the first way. I wrote a config.xscope file which define the probes. And I made a proper run configuration for it.
Target I/O: xSCOPE and I selected the real-time mode.
And Finally I called the xscope_int() function in the i2s_loopback function and ran the project. It is supposed to display the wave of the audio data ,and at the same time the music being input should be looped back to the output channel. But weird things happened. Although the board was connected. There was nothing displayed on the scope but two straight lines whose values are both 0. And meanwhile, the speaker played a ring bell sound for about 1.5 seconds and then kept playing buzz.
How did it come? And what should I do? I uploaded my project and am looking forward to help.
Thanks a lot!
cjf

Re: About XSCOPE

Posted: Fri Apr 06, 2018 12:41 pm
by larry
It might help to try realtime xSCOPE in a simple example first, such as AN00196

Re: About XSCOPE

Posted: Sat Apr 07, 2018 10:17 am
by cjf1699
larry wrote:It might help to try realtime xSCOPE in a simple example first, such as AN00196
I tried, but it can only run on the simulator.