Skip to main content
Visitor II
November 18, 2005
Question

Erase is not available on PROGRAM MEMORY for ST7FLITE10

  • November 18, 2005
  • 2 replies
  • 787 views
Posted on November 18, 2005 at 14:22

Erase is not available on PROGRAM MEMORY for ST7FLITE10

    This topic has been closed for replies.

    2 replies

    wolfAuthor
    Visitor II
    September 19, 2005
    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!

    wolfAuthor
    Visitor II
    November 15, 2005
    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