[转帖]如何在StartKit使用RTXscope?
所以我尝试用xscope的东西的工作,我也想要轻松管理printf传送到控制台,然后我继续设法采样ADC和使用RT xScope,然而,它只是不工作。如果我进入了运行配置和禁用XScope我可以让我的代码运行,如果我告诉它要么是离线或RT它只是挂起,永不运行的代码(看起来像它上传,但是近乎立刻停止)。对于我缺少了什么有什么想法?
// 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);
}
}
回答:
adcln是一个ADC触发端口。您可以在Q&A部分中的以下问题得到在startkit中使用ADC的例子:
讨论:
回复:
上面的ADC例子不适合我,当我调试它它好像被挂起等到它将要转向第五个led,永远不会到达ADC初始化,从不进入主采样循环。
发表时间:2014年8月14日14:39:05