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: File not found when running script on TICS Pro

Part Number: LMK05318

Hello,

I am trying to edit the default configuration of the LMK05318. When I run the script at Step 6 after changing some of the red fields, I get a message  that the romdump.txt file could not be found.

Here is the message from the log file:

Running script. Please wait.

File not found: C:\ProgramData\Texas Instruments\TICS Pro\Configurations\Devices\Network Synchronizer Clock (Digital PLLs)\LMK05318\romdump.txt

What could be causing this error and how can I resolve it?

Thank you!

  • Hello Ishraq,

    Running the script calls a compiled MATLAB executable, which generates the resultant register settings for the given inputs in a file called romdump.txt. There could be several reasons why this file is not found:

    1. The file is generated, but not being recognized by TICS Pro. To confirm whether this is happening, check C:\ProgramData\Texas Instruments\TICS Pro\Configurations\Devices\Network Synchronizer Clock (Digital PLLs)\LMK05318\ for a file called romdump.txt or romdump_old.txt. Are either of these files present?
    2. The MATLAB script may not be running, which could be downstream from several other possible issues:
      1. Do you have the correct version of the MATLAB R2015b 9.0 x64 runtime installed? If not, it can be located at 
      2. Do you have other versions of MATLAB or MATLAB runtime installed? The compiled MATLAB executable in TICS Pro may not run correctly if the wrong runtime environment is used. Check the path variable for an entry that contains "MATLAB Runtime\v90" (for the runtime) or "MATLAB\R2015b\runtime\win64" (for MATLAB R2015b x64 full installation). If there is a different runtime, you will need to update the system path to point to the correct runtime version.

    Regards,

  • Hi Derek,

    Thank you for the explanation! Please see my responses below:

    1. I did not see either of the romdump text files in my LMK05318 directory. However, I created a blank romdump.txt in this directory just now to see what happens. After I ran the script, I noticed there is a romdump_old.txt file now. I still get the same error message since there is no romdump.txt file. 

    2. I have the full installation of the MATLAB R2015b x64 (runtime 9.0) and no other versions/runtime. 

    Thanks,

    Ishraq

  • Hi Ishraq,

    In order to figure out what's happening, I would like to see the results of running the script. Can you please do the following and capture the result?

    1. Open a command prompt
    2. cd C:\ProgramData\Texas Instruments\TICS Pro\Configurations\Devices\Network Synchronizer Clock (Digital PLLs)\LMK05318
    3. LMK05x18_ROM_Gen.exe ./matlab_inputs_lmk05x18.m ./outfile.txt

    Regards,

  • Hey Derek, 

    Please see the screenshot of the command prompt and the outfile attached below.

    Thank you,

    Ishraq

    ;Device = LMK05X18 PG1.0
    ;Matlab Version = 1.0
    ;VCO1_CLK = 2.500000000000e+09
    ;XO1_CLK = 4.800480000000e+07
    ;DPLL1_BW3DB = 9.937096667056e+01
    ;DPLL1_BW3DB_ACT = 1.012912888761e+02
    ;DPLL1_BW3DB_FL1_ACT = 3.034930821135e+01
    ;DPLL1_BW3DB_FL2_ACT = 0.000000000000e+00
    ;Tr  Fn Attenuation @ 100 = -3.02917 dB
    ;Err Fn Attenuation @ 1 = -42.9943 dB
    ;DPLL1_TDC_CLK = 2.500000000000e+07
    ;REF1_DPLL1 = 2.500000000000e+07
    ;REF2_DPLL1 = 2.500000000000e+07
    dpll1_ref_den[39:0] = 0xffffffffff
    dpll1_ref_num[39:0] = 0xaaaaaaaaaa
    dpll1_ref_decimation[4:0] = 0xa
    dpll1_ref_dither[1:0] = 0x0
    dpll1_ref_fb_pre_div[3:0] = 0x1
    dpll1_ref_fb_div[29:0] = 0x10
    dpll1_ref_filt_gain[5:0] = 0x0
    dpll1_ref_filt_gain_fl1_[5:0] = 0x0
    dpll1_ref_filt_gain_fl2_[5:0] = 0x0
    dpll1_ref_filt_scalar[9:0] = 0x214
    dpll1_ref_loop_gain[4:0] = 0xe
    dpll1_ref_loop_gain_fl1_[4:0] = 0xc
    dpll1_ref_loop_gain_fl2_[4:0] = 0xe
    dpll1_ref_lpf0_gain[4:0] = 0x9
    dpll1_ref_lpf0_gain_fl1_[4:0] = 0x8
    dpll1_ref_lpf0_gain_fl2_[4:0] = 0x9
    dpll1_ref_lpf1_gain[4:0] = 0x7
    dpll1_ref_lpf1_gain_fl1_[4:0] = 0xd
    dpll1_ref_lpf1_gain_fl2_[4:0] = 0x7
    dpll1_ref_quant[5:0] = 0x8
    dpll1_ref_quant_fl1_[5:0] = 0xc
    dpll1_ref_quant_fl2_[5:0] = 0x8
    dpll1_ref_loopfilt_clk_div[3:0] = 0xa
    dpll1_ref_lpf0_gain2_fl[4:0] = 0x8
    dpll1_ref_lpf1_gain2_fl[4:0] = 0x8
    dpll1_ref_tmr_fl1_[9:0] = 0x230
    dpll1_ref_tmr_fl2_[9:0] = 0xee
    dpll1_ref_mashseed[1:0] = 0x1
    dpll1_ref_order[2:0] = 0x3
    dpll1_ref0_auto_prty[2:0] = 0x0
    dpll1_ref0_rdiv[15:0] = 0x1
    dpll1_ref1_auto_prty[2:0] = 0x0
    dpll1_ref1_rdiv[15:0] = 0x1
    dpll1_ref_hist_en = 0x1
    dpll1_ref_hist_hold = 0x1
    dpll1_ref_histcnt[4:0] = 0x18
    dpll1_ref_histdly[30:0] = 0x1
    dpll1_ref_hist_intmd[3:0] = 0x8
    dpll1_tuning_free_run[37:0] = 0x0
    pll1_order[2:0] = 0x3
    pll1_ndiv[11:0] = 0x34
    pll1_num[39:0] = 0x140008bcbd
    dpll1_ref_cycslip_offset[32:0] = 0xc8
    
    

  • Hi Ishraq,

    The script is working as expected, so the MATLAB runtime must be on the system path. Also, if you have write access to outfile.txt from the command prompt, the program should have the same access. To be honest, I'm not sure what's preventing your script from running in TICS Pro. I suspect it has something to do with the full installation of MATLAB and Windows permissions, but we don't have the logging facilities to capture the explicit error.

    We can work around whatever limitation is preventing the script from running. Inconveniently, we cannot just import the romdump file after running the script ourselves. TICS Pro automatically renames the romdump file to romdump_old.txt to prevent junk data from being loaded in case the script fails to run (you have already encountered this behavior). However, we can trick TICS Pro into using the old romdump file by preventing romdump.txt from being renamed.

    First, a procedure which assumes you have authority to set file permissions for your computer (reference from this article for permissions procedure, may be helpful for image references):

    1. Configure everything in the TICS Pro GUI how you desire, then click the run script button.
    2. If you still see a problem where romdump.txt cannot be found, repeat the process outlined above with the command prompt, with one modification: instead of ./outfile.txt as the final argument, use ./romdump.txt. You could also rename the generated outfile.txt to romdump.txt.
    3. Create an empty file in the LMK05318 directory called romdump_old.txt.
    4. Right click on romdump.txt, select properties.
    5. On the security tab, click "advanced" to located advanced permissions.
    6. Click disable inheritance button, and when prompted convert inherited permissions to explicit permissions
    7. On the permissions page, add a new permission with the add button.
    8. Click "Select a principal" and set the object name to "Everyone" (no quotes)
    9. Change the permission type to "Deny"
    10. Show advanced permissions, and deny deletion, read permissions, change permissions, and taking ownership.
    11. "OK" through all the submenus.
    12. In TICS Pro, run the script again. TICS Pro should fail to rename romdump.txt or delete romdump_old.txt, and will continue using romdump.txt generated externally.
    13. If the script needs to be regenerated, delete romdump.txt, and repeat steps 1,2,12.

    If you don't have the ability to set permissions for your files, or if you are (perhaps rightly) concerned about the side effects of creating a file which cannot be deleted without permissions modification, you will need an alternate solution that is more timing-sensitive:

    1. Configure everything in the TICS Pro GUI how you desire, then click the run script button.
    2. If you still see a problem where romdump.txt cannot be found, repeat the process outlined above with the command prompt, with one modification: instead of ./outfile.txt as the final argument, use ./romdump.txt. You could also rename the generated outfile.txt to romdump.txt.
    3. Open some kind of interactive programming environment (e.g. a python shell), and create an open file pointer to romdump.txt. A python example:
      import os
      os.chdir("C:\\ProgramData\\Texas Instruments\\TICS Pro\\Configurations\\Devices\\Network Synchronizer Clock (Digital PLLs)\\LMK05318\\")
      f = open('romdump.txt')
    4. In the python interpreter, queue the command f.close() but do not execute it yet. Be prepared to switch focus back to the python interpreter.
    5. Run the script in TICS Pro again. Part of the script execution should open a command prompt. The moment that new command prompt appears (should be immediately after clicking "OK" to the "Run the script?" prompt), execute the python interpreter command to close the file pointer.
    6. romdump.txt should not be deleted or renamed, and the script should proceed as normal. 

    Regards,

  • Hey Derek,

    Thank you for all your help with this issue! I tried both procedures outlined above.

    For the first case, I was able to change the permissions according to the instructions but when I ran the script on TICS Pro, it still deleted my romdump.txt file. 

    For the second solution, the script ran successfully with the python commands  outlined above, using f.close() immediate after the GUI script appears. I also noticed that the script runs without executing the f.close() command, as long as the open file pointer has been executed. 

    Thanks,

    Ishraq