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.

CCS/F28M35H52C: Connecting GUI WebApp/Standalone to running Flash of C28

Part Number: F28M35H52C


Tool/software: Code Composer Studio

Hello,

I have programmed the Cortex M3 and the C28 in flash. Both are starting directly their program, if I switch on the power supply. That's exactly what they should do.

In some cases it is necessary to connect the C28 target to a stand alone GUI. I designed a GUI in Code Composer 6.1.1, exported it and run it with guicomposer as a webapp. For this, I build an appConfig.ccxml for the webapp-folder, which enables a bypass for the cortex_M3 (build out of CCS). The connection and loadProgram just focusses on the C28.

BUT: It seems, that the loadProgram just works, if the M3 and the C28 are not running before. If I flash the M3 and just erase the flash of the C28 in CCS, I can afterwards program the C28 from the web app. If I make a start with power off/on, it is not possible to programm from webapp.

What do I have to do, to get access to the C28 with the webapp (to load the program)? Or is it possible just to connect without new flashing? I already comment the lines:

    print("Loading program: "+appProgramFile+"\n");
    session.memory.loadProgram(appProgramFile /* internal variable */);

in the appInitScript.js. Then it seems to be connected, but the GUI does not work (red symbols on the widgets).

 

best regards,

Benjamin

  • Benjamin,

    When you try to connect C28x, can you confirm that M3 is connected and is executing a valid code (not causing any resets) OR M3 is connected and halted?

    I see you mentioned bypassed - hence want to make sure it is connected and is in a valid state.

    Thanks and regards,
    Vamsi
  • Vamsi,

    when I connect over the "gui composer" webapp, the "appInitScript.js" just connets to one core. That's why I bypassed the M3, because the main program runs on the C28. So gui composer will not be connected to the M3. I don't know, how to realise both to be connected and if it is needed.

    But, I can watch one LED, wich is on, when the M3 runs into the "main-function". This happens after a power off/on restart.

    When I debug the M3 and erase the flash of the C28 from CCS, I can afterwards program it from the webapp, but if I restart both cores by power supply off/on, both are booting directly from flash and I can not load the program into the C28. Without the loadProgram-call, the connection is established, but I can not debug or control from the gui webApp, respectively. Here is the code of the appInitScript.js:

    importPackage(Packages.com.ti.ccstudio.scripting.environment)
    
    function initTarget() {
    	var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1");
    
    	print("Initializing target : " + appConfigFile+"\n");
    	debugServer.setConfig(appConfigFile /* internal variable */);
    	var session = debugServer.openSession("*", "*" /* TODO: */);
    
    	//session.options.setBoolean("UseLegacyStopMode", true);
    	
    	if (!session.target.isConnected()) {
    		print("Connecting target: "+session.getName()+"\n");
    		session.target.connect();
    	}
    	
    	print("Loading program: "+appProgramFile+"\n");
    	session.memory.loadProgram(appProgramFile /* internal variable */);
    	
    	print("Enabling Realtime\n");
    	session.expression.evaluate("ST1.DBGM = 0");
    	session.expression.evaluate("GEL_EnableRealtime()");
    	
    	print("Running Program...\n");
    	session.target.runAsynch();
    }
    
    initTarget();

    Error, when both are already running in flash (recognizable through LEDs):

  • Benjamin,

    Please take a look at section "1.4 WIR Mode" in TRM at www.ti.com.cn/.../spruh22h.pdf.
    Wait-in-reset mode can help in this scenario.

    Thanks and regards,
    Vamsi
  • Benjamin,

    Are you able to use WIR mode?
    Can I close this post?

    Thanks and regards,
    Vamsi
  • Benjamin,

    I am closing this post assuming that you are able to use the suggested WIR mode to program the device successfully.
    If you still have issues, you can reopen this post. If the post gets locked, you can use the "Ask a related question" button at the top right corner to post a related question.

    Thanks an regards,
    Vamsi
  • Hello Vamsi,

    I just flow through the section WIR mode and think this could work. But I had no time till now. I will try it this or next week! thanks a lot for your help.

    best regards,
    Benjamin