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.

TM4C123GH6PM: tm4c123gh6pm

Part Number: TM4C123GH6PM

Please, how do i use the inbuilt EEPROM to save a four digit passcode?

  • Hello Arinze,

    First you need to initialize the EEPROM:

    SysCtlPeripheralEnable(SYSCTL_PERIPH_EEPROM0);
    
    EEPROMInit();

    Then you can program the EEPROM with EEPROMProgram - indicating the location which should be within the 2kB of data you have available, and the amount of bytes you are writing.

    EEPROMProgram(&WrBuffer, 0x00, NumBytesToWrite);

    To read the data back, you can use EEPROMRead with those parameters.

    EEPROMRead(&RdBuffer, 0x00, NumBytesToRead);

    Best Regards,

    Ralph Jacobi