index 076a05990e989b970914ecc16c230eaf5062c9ae..5d46f68024eab550dcca9293b47e436c132e1b18 100644 (file)
--- a/am335x-ddr-analysis.dss
+++ b/am335x-ddr-analysis.dss
var filename = userHomeFolder + '/Desktop/' + 'am335x-ddr-analysis' + filename_date + '.txt';
debugSessionDAP = ds.openSession("*","CS_DAP_M3");
+use_dap_m3 = 1;
try {
debugSessionDAP.target.connect();
debugSessionDAP.target.disconnect();
debugSessionDAP = ds.openSession("*","CS_DAP_DebugSS");
debugSessionDAP.target.connect();
+ use_dap_m3 = 0;
}
var original_CM_WKUP_DEBUGSS_CLKCTRL = debugSessionDAP.memory.readWord(0,0x44e00414,false);
file.write(" = 0x" + d2h(reg_val) + "\n"); // Raw Reg Val
}
- // Close (Main) DAP session and use M3 DAP to view Control Registers
- debugSessionDAP.target.disconnect();
- debugSessionDAP = ds.openSession("*","CS_DAP_M3");
- debugSessionDAP.target.connect();
+ if ( use_dap_m3 == 1 ) {
+ // Close (Main) DAP session and use M3 DAP to view Control Registers
+ debugSessionDAP.target.disconnect();
+ debugSessionDAP = ds.openSession("*","CS_DAP_M3");
+ debugSessionDAP.target.connect();
+ }
// Restore CM_WKUP_DEBUGSS_CLKCTRL[MODULEMODE]
if ( (original_CM_WKUP_DEBUGSS_CLKCTRL & 3) == 0 ) {