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.

LMK05318: Program the internal EEPROM

Part Number: LMK05318
Other Parts Discussed in Thread: USB2ANY

Dear Sir:

  About the LMK05318 used in our products, we are trying to program the internal EEPROM via the I2C interface.

  Our products used the ARM CPU + Linux OS.

  1) In the datasheet, Chapter 9.5.4, it said:

    The register map data (hex format) or SRAM/EEPROM map data can be exported to enable host programming of the LMK05318 on start-up.

  Q-1) Can the TICS Pro software tool generate the SRAM/EEPROM map data to be used for the programming of internal EEPROM?

  Q-2) To program the internal EEPROM of LMK05318 with the SRAM/EEPROM map data, does TI provides the sample codes (command line tool) on Linux OS?

  Thank you.

Best Regards.

  • Hello,

    hank chu said:
    Q-1) Can the TICS Pro software tool generate the SRAM/EEPROM map data to be used for the programming of internal EEPROM?

    Yes, click Export GUI Map --> EEPROM File on EEPROM tab.

    hank chu said:
    Q-2) To program the internal EEPROM of LMK05318 with the SRAM/EEPROM map data, does TI provides the sample codes (command line tool) on Linux OS?

    We don't have such an example/sample code.  If you can use windows, you can use the USB2ANY and TICS Pro to program the EEPROM.  Is that not an option?

    73,
    Timothy

  • Dear Timothy:

       Our products use the ARM CPU + Linux OS.

       We need to program the internal EEPROM of LMK05318 on ARM CPU + Linux OS during the manufacture test.

       1) We received a *.tcs file for LMK05318 from our H/W colleague.

       1-1) We found the register map data on the section "[MODES]" as follows:

    [MODES]

    NAME00=R0

    VALUE00=16

    ....

    NAME10=R12

    VALUE10=3099

    ....

    NAME220=R240
    VALUE220=61440
    NAME221=R241
    VALUE221=61696
    NAME222=R242
    VALUE222=61952
    NAME223=R243
    VALUE223=62208
    NAME224=R244
    VALUE224=62464
    NAME225=R249
    VALUE225=63777
    NAME226=R250
    VALUE226=64000
    NAME227=R251
    VALUE227=64289
    NAME228=R252
    VALUE228=64557

    ....

    NAME331=R411

    VALUE331=105216

    1-2) In the datasheet, Chapter 9.5.6 EEPROM Programming Flow, it mentioned the Method #1 (Register Commit).

    Q1-2-1) Can we only parse the register map data in the section [MODES] of the *.tcs file and use the Method #1 (Register Commit)

          to program the register map data into the internal EEPROM?

    1-3) In the datasheet, Chapter 9.5.5 General Register Programming Sequence:

      2. Write ....

        - Mask R12 = A7h (Device reset/control register)

        - Mask R157 = FFh (NVM control bits register)

        - Mask R164 = FFh (NVM unlock bits register)

        - Mask R353 to R435 = FFh (Internal test/diagnostic registers should not be written)

        ....

    Q-1-3-1) Does it mean that we should not write R157, R164, and R353..R435 registers and the bit-7/5/2/1/0 of R12 register during the General Register Programming Sequence?

    1-4) The "VALUE223=62208" in the section "[MODES]" of the *.tcs file is for R243 register.

    The "VALUE220=61440" in the section  "[MODES]" of the *.tcs file is for R240 register.

      62208 = 0xF300

      61440 = 0xF000

      But these Rxxx registers of LMK05318 are all 8-bit registers according to the SNAU237A (LMK05318 Registers).

    Q1-4-1)  Could you tell us how to write the values (more than 0xFF) to the 8-bit registers of LMK05318?

       Thank you.

    Best Regards.

  • Dear Timothy:

      We are writing the codes to program the internal EEPROM of LMK05318 for MFG test now.

      The platform is ARM CPU + Linux OS.

      Could you tell us your comment for the questions above?

      Thank you.

    Best Regards.

  • Hello,

    hank chu said:

    Q1-2-1) Can we only parse the register map data in the section [MODES] of the *.tcs file and use the Method #1 (Register Commit)

          to program the register map data into the internal EEPROM?

    Yes, although from inside TICS Pro, it is possible to export a .txt file of the hex register dump.  This would be a lot simpler than parsing the info out of the .TCS file.

    hank chu said:
      But these Rxxx registers of LMK05318 are all 8-bit registers according to the SNAU237A (LMK05318 Registers).

    The address is included.  That is why the value is so back.  Value & 0xff would be just the data.

    hank chu said:
    Q1-4-1)  Could you tell us how to write the values (more than 0xFF) to the 8-bit registers of LMK05318?

    Are you referring to writing to addresses above 0xff?    Please note page 58 of datasheet.  There is a address high and address low register.  If I don't misunderstand you, this enables writing to address above 0xff.

    73,
    Timothy

  • Dear Timothy:

        Thank you for your kind support.

        It is OK to read/write the registers of LMK05318.

        We loaded the *.tcs file and programmed the EEPROM by TICS Pro.

       1)  And we tried to dump the content of EEPROM of LMK05318 on ARM CPU +Linux OS.

        But 6 bytes of EEPROM (dumped on ARM CPU + Linux OS) are different from

        the "SRAM/EEPROM Map" of TICS Pro.

       1-1) The "SRAM/EEPROM Map" of TICS Pro

        1-1-1) Click "File" menu, click "Load" sub-menu to load the *.tcs file.

                  Then, click the "EEPROM" entry to view the "SRAM/EEPROM Map" of LMK05318.

       1-2) The 6 bytes are different, but the other bytes are same with the TICS Pro.

       1-2-1) The 6 bytes (different)

       1-2-1-1) The 2nd-byte : TICS Pro=0x2D, our application= 0x18

        1-2-1-2) The 3rd-byte : TICS Pro=0x17, our application= 0x2B

        1-2-1-3) The 5th-byte : TICS Pro=0x16, our application= 0x31

        1-2-1-4) The 6th-byte : TICS Pro=0x03, our application= 0x16

        1-2-1-5) The 8th-byte : TICS Pro=0x28, our application= 0x20

        1-2-1-6) The 9th-byte : TICS Pro=0x00, our application= 0x8B

     

        Could you tell us your comment?

       Have a nice day.

    Best Regards.

  • Dear Timothy:

    We tried to read the EEPROM according to the description in the datasheet (Chapter 9.5.8 Read EEPROM) with the TICS Pro.

    1) The procedures to read the internal EEPROM in the "Raw Register" tab of the TICS Pro.

    1-1) Write R159 register

    1-2) Write R160 register

    1-3) Read R161 register

    2) The logging messages of TICS Pro when we read the internal EEPROM with the TICS Pro

    Welcome to TICS Pro. Version -> 1.6.10.0, 20-Jul-19
    Loading Device LMK05318...
    Detected 1 USB2ANY interfaces
    Completed loading Device LMK05318. Version = 2019-05-15, v0.7.3, scripts=096fdda198
    Wrote Register R0x9F as 0x00 9F00
    Wrote Register R0xA0 as 0x00 A001
    Read back Register R0xA1 as value 0x00 A118. Was 0x00 A12B. XOR difference = 0x00 0033.
    Wrote Register R0x9F as 0x00 9F00
    Wrote Register R0xA0 as 0x00 A002
    Read back Register R0xA1 as value 0x00 A12B. Was 0x00 A118. XOR difference = 0x00 0033.

    2-1) According to the logging messages above, the 2nd-byte/3rd-byte of EEPROM read by TICS Pro are 0x18/0x2B.

    2-1-1) The values of 2nd-byte/3rd-byte are same as our application, but different from the "SRAM/EEPROM Map" of TICS Pro.

    Could you tell us your comment?

    Thank you.

    Best Regards.

  • Dear Timothy:

        About our products, we need to provide the EEPROM programming for the manufacturer test.

        Could you tell us the comment for the 6 different bytes of the internal EEPROM of LMK05318?

        Thank you.

    Best Regards.

  • Hello Hank,

    Address 0 to address 9 of EEPROM are actually read only EEPROM bytes.  So they can be different from your device to tics pro.  TICS Pro won't be able to overwrite them and you wouldn't need to worry about their values.

    73,
    Timothy

  • Dear Timothy:

       We compared the whole content of the internal EEPROM of LMK05318 (read on R161)  with the SRAM/EEPROM Map displayed by TICS Pro.

     

      1) And we found that 2 more bytes are different.

       1-1) The 38th-byte of EEPROM:  

            Read by R161:  0x12

            SRAM/EEPROM Map displayed by TICS Pro : 0x01

       1-2) The 39th-byte of EEPROM: 

            Read by R161:  0xE0

            SRAM/EEPROM Map displayed by TICS Pro : 0x40

       

      Could you tell us your comment about the 2-byte of EEPROM?

      Thank you.

    Best Regards.

  • Hello Hank,

    The 38th byte is address 37.... below is the info.  Is it possible that the status outputs got updated between writing to EEPROM and readback of EEPROM?

    Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
    Adr 37 STAT0_SEL[3] STAT0_SEL[2] STAT0_SEL[1] STAT0_SEL[0] STAT1_SEL[6] STAT1_SEL[5] STAT1_SEL[4] STAT1_SEL[3]
    Adr 38 STAT1_SEL[2] STAT1_SEL[1] STAT1_SEL[0] GPIO_FDEV_EN CH7_PD CH6_PD CH5_PD CH4_PD

    73,
    Timothy

  • Dear Timothy:

      Thank you for your kind support.

       According to the SNAU237A (LMK05318 Registerss), the STAT0_SEL is “STATUS0 Indicator Signal Select” and STAT1_SEL is “STATUS1 Indicator Signal Select”.

       The STAT0_SEL and STAT1_SEL are different between the “Read on R161 by TICS Pro” and “SRAM/EEPROM Map displayed by TICS Pro”.

       It seems that the 2 values are changed.

     

       We are debugging it with TI FAE in Taiwan now.

       Please do us a favor to close this case.

       Have a nice day..

    Best Regards.