Three questions...
We have done some scope testing using DIO markers and it seems to indicate that the pMM
SVMHIFG interrupt will interrupt an ongoing flash erase operation. 1. Is this the
expected behavior? 2. if I make the ISR very quick as in the example below where I
check a flag and if the flag is set, I return immediately, would the flash erase
complete normally, or will flash be corrupted? (We have a capacitor sufficient to
maintain power for the duration of a single segment erase plus some.) 3. If a flash
write operation is thusly interrupted, would it complete successfully, or corrupt?
//=======================================================================
//=======================================================================
#pragma vector=SYSNMI_VECTOR
__interrupt void SysNmiISR(void)
{
switch (SYSSNIV)
{
case 0x02: // SVMLIFG
TxBuffer(" ", 40, 1);
TxBuffer("*************** SVMLIFG", 40, 1);
__no_operation();
break;
case 0x04: // SVMHIFG
// ShutdownSaveTotals();
if (usingFlashFlag != 1) // if not erasing ow writing flash
ShutdownSaveTotals(); // else return now
break;
case 0x06: // DLYLIFG
TxBuffer(" ", 40, 1);
TxBuffer("*************** DLYLIFG", 40, 1);
__no_operation();
break;
............................
Thank you for your time,
Mike Raines