SNAU303A May 2024 – September 2024
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)
}