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);
}
}
How to use RTXscope on StartKit?
-
- Active Member
- Posts: 40
- Joined: Wed Dec 18, 2013 11:51 am
-
- XCore Expert
- Posts: 589
- Joined: Wed Feb 29, 2012 10:03 am
The adcIn is an ADC trigger port. You can get the example usage of ADCs on startKIT from the following question in the Q&A section:
http://www.xcore.com/questions/2196/how ... s-startkit
http://www.xcore.com/questions/2196/how ... s-startkit