So I was experimenting with getting xscope stuff to work, I did mange to easily get printf piped over to console, then I moved on to trying to sample the ADC and use RT Xscope, however it's just not working. If I go into the run configuration and disable the XScope I can get my code to run, if I tell it to either log it to offline or RT it just hangs and never runs the code (looks like it uploads but stops near instantly). Any ideas on what I am missing here?
// A lot of includes cause I have been using this same project to do all sorts of experiments
#include <xs1.h>
#include <platform.h>
#include "startkit_gpio.h"
#include <timer.h>
#include <stdio.h>
#include <xscope.h>
#include "main.h"
port adcIn = XS1_PORT_1A;
void xscope_user_init(void) {
xscope_register(1,XSCOPE_CONTINUOUS, "ADC0", XSCOPE_UINT, "mV");
//xscope_config_io(XSCOPE_IO_BASIC);
}
int main(void) {
while(1) {
int reading;
adcIn :> reading;
xscope_int(0,reading);
}
}
Read
How to use RTXscope on StartKit?
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
-
- XCore Expert
- Posts: 754
- Joined: Thu Dec 10, 2009 6:56 pm
You defined some xscope init function but you don't call it in main.
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
Interesting, I was thinking xscope_user_init was already being called somehow, I have yet to see any example code showing it called in main?Bianco wrote:You defined some xscope init function but you don't call it in main.
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
I tried calling the user_init function from main but get xSCOPE warning ... System is already registered, new registration call ignored
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
Ok I have managed to get data via the offline scope using a completely different method (using xscope_core_int), though it will not work with live.
Also I don't seem to be getting value from the ADC, all values read 0.
Also I don't seem to be getting value from the ADC, all values read 0.
-
- XCore Addict
- Posts: 147
- Joined: Tue Feb 23, 2010 6:55 pm
Have you had a look at the xSCOPE real time example in the "How To" browser of xTIMEcomposer?MatCat wrote:Ok I have managed to get data via the offline scope using a completely different method (using xscope_core_int), though it will not work with live.
Also I don't seem to be getting value from the ADC, all values read 0.
You will need to change the target in the makefile from SLICEKIT-L16 to STARTKIT but this will allow you to check that the real time mode is working correctly.
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
I just tried, I went into the HowTo for real time, pulled it down into the workspace, changed the MAkefile to taget STARTKIT, changed it run config to use XSCOPE output and use RT Xscope mode, when I hit run it switched to a disconnected RTScope and no indication that the program is running.XMatt wrote:Have you had a look at the xSCOPE real time example in the "How To" browser of xTIMEcomposer?MatCat wrote:Ok I have managed to get data via the offline scope using a completely different method (using xscope_core_int), though it will not work with live.
Also I don't seem to be getting value from the ADC, all values read 0.
You will need to change the target in the makefile from SLICEKIT-L16 to STARTKIT but this will allow you to check that the real time mode is working correctly.
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
Yeah the realtime example works in offline mode, but as soon as I switch to RealTime it seems to almost hang, it switched to Real Time Scope view, says disconnected, and when I hit the red stop button on console to stop the program on chip no response, however if I do the same thing in offline mode it all works perfectly.
I have checked and the ports do match from the run config to the rt scope, both use default 10101
I have checked and the ports do match from the run config to the rt scope, both use default 10101
-
- New User
- Posts: 2
- Joined: Fri May 30, 2014 10:55 am
There is nothing listening on port 10101. Timecomposer never launches any service listening there.
I like how this post waited 5 months with no answer from XCORE. Gives great confidence in the company.
I like how this post waited 5 months with no answer from XCORE. Gives great confidence in the company.
-
- New User
- Posts: 3
- Joined: Fri Jan 30, 2015 5:06 pm
Has anyone managed to get this working?
I'm very new to XMOS.
Is there a working example project anywhere for XScope with Startkit?
Phil.
I'm very new to XMOS.
Is there a working example project anywhere for XScope with Startkit?
Phil.