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.

如果MSP430的某个地址上的Flash坏了,BUSY会是什么?

Other Parts Discussed in Thread: MSP430F4152

现在产品使用的是MSP430F4152,因为刚开始没有考虑那么全面 ,产品已经量产了安装了,数据存储用的是以下的代码:

void WaitForEnable()
{
    while((FCTL3 & BUSY) == BUSY);      //Busy
}

void WriteFlash(unsigned int Addr,unsigned char *Data,unsigned char DataLend)
{
	WDTCTL = WDTPW+WDTHOLD;
    char i;

    char *FlashPtr = (char *)Addr;              // Segment  pointer

    FCTL1 = FWKEY + WRT;                        // Set WRT bit for write operation

    FCTL3 = FWKEY;                              // Clear Lock bit

    _DINT();

    for(i=0;i<DataLend;i++)
    {
	*FlashPtr = *Data;                           // Save Data
	WaitForEnable();                            //Busy
	*FlashPtr++;
        Data++;
    }

    _EINT();
    FCTL1 = FWKEY;                              // Clear WRT bit
    FCTL3 = FWKEY + LOCK;                       // Set LOCK bit
    WDTCTL = WDT_ARST_1000;//开一秒看门狗

}

如果MCU的某一地址的flash坏了 是否会导致

while((FCTL3 & BUSY) == BUSY);      //Busy 

无限等待吗?