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.

  • TI Thinks Resolved

CODELOADER: About codeloader 4 command

Part Number: CODELOADER

Hi Ti,

    I am from China, we are preparing program  Device LMK03318,According to the official website, we purchased the USB2ANY Tool to program.

First we downloaded the codeloader 4 software , Successfully program EEPROM using GUI(program file :CVN_Clock_eeprom_0_2.epr),The problem we are having now is that we use another platform to call the burn through the command, However, the command description in the user manual does not describe how to program EEPROM. Can you give us a suggestion?How to use command to program eeprom?

  • Hello Seven,

    I recommend downloading and installing our latest EVM tool, TICS Pro (http://ti.com/tool/ticspro-sw). Once installed, you can make an ActiveX/COM connection to TICS Pro. For example using python:

    import win32com.client
    tp = win32com.client.Dispatch("TICSPro.ActiveX")

    Once the above is done. After you load the device, you can press buttons using the PressButton command. Provide the name as identified in the Context help (lower left) when you mouse over the button you'd like to press. For example:
    tp.PressButton("bPROGRAMEEPROM")

    73,
    Timothy

  • In reply to Timothy T:

    Hi Timothy,

          I downloaded the latest software based on the website you provided, but we can't successfully program it in eeprom using the software interface.

    But still in the codeloader 4 can be program normally,Can you solve this problem for me?

  • In reply to seven xiao:

    Hi Timothy,
    We don't know much about python.can you give me example for this devices program and read out. Or give us a user manual
  • In reply to seven xiao:

    Can you elaborate more on what you are trying to achieve? I understand you are wanting to automate the programming of the EEPROM. How does this fit into a larger flow? You are using some software? What is your platform?
    - Strange that TICS Pro didn't work to program the EEPROM for you.
    - Have you seen page 7 on automation in the codeloader documentation?

    Have you made a header on your custom board to connect the USB2ANY so you can program?

    Perhaps you can write these registers using your platform as described in section 10.5.5 of the datasheet, Write EEPROM.

    73,
    Timothy
  • In reply to Timothy T:

    Hi Timothy,

    We use TICS Pro software.

    Through the Python example you provided, we can operate various instructions, such as program, read, etc., but we still have 2 problems. First, when we execute "tp.PressButton ("bIMPORTEEPROMFILE")", Will pop up a window,but we can't do the image file that needs to be inserted, at the same time we insert the image file and save it as a tcs file, but we don't know how to use load tcs file. For this question, how can we insert the program file(.epr file)?can we provide an example to give me with paython?

    Second, we have an I2C interface that connects two ICs with different addresses at the same time (0X50 and 0X53), but the software can only recognize one IC address. For this problem, how to choose two IC addresses, when we program and read.can we provide an example to give me with paython?
  • In reply to seven xiao:

    Hello,

    It is possible to load a saved .tcs file by using...

    import os.path
    fullpath = r'c:\directory\file.tcs'
    if os.path.exists(fullpath) and os.path.isfile(fullpath):
    tp.RestoreSetup(fullpath)

    Note, you can always automate the sequence of register writes as per the datasheet.

    I'm not sure there is a way to automate i2c selection. I know that from the "USB communications" --> "Interface" it is possible to set the I2C address, but am not sure of an automated way off-hand. You should however be able to use tp.WriteAddressData(longAddress, longValue) to write to a specific address and then the data.

    73,
    Timothy
  • In reply to Timothy T:

    Thank you for your reply, we have successfully loaded tcs file and successfully sent I2C address, ask you a question, how to convert python syntax tp.WriteAddressData(7,0x53) into VBA syntax. Because we use python to open the Tics pro software, the default USB connection is not USB2ANY, but when we open the Tics Pro software with VBA, we can not connect to USB2ANY normally. Maybe Python initialization needs to call some files, we don't know。

    python :
    import win32com.client

    tp = win32com.client.Dispatch("TICSPro.ActiveX")
    tp.Initialize(r"C:\Program Files (x86)\Texas Instruments\TICS Pro")

    tp.SelectDevice ("LMK03318")

    fullpath = r'D:\Project_2018\SANM(IDA)\F894\BU3_F894\Flash\u78_u80_u82_u156\program_0x50.tcs'
    tp.RestoreSetup(fullpath)

    tp.WriteAddressData(7,0x53)

    tp.PressButton("bCOPYEEMAP")
    tp.PressButton("bPROGRAMEEPROM")
    tp.PressButton ("bREADBACKEEPROM")



    VBA:
    Sub main()

    Dim PLLobject As Object
    Set PLLobject = CreateObject("TICSPro.ActiveX")
    PLLobject.Initialize ("C:\Program Files (x86)\Texas Instruments\TICS Pro")
    PLLobject.SelectDevice ("LMK03318")

    fullpath = "D:\Project_2018\SANM(IDA)\F894\BU3_F894\Flash\u78_u80_u82_u156\program_0x50.tcs"
    PLLobject.RestoreSetup (fullpath)

    PLLobject.WriteAddressData ("7,&H53") '' ''The syntax is wrong

    ''PLLobject.PressButton ("bIMPORTEEPROMFILE")
    PLLobject.PressButton ("bCOPYEEMAP")
    PLLobject.PressButton ("bPROGRAMEEPROM")
    PLLobject.PressButton ("bREADBACKEEPROM")

    ''PLLobject.PressButton ("bEXPORTEEPROMFILE")


    MsgBox ("PLL Active X Exercise Finished")

    Set PLLobject = Nothing

    End Sub
  • In reply to seven xiao:

    This is a very urgent case, how to use tp.WriteAddressData(7,0x53) in VBA
  • In reply to seven xiao:

    You need the send each value individually. Not as a single string...
    tp.WriteAddressData(longAddress, longValue)

    and also address is first, so...
    So PLLobject.WriteAddressData(&H53, 7)

    73,
    Timothy
  • In reply to Timothy T:

    Hello Timothy,

        we use PLLobject.WriteAddressData(&H53, 7) in VBA ,show syntax error.Do you know how to write correctly?

        we use tp.WriteAddressData(0x53,7) in python ,The log displayed by the GUI is “Wrote Register R0x53 ad 0x5307” ,it is right? we find that from the "USB communications" --> "Interface"  the I2C address is not update ,Can I think that set address is unsuccessful?

        BTW,Why doesn't we automatically connect USB2ANY when we open the software in Python, but VBA can. Do you have any problems with my python code? .Please see attachment picture.

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.