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.

[参考译文] MSP430F67791A:在 IAR 中使用终端 I/O 窗口

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/943684/msp430f67791a-terminal-i-o-window-usage-in-iar

器件型号:MSP430F67791A
主题中讨论的其他器件:MSP430F6779

我使用 IAR 进行开发。 我已将堆栈使用情况更改为160。 但是、终端窗口保持空白。  

#include

#include

#include
#include

void initTimer_A (void);

unsigned int presentation=0;
unsigned int lasttime=0;
unsigned int buffer=0;
unsigned char i=0;

int main (空)

WDTCTL = WDTPW + WDTHOLD;//停止看门狗计时器
//BCSCTL1 = CALBC1_1MHz;//将 DCO 设置为1MHz
//DCOCTL = CALDCO_1MHz;
P2DIR &=~BIT2;
P2SEL0 |= BIT2;
TA0CTL = TACLR;
TA0CTL = tassel_1 + ID_2 + MC_2;
TA0CCTL2 = CM_2 + CCIS_0 + SCS + CAP + CCIE;
_BIS_SR (LPM0_Bits + GIE);
while (1);

//定时器 ISR
#pragma vector = TIMER0_A1_vector
_interrupt void Timer_A1_CCR2_ISR (void)

开关(TA0IV)
案例04:

当前时间= TA0CCR2;
Buffer = lasttime - presprestime;
printf ("period =%d"、buffer);
TA0CCTL2 &=~CCIFG;
lasttime = TA0CCR2;

您能指导我使用终端窗口吗?

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

    您好 Surya、

      什么是终端窗口?

    您是否意味着您要在 调试模式下查看某些变量?

    此致

    Johnson

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

    你好,Surya,

    Surya siddharth r 说:
    您能指导我使用终端窗口吗?

    您是否意味着...您的 printf 函数在终端窗口上显示输出? 您使用的是"FT-Debugger (FET 调试器) "还是"Simulator"(模拟器)模式?

    在 IAR IDE 中检查...在 Linker / Output =>单击"Debug information for C-SPY"、然后选中"with I/O emulation modules"。

    然后转至调试模式,并从 视图中选择“终端 I/O”窗口。

    现在、单步执行您的代码...您可以在终端 I/O 上看到输出...如下面显示的示例屏幕所示

    希望信息能为您提供帮助。

    Rgds、

    ARS

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

    您好 Surya、

    此问题是否有更新?

    您是否仍需要我们的技术支持?

    此致

    Johnson