Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

PN5180 EEPROM new value dont writed to EEPROM #40

Description

@alansbor

Hello developers

In my example, can't I write a new value to the EEPROM?
I did not find an example for recording anywhere in the description.
How to write a new value to the EEPROM correctly?

 //---------------------------------------------------------------------------
  // 0x34 LPCD_REFERENCE_VALUE RW 1
  //#define LPCD_REFERENCE_VALUE  (0x34)
  Serial.println(F("----------------------------------"));
  Serial.println(F("Reading LPCD_REFERENCE_VALUE ..."));
  uint8_t LPCD_REFERENCE_VALUE_v[1];
  nfc.readEEprom(LPCD_REFERENCE_VALUE, LPCD_REFERENCE_VALUE_v, sizeof(LPCD_REFERENCE_VALUE_v));
  Serial.print(F("LPCD_REFERENCE_VALUE= "));

  Serial.print(LPCD_REFERENCE_VALUE_v[0], HEX);
  Serial.println(" ");
    
  // OLD Value LPCD_REFERENCE_VALUE= 8  dec 8   New value LPCD_REFERENCE_VALUE= AC dec 172
  uint8_t LPCD_REFERENCE_VALUE_vv[1];
  LPCD_REFERENCE_VALUE_vv[0] = 172;
  nfc.writeEEPROM(LPCD_REFERENCE_VALUE, LPCD_REFERENCE_VALUE_vv, sizeof(LPCD_REFERENCE_VALUE_vv));
  

  Serial.println(F("----------------    CHECK NEW VALUE   ------------------"));
  Serial.println(F("Reading LPCD_REFERENCE_VALUE ..."));
  nfc.readEEprom(LPCD_REFERENCE_VALUE, LPCD_REFERENCE_VALUE_v, sizeof(LPCD_REFERENCE_VALUE_v));
  Serial.print(F("LPCD_REFERENCE_VALUE= "));

  Serial.print(LPCD_REFERENCE_VALUE_v[0], HEX);
  Serial.println(" ");
    
  exit(- 1);

  //---------------------------------------------------------------------------

Alexey.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions