cancel
Showing results for 
Search instead for 
Did you mean: 

Erase is not available on PROGRAM MEMORY for ST7FLITE10

wolf
Associate II
Posted on November 18, 2005 at 14:22

Erase is not available on PROGRAM MEMORY for ST7FLITE10

2 REPLIES 2
wolf
Associate II
Posted on September 19, 2005 at 09:00

I try to use APISample-Software as command-line programmer with ST7STICK. If I enable the ''-erase'' option, the error message above is the only result.

This is the part of the source, that seems to make the problem:

//////////////////////////////////////////////////

// Erase a memory area.

// becareful depending on the device and on the memory area to

// process Erase may be unavailable

BOOL Erase(const char *szAreaName)

{

int iReturn=0;

unsigned long iAreaId;

if (IsErasableArea(g_szPrgDevice, ''PROGRAM MEMORY'')) {

if ((iReturn = EGetId(szAreaName, &iAreaId)) == 1) {

iReturn = EEraseAll(iAreaId);

}

else {

LDisplayError(''Unknown memory Area name'');

}

}

else {

char szErrorMsg[200];

sprintf(szErrorMsg,''Erase is not available on %s for %s'',

szAreaName,g_szPrgDevice);

LDisplayError(szErrorMsg);

}

return (iReturn==1);

}

Please help!

wolf
Associate II
Posted on November 15, 2005 at 04:31

Thank you for reply. But why do I get an error message if I try to reprogram a read protected device?

Regards

Rene