SNAU303A May   2024  – September 2024

 

  1.   1
  2.   Description
  3.   Features
  4.   Applications
  5.   5
  6. 1Evaluation Module Overview
    1. 1.1 Introduction
    2. 1.2 Kit Contents
    3. 1.3 Device Information
  7. 2Hardware
    1. 2.1 Setup
      1. 2.1.1 Default Configuration of the LMH1239EVM
      2. 2.1.2 Hardware and Software: Description and Setup
        1. 2.1.2.1 SDI_IN1 Selected
        2. 2.1.2.2 SMBus/I2C Secondary Mode Configuration for the LMH1239EVM GUI
        3. 2.1.2.3 High Level Page for the LMH1239EVM GUI
        4. 2.1.2.4 Eye Monitor for the LMH1239EVM GUI
          1. 2.1.2.4.1 Register Map for the LMH1239EVM GUI
        5. 2.1.2.5 Scripting for the LMH1239EVM GUI
  8. 3Hardware Design Files
    1. 3.1 Schematics
    2. 3.2 PCB Layout
    3. 3.3 Bill of Materials (BOM)
  9. 4Additional Information
    1. 4.1 Trademarks
  10. 5Related Documentation
  11. 6Revision History

Scripting for the LMH1239EVM GUI

The LMH1239 GUI supports Javascript scripting with the EVM. Users can upload a script by pressing the Upload Script File button. Users can press the Run button to execute the script that is currently selected in the file input and press the Stop button to terminate the current script. The supported commands are read, write, and log. The user can only apply read and write commands to the registers present in the Register Map page. See the code block below for an example.

/** Texas Instruments Javascript sample script for reading registers, writing registers and checking CDR lock.*/

const SCRIPT_START_MESSAGE = 'Script Started';
const SCRIPT_END_MESSAGE = 'Script Ended';

function main() { 
/* Log to text file */
log(SCRIPT_START_MESSAGE);

/* Select the CDR Registers Page by writing to register 0xFF (channel_control4) */
write('channel_control_4', 0x04); 

/* Defines a variable */
let CDRLockValue;

/* Read the CDR lock value register and log the value. If the CDR is locked the output will read 0x39 (57 in decimal).*/
CDRLockValue = read("channel_sm_1");
log("The CDR lock value register reads " + CDRLockValue + " in decimal");

/* Log to text file */
log(SCRIPT_END_MESSAGE)
}