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.

LMK03318: LMK03318 I2C function EEPROM write FAIL and PLL not Lock

Part Number: LMK03318
Other Parts Discussed in Thread: LMK05318B

Using Lmk03318 I2C communication write block register data, but needed every to program on power ON,  Trying to write EEPROM write function but write is not happening and PLL also not Locking, PLL also need to Lock, but required register i am setting, kindly let me know any example or possible solution for my problem

  • Hi Swathi,

    Can you share with me the hex.txt or the .tcs files? I'd like to review your config to understand the PLL lock issue  

    To write the EEPROM per datasheet section 10.5.5, you'll first need to make sure that the Write SRAM procedure was done as to commit the register settings to SRAM. following that you'll write R144 with 0xEA, R137 bit 0 with 1. Once you've done these steps R136 will increment by 1, this contains the total number of EEPROM programming cycles that have been completed successfully. Then write R144 to 0. 

    If R137 bit 5 readback was 1, that means that the EEPROM write was unsuccessful, and the device will be locked and will not operate properly and you'll have to do another EEPROM write sequence  and should be initiated and successfully completed to unlock the device.

     

    Best,

    Sandra 


  •    writeReg(145, 0x00);

      // Step 3: Commit registers → SRAM
      writeReg(137, 0x40);
      delay(10);

      // Step 4: Unlock EEPROM
      writeReg(144, 0xEA);

      // Step 5: Program EEPROM
      writeReg(137, 0x01);

      delay(500);

      // Step 6: Lock EEPROM
      writeReg(144, 0x00);

      delay(100);

      uint8_t status;

    do
    {
      status = readReg(137);
      delay(20);

    } while(status & 0x01);   My I2C code write register externally
  • Hi,

    Im investigating this issue. I'll get back to you next week.

    Best,

    Sandra   

  • Hi Swathi and Sandra,

    Overall, your eeprom write routine looks good.
    But "During EEPROM write, R137.2 is a 1" means that if you read R137 the bit 2 value will be 1.
    So, reading R137 will then result in 00000100b = 0x04 if no other bits are set.

    do
    {
    status = readReg(137);
    delay(20);

    } while(status & 0x04);



    Also be aware of not overwriting the default value of NVMAUTOCRC bit in R137.
    Otherwise you have to manually calculate the CRC.
    Eeprom page is valid if the stored CRC (R135 NVMSCRC) equals the calculated live CRC (R138 NVMLCRC)
    NVMCRCERR bit can be read after loading the page to verify correct load.


    Regards,
    Octo

  • BTW: NVMSCRC is mentioned in the register map overview but there are no further details for R135
    Datasheet LMK03318: SNAS669E –SEPTEMBER 2015–REVISED APRIL 2018


    I have added a snippet from the LMK05318B for the NVMSCRC register.

  • Hi,

    i am Reading R137= 0x20, NVMCRCERR is present, how it can be solved?

  • // Step 5: Program EEPROM
      writeReg(137, 0x01);

    If you change this step to "writeReg(137, 0x10 + 0x01);" then both the NVMAUTOCRC and NVMPROG are set.

    This will calculate the CRC automatically upon eeprom programming.