This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] EK-TM4C1294XL:SysTick 和串行通信

Guru**** 2616255 points

Other Parts Discussed in Thread: ENERGIA

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/781031/ek-tm4c1294xl-systick-and-serial-communication

器件型号:EK-TM4C1294XL
主题中讨论的其他器件:Energia

您好!

我需要使用 SysTick 和串行通信、但串行通信无法正常工作。 我使用 的是 TM4C1294XL 电路板。

 我已经针对  Serial.setTimeout(10测试了 dferents 值(2、10、50、100)、但没有结果

有什么想法吗?

 

谢谢

#include 
#include "Energia.h"
#include "driverlib/Sysstick.h"
#include "driverlib/Syssticker.c"
#include "driverlib/sysctl.h"
#include
"wiring_private.h"

#define pin 2//PE4
#define SamplingFreq 60000 / include "driverlib/adc.h"#include "ticker"(
#include "wiring_private.h"#define pinsert.h")#define pin pin pin diverse/dicht dicht = 120000 / tickerq #define s#define dicht in dicht

);#define data (#define dicht


)
//在配置
Serial.begin(115200);
delay (500)期间禁用 SysTick; //等待串行监视器
Serial.setTimeout(2);//Sets 等待串行数据初始化的最长毫秒数:
//为 inputString 保留200字节:
inData.reserve(200);

SysTickPeriodSet(TickerPeriodod); //定义计数器周期。 当该位为0时,调用中断
SysTickIntRegister (&Ticker);//向 ISR SysTickIntEnable()调用 Asociate 中断
;//启用 SysTick 中断
EbTickEnable();//可配置 SysTick
IntMasterEnable();//Habitivadas newtodas las interruciones
}

void loop()每当






新的 RX*数据到达时,打印字符串: 此例程在每个
loop()运行之间运行,因此使用 loop 内的延迟可以延迟
响应。 可能有多个字节的数据可用。
//
void serialEvent(){
while (Serial.available ()){
//获取新字节:
inData = Serial.readString();
serial.println (inData);

}


void Ticker()
{
//频率测试
onoff =!onoff;
digitalWrite (pin、onoff);
} 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    这些串行功能来自 Energia。 请参阅“[常见问题解答]***在发布前阅读!”中的第5点 在该论坛的顶部发帖。

    5) 5)将 Energia 问题直接发送到主要 Energia 论坛、网址为 :forum.43oh.com/.../