This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/SW-EK-TM4C123GXL: TM4C123 EEPROM erase

Part Number: SW-EK-TM4C123GXL

Tool/software: TI-RTOS

Hello, 

I'm using CCS and TM4C123 for the as the development tool and board. 

I've used EEPROM in my project. I'm able to write and read eeprom without any issue. The only problem I'm facing is in erasing the eeprom. 

Is there any api present which erase only specified blocks of eeprom instead of erasing the entire eeprom?

Regards

Praveen 

  • Yes, there is.

    uint32_t
    EEPROMMassErase(void)

    Look at item 9.2.3.13 of tivaware user guide.
    Cheers
    Bruno
  • Hello Bruno,

    EEPROMMassErase(void) api will completely erase the eeprom.

    I only want to erase some part of the eeprom and not all of it.
    Is there any api which only erase the specified block or we have to erase the entire eeprom every time??

    Regards
    Praveen
  • Praveen,

    "Erasing the EEprom" simply means to write 0xFF to each location. If you truly need to erase a block, just run a loop and do that into the desired region.

    However, I can't think of a very good reason for one having to erase a block of eeprom. What are you specifically trying to do? Did you read this sentence in 9.1?

    "The EEPROM can be programmed on a word-by-word basis and, unlike flash, the application need not explicitly erase a word or page before writing a new value to it."

    Regards,

    Bruno