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.

Compiler/MSP430F6736A: msp430f6736A

Part Number: MSP430F6736A


Tool/software: TI C/C++ Compiler

sir, 

__bis_SR_register(LPM3_bits);          

AND

__bis_SR_register(LPM3_bits | GIE);

What is difference in these two statements,

 __bic_SR_register_on_exit(LPM3_bits | GIE);

when i come out from lpm3 mode by above statement my rtc interrupt is going to stop  

 

  • Hi Satish,

    satish sharma13 said:
    __bis_SR_register(LPM3_bits);   

    this sets the register bit for LPM3,

    satish sharma13 said:
    __bis_SR_register(LPM3_bits | GIE);

    this sets the register bit for LPM3 and enable the general interrupts.

    satish sharma13 said:
     __bic_SR_register_on_exit(LPM3_bits | GIE);

    Your above statement clears the register bits for LPM3 and the general interrupt, so it actually disables the general interrupt.

    What you wanted to do is actually set the bits I assume. In the above statement replace "bic" with "bis" so setting the bits. 

    Please correct me if I've misunderstood what you want to do though.

    Best regards,

    Britta

**Attention** This is a public forum