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/TMS320F280049: Reset and restart on CCS debug

Part Number: TMS320F280049


Tool/software: Code Composer Studio

Champs,

I am asking this for our customer.

On CCS debug window, there are “CPU reset” and “restart”.

Would you please explain the purposes and difference of these two options?

Is there any difference when using CPU reset->Run and CPU reset->restart->Run?

Wayne Huang

  • Wayne,

    There is some information in the CCS Help on this.  

    If you go to the help navigate to here:

    Then you can see this table on the right:

    However it is not as simple as that as the GEL initialization file my specify additional actions.  The file for F280049 does.

    The OnReset() function below will be called when you do a Reset and the OnRestart function will get called on a restart.

    As to your question if there is any difference between CPU Reset -> Run and CPU Reset -> Restart -> Run.  In the second one clearly extra steps are performed.  

    OnReset(int nErrorCode)
    {
    
        *(int *)0x5FB00 = 0; 		/* Disable Flash ECC */
        *(int *)0x7029 = 0x68;  		/* Disable WD */
        
        *(unsigned long *)0x7060 = 0x0001;  /* Enable NMI */
        
        SetupDCSM();  						/* Initialize DCSM */
    
        SetupErrorStatusPin();              /* setup error status pin */
        
        Device_Config();
        
        CLA_Clock_Enable();
        
        if (GEL_IsInRealtimeMode())     /* If in real-time-mode */
    	{
    	}
    	else                            /* Put device into C28x Mode */
    	{
    	  C28x_Mode();   
    	}
    
    }
    
    OnRestart(int nErrorCode)
    {
    /* CCS will call OnRestart() when you do a Debug->Restart and   */
    /* after you load a new file.  Between running interrupt based  */
    /* programs, this function will clear interrupts and help keep  */
    /* the processor from going off into invalid memory.            */
        if (GEL_IsInRealtimeMode())     /* If in real-time-mode */
    	{
    	}
    	else                            /* Put device into C28x Mode */
    	{
    	  C28x_Mode();   
    	}
         IER = 0;
         IFR = 0;
    }

    Regards,

    John