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.

MSPM0G3507: __WFI() function

Part Number: MSPM0G3507

Tool/software:

hii there

      while writing any code is it necessary to write a __WFI() function?

should I write like this?
   

int main()
{
    while(1)
    {
        if(flag == true)
        {
            transmit_msg();
            flag = false;
        }
    }
}
void IRQ_Handler(void)
{
    flag = true;
}