Hi,
Recently, I used CCS 6.1.1.00022 for F28377S launchPad. I found a problem in while() instruction. The program can't jump out the loop of while(). The codes are as following,
Read_Flag=1;
while(Read_Flag==1);
interrupt void spiRxFifoIsr(void)
{
Read_Data=SpiaRegs.SPIRXBUF; // Read data
Read_Flag=0;
PieCtrlRegs.PIEACK.all|=0x20; // Issue PIE ack
}
I have added Read_Flag into Watch Expression and see the Read_Flag is already change to 0. But the program still can't jump out this while(Read_Flag==1);. The program is stop in here. BTW, The program is correct if the code is change as follows.
Read_Flag=1;
while(1){
if(Read_Flag==0)
break;
};
But I still would like to know what reason cause the while(Read_Flag==1); can't jump out. I appreciate if you can tell me how to resolve this problem.
Thanks.
Regards,
John