Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

__no init_如何定义数组及Cstartup.s43文件中关闭WDT的疑问

$
0
0

芯片用MSP430F5438A,程序下载到板子后,一直在_data 16_memzero里死循环。网上查了下,可能是因为初始化变量时有大数组,导致看门狗不断复位,这个初始化的过程在进入main函数之前,解决方法有:

1、对数组用__no init_定义;

2、修改IAR中的Cstartup.s43文件中的__program_start子程序,增加一个关闭看门狗的设置

问题:1、__no init_如何使用?例如数组unsigned char ABCbuffer[500]; 如何用__no init_定义?

           2、在Cstartup.s43中__program_start关于看门狗的代码如下,在哪儿添加关闭WDT?

        __program_start:

        PUBLIC ?cstart_begin ?cstart_begin:

        // --------------------         // Turn off the watchdog.         //        

       // Note: This is excluded by default. Please define        

       // DISABLE_WATCHDOG to include it.         //           

      #ifdef DISABLE_WATCHDOG

        MOV     #WDTPW + WDTHOLD, &WDTCTL

      #endif


Viewing all articles
Browse latest Browse all 3634

Trending Articles