[DDR] Add some additional diagnostics for proper operation of script
authorBrad Griffis <bgriffis@ti.com>
Tue, 2 Jul 2019 13:59:14 +0000 (08:59 -0500)
committerBrad Griffis <bgriffis@ti.com>
Tue, 2 Jul 2019 13:59:14 +0000 (08:59 -0500)
am335x-ddr-analysis.dss

index 5bd6b48b4f51bf158d3b03fe1557324366a1a5ee..1957f446b21e76ff3fa41e8b13c6b01d9c5c0ace 100644 (file)
@@ -98,6 +98,8 @@ var seconds2digit = ("0" + today.getSeconds()).slice(-2);
 var filename_date = '_' + year4digit + '-' + month2digit + '-' + day2digit + '_' + hour2digit + minutes2digit + seconds2digit; 
 var userHomeFolder = System.getProperty("user.home");
 var filename = userHomeFolder + '/Desktop/' + 'am335x-ddr-analysis' + filename_date + '.txt';
+file = new java.io.FileWriter(filename);
+var newline = "\n";
 
 debugSessionDAP = ds.openSession("*","CS_DAP_M3");
 use_dap_m3 = 1;
@@ -118,13 +120,13 @@ if (value == 0)
        debugSessionDAP = ds.openSession("*","CS_DAP_DebugSS");
        debugSessionDAP.target.connect();
        use_dap_m3 = 0;
+       file.write("Switched to DAP_DebugSS" + newline);
+       value = debugSessionDAP.memory.readWord(0,0x44e10600,false);
+       file.write("Read value of " + d2h(value) + " from Device_ID register." + newline);
 }
 
 var original_CM_WKUP_DEBUGSS_CLKCTRL = debugSessionDAP.memory.readWord(0,0x44e00414,false);
 var original_CM_PER_L3_CLKSTCTRL = debugSessionDAP.memory.readWord(0,0x44E0000C,false);
-var newline = "\n";
-
-file = new java.io.FileWriter(filename);
 
 // Only try to read EMIF registers if EMIF clock is enabled
 if (original_CM_PER_L3_CLKSTCTRL & 1<<2) {