About XSCOPE

New to XMOS and XCore? Get started here.
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

About XSCOPE

Postby cjf1699 » Tue Apr 03, 2018 9:29 am

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!
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Wed Apr 04, 2018 8:41 am

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.
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

Postby cjf1699 » Fri Apr 06, 2018 7:50 am

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
You do not have the required permissions to view the files attached to this post.
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Postby larry » Fri Apr 06, 2018 12:41 pm

It might help to try realtime xSCOPE in a simple example first, such as AN00196
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

Postby cjf1699 » Sat Apr 07, 2018 10:17 am

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.

Who is online

Users browsing this forum: No registered users and 4 guests