Hello.
I have a question regarding the MSP430F5419A ISP Flash programming.
We are running some code from the flash bank 2 (starting at 0x20000 address). This code programs flash bank0 (starting at 0x5c00).
This is achieved by first erasing the bank 0 (this code is working).
Than we program the bank 0 as follows:
for (i = 0; i < length; i++)
{
FCTL1 = FWKEY+WRT; // Set WRT bit for write operation
*flash_ptr = *val; // Write value to flash
FCTL1 = FWKEY; // Clear WRT bit
while(BUSY & FCTL3);
FCTL3 = FWKEY+LOCK; // Set LOCK bit
while (!(FCTL3 & WAIT));
flash_ptr++;
val++;
}
where flash_ptr points to the 0x5C00 on.
The question is: theoretically if the code is bug free and running from bank 2 (placed there by the help of #pragma location in IAR) can it work (except for the time consumption)? (we make sure that the interrupts are disabled during the whole loop)...
Additional question is: why sometimes on some boards (this happened twice in a raw) the operation succeeds but further on we got a "
Mon Nov 12, 2012 22:38:17: Security Fuse has been blow" and unable to program the MSP430 with the FET anymore?
Thank you very much.
Regards
Igor