工具/软件:TI C/C++编译器
我不熟悉编程、我尝试在 TMS320F28335实验套件中测试代码、
代码包含3个 ISR - timer0 (5s)、Timer1 (25ms)和 SCI
在 timer0 -->切换 GPIO31、Timer1 --> CpuTimer1.InterruptCount++,在 SCI ISR --> if (message[n][index]!='\0') SciaRegs.SCITXBUF= message[n][index++];
程序从 RAM 中完美运行、但当我切换到闪存时会遇到一些问题
while (1)
{
SciaRegs.SCITXBUF=消息[n][index++];
while (CpuTimer1.InterruptCount < 40)
{
}
索引= 0;
CpuTimer1.InterruptCount = 0;
N++;
if (n =SCImax) n =0;
}
当从闪存运行时 、CpuTimer1.InterruptCount 持续递增、40之后不会复位、我尝试使用另一个变量、而不是 CpuTimer1.InterruptCount (该变量增加了定时器 ISR、并在 while condition 中使用)-->正在工作。
使用 CpuTimer1.InterruptCount 时的问题是什么
谢谢、此致
Shinto