At 14:55 18-07-05 +0100, you wrote:
>Hi!
>   We are trying to write to info-mem. But our program
>hangs while erasing sector. Can anyone help?
>Best Regards,
>Rajat.

You should follow the MSP430 manual chapters on erasing and writing the
internal flash. If you are running your software from the internal flash,
waiting for the busy bit is problaby the thing you are doing wrong.

Here a bit of my code:

                //erase sector
                dint();
                FCTL3=0xA500;
                FCTL1=0xA500 | 2;
                *((unsigned char *)address)=0; //dumy write, now the erase 
starts.
                FCTL3=0xA500 | 0x10;
                eint();

Writing is just as simple. The processor halts automatically during write
and erase.

Nico Coesel


Reply via email to