Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

global variable is reset after change

$
0
0

Hi Guys

I am using MSP430FR5739 in code composer studio with msp-ts430rha40a developing board. I notice that the static global I have is always reset to same value. 

for Example:

static char a = 0 ;

static char b = 0;

int main( void ){

    b==1;

    if( a == 0 ){

        foo();

    }

   if( b == 1){

       boo();

   }

}

From what I see from debuger, a is never set to zero, and foo() is not called. b cannot be set to 1 but keep as a random value( like 0x02)

I am totally new to msp430 and CCS, Could anyone help ?

Thanks :)

Harry


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>