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.

AM2432: Can we execute "system reset" automatically whenever doing "debug session" again in CCS?

Part Number: AM2432

Hi Expert,

When I worked on implementing GPIO interrupt handler, I found the "system reset" is required when I stop and just re-do a "debug session" without our code calling "Sciclient_rmIrqRelease". A problem happened like capture image below. This is captured in gipo interrupt handler example in SDK.

If I am wrong, please correct me. I think doing "system reset" manually every time would be bothering during development. Could you share knowledge or experience to avoid this situation? I just guess there could be a tip like doing a system reset automatically with a setting in CCS.

Regards,

Moonil

  • Hi Moonil,

    Our SW team doesn't recommend using system reset between reruns but the power on reset or cold reset. Can you please try with PORz?

    Regards,

    Prasad

  • Hi Prasad,

    Thank you for your prompt response.

    Do you mean we have to do power on/off whenever rerun "debug session" in CCS? My question was about how to do it automatically in CCS. In my test, the system reset works. Could let me know more about how to do PORz in CCS? Is there any setting?

    Regards,

    Moonil

  • Hi Moonil,

    Actually I meant manually turning board on and off as CCS doesn't provide a way to do cold reset I believe. 

    Regardless, as system reset works for your app (SW team doesn't recommend it as they don't validate it but there should not be any other issues otherwise).

    Below is way initiate the warm reset via CCS in Gel.

    GEL_AdvancedReset ( "System Reset" );

    7.9.8.3. GEL_AdvancedReset() — Code Composer Studio 11.1.0 Documentation

    Same can be called from CCS scripting console.

    Regards,

    Prasad

  • Hi Prasad,

    I tested "GEL_AdvancedReset("System Reset" ); after chaging "CPU_reset.gel" as below.

    in "CPU_reset.gel" files,

    OnPreFileLoaded()
    {
        //GEL_Reset();
        //GEL_TextOut("CPU reset (soft reset) has been issued through GEL.\n");
        GEL_AdvancedReset ( "System Reset"); 
        GEL_TextOut("CPU reset (system reset) has been issued through GEL.\n");

    }

    but, it didn't work in the same way with "System Reset" in the menu of CCS.

    When I did  "System Reset" in the menu of CCS, I saw SBL was executed as logs below and the next debug session worked well.

    I expected that GEL_AdvancedReset ( "System Reset") made SBL run and the same as the log above could be shown, but SBL didn't run.

    What is the difference between GEL_AdvancedReset ( "System Reset") and "System Reset" in the menu of CCS?

    I would appreciate it if you share your knowledge and how to do "System Reset" to run SBL in GEL in more detail.

    Best,

    Moonil

  • Hello Moonil,

    What is the difference between GEL_AdvancedReset ( "System Reset") and "System Reset" in the menu of CCS?

    They should be the same. I believe when a "System Reset" is issued from the menu of CCS, it actually calls GEL_AdvancedReset to issue the system reset.

    I'll confirm the engineering

    Thanks

    ki

  • Can you try adding a GEL hotmenu to your GEL file

    menuitem "Test";
    hotmenu ResetTarget()
    {
       GEL_AdvancedReset("System Reset"); 
    }

    Reload the GEL file and then the menu item should show up on the Scripts menu.  Try running the ResetTarget action.  It should show you the same result as running the regular menu.  If that is the case it answers the question on if the "System Reset" menu item and the GEL function do the same thing.

    A big difference between selecting System Reset from the menu or button is that CCS is just going to issue that reset and then do nothing else.  If you are doing it in a script it is going to issue the reset and then when that finishes move on to the next action.  In your case that would be to issue the GEL_TextOut and then load the program.  SBL may never have a chance to run.

  • They should be the same. I believe when a "System Reset" is issued from the menu of CCS, it actually calls GEL_AdvancedReset to issue the system reset.

    I'll confirm the engineering

    I checked with engineering and they agreed.

    In any case, I'd try out what JohnS suggested to confirm on your end.

    ki

  • Hi Ki and JohnS,

    In your case that would be to issue the GEL_TextOut and then load the program.  SBL may never have a chance to run.

    Is there a way to make SBL run whenever doing "debug session" again in CCS?

    Regards,

    Moonil

  • I assume SBL automatically runs after a system reset. Hence the trick is to wait until SBL is done. I suppose one trick is to run some delay after issuing the system reset to give SLB time to run. This is easier to do with a DSS script than a GEL file

    https://software-dl.ti.com/ccs/esd/documents/users_guide/sdto_dss_handbook.html

    Your DSS script can launch a debug session, issue a system reset, then connect to the core and load the program.