Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: The Execution behavior with and without debugger connected is different

$
0
0

Hello,

My target is a TMS320F28335 Rev A.

When I run the target without the XDS100v2 connected, some bug occurs 111 seconds after power-up.

That bug doesn't occur if I am debugging with the XDS100v2.

Free running the target with the debugger doesn't change the situation.

I included the relevant gel functions below.

I couldn't find GEL_Reset(). Where is that function located?

The only gel function that might have made a difference is C28x_Mode(), but my application sets those in code_start (In CodeStartBranch.asm).

What could be causing the diffence?

Stephen

StartUp() {  /* The next line automatically loads the .gel file that comes   */ /* with the DSP2833x Peripheral Header Files download.  To use, */ /* uncomment, and copy the peripheral header .gel file to   */ /* same directory as device .gel file.                          */ //  GEL_LoadGel("$(GEL_file_dir)\\DSP2833x_Peripheral.gel");  }  OnReset(int nErrorCode) {     if (GEL_IsInRealtimeMode())   /* If in real-time-mode */     {     }     else    /* Put device in C28x mode */     {          C28x_Mode();     }     Unlock_CSM();     ADC_Cal(); //  XINTF_Enable();               /* Uncomment to enable XINTF on Reset */     }  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 in C28x mode */     {          C28x_Mode();     }      IER = 0;      IFR = 0;      ADC_Cal(); }  OnPreFileLoaded() {     GEL_Reset(); }  OnFileLoaded(int nErrorCode, int bSymbolsOnly) {  if (!bSymbolsOnly) {      ADC_Cal();  } }  OnTargetConnect() {     if (GEL_IsInRealtimeMode())   /* If in real-time-mode */     {     }     else    /* Put device in C28x mode */     {          C28x_Mode();     }     F28335_Memory_Map();            /* Initialize the CCS memory map */  /* Check to see if CCS has been started-up with the DSP already */ /* running in real-time mode.  The user can add whatever        */ /* custom initialization stuff they want to each case.          */      if (GEL_IsInRealtimeMode())     /* Do real-time mode target initialization */     {      }     else                            /* Do stop-mode target initialization */     {         GEL_Reset();                /* Reset DSP */     }  }  hotmenu C28x_Mode() {     ST1 = ST1 & (~0x0100);      /*   AMODE = 0  */     ST1 = ST1 | 0x0200;         /* OBJMODE = 1  */ }  hotmenu ADC_Cal() {     /* Perform dummy reads of the password locations */     XAR0 = *0x33FFF8;     XAR0 = *0x33FFF9;     XAR0 = *0x33FFFA;     XAR0 = *0x33FFFB;     XAR0 = *0x33FFFC;     XAR0 = *0x33FFFD;     XAR0 = *0x33FFFE;     XAR0 = *0x33FFFF;       if(((*0x0AEF) & 0x0001) == 0)     {         XAR0 = *0x701C;         *0x701C |= 0x0008;      *0x711C = *0x380083;         *0x711D = *0x380085;         *0x701C = XAR0;      XAR0 = 0;      }     else     {         GEL_TextOut("\nADC Calibration not complete, check if device is unlocked and recalibrate.");     } }  hotmenu F28335_Memory_Map() {     GEL_MapReset();     GEL_MapOn();      /* Program memory map */     GEL_MapAdd(0x0,0,0x400,1,1);                 /* M0 SARAM        */     GEL_MapAdd(0x400,0,0x400,1,1);               /* M1 SARAM        */     GEL_MapAdd(0x4000,0,0x1000,1,1);             /* Zone 0          */     GEL_MapAdd(0x8000,0,0x1000,1,1);             /* L0 SARAM        */     GEL_MapAdd(0x9000,0,0x1000,1,1);             /* L1 SARAM        */     GEL_MapAdd(0xA000,0,0x1000,1,1);             /* L2 SARAM        */     GEL_MapAdd(0xB000,0,0x1000,1,1);             /* L3 SARAM        */     GEL_MapAdd(0xC000,0,0x1000,1,1);             /* L4 SARAM        */     GEL_MapAdd(0xD000,0,0x1000,1,1);             /* L5 SARAM        */     GEL_MapAdd(0xE000,0,0x1000,1,1);             /* L6 SARAM        */     GEL_MapAdd(0xF000,0,0x1000,1,1);             /* L7 SARAM        */     GEL_MapAdd(0x100000,0,0x100000,1,1);         /* Zone 6          */     GEL_MapAdd(0x200000,0,0x100000,1,1);         /* Zone 7          */     GEL_MapAdd(0x300000,0,0x40000,1,0);          /* FLASH           */     GEL_MapAdd(0x380080,0,0x00009,1,0);          /* ADC_cal function*/     GEL_MapAdd(0x380090,0,0x00001,1,0);          /* PARTID value    */     GEL_MapAdd(0x380400,0,0x00400,1,0);          /* OTP             */     GEL_MapAdd(0x3f8000,0,0x1000,1,1);           /* L0 SARAM Mirror */     GEL_MapAdd(0x3f9000,0,0x1000,1,1);           /* L1 SARAM Mirror */     GEL_MapAdd(0x3fA000,0,0x1000,1,1);           /* L2 SARAM Mirror */     GEL_MapAdd(0x3fb000,0,0x1000,1,1);           /* L3 SARAM Mirror */     GEL_MapAdd(0x3fe000,0,0x2000,1,0);           /* BOOT ROM        */      /* Data memory map */     GEL_MapAdd(0x000,1,0x400,1,1);               /* M0 SARAM        */     GEL_MapAdd(0x400,1,0x400,1,1);               /* M1 SARAM        */     GEL_MapAdd(0x800,1,0x1800,1,1);               /* PF0             */     GEL_MapAdd(0x4000,1,0x1000,1,1);             /* Zone 0          */     GEL_MapAdd(0x5000,1,0x1000,1,1);             /* PF3             */     GEL_MapAdd(0x6000,1,0x1000,1,1);             /* PF1             */     GEL_MapAddStr(0x7000,1,0x1000,"R|W|AS2",0);  /* PF2             */     GEL_MapAdd(0x8000,1,0x1000,1,1);             /* L0 SARAM        */     GEL_MapAdd(0x9000,1,0x1000,1,1);             /* L1 SARAM        */     GEL_MapAdd(0xA000,1,0x1000,1,1);             /* L2 SARAM        */     GEL_MapAdd(0xB000,1,0x1000,1,1);             /* L3 SARAM        */     GEL_MapAdd(0xC000,1,0x1000,1,1);             /* L4 SARAM        */     GEL_MapAdd(0xD000,1,0x1000,1,1);             /* L5 SARAM        */     GEL_MapAdd(0xE000,1,0x1000,1,1);             /* L6 SARAM        */     GEL_MapAdd(0xF000,1,0x1000,1,1);             /* L7 SARAM        */     GEL_MapAdd(0x100000,1,0x100000,1,1);         /* Zone 6          */     GEL_MapAdd(0x200000,1,0x100000,1,1);         /* Zone 7          */     GEL_MapAdd(0x300000,1,0x40000,1,0);          /* FLASH           */     GEL_MapAdd(0x380400,1,0x00400,1,0);          /* OTP             */     GEL_MapAdd(0x380080,1,0x00009,1,0);          /* ADC_cal function*/     GEL_MapAdd(0x380090,1,0x00001,1,0);          /* PARTID value    */     GEL_MapAdd(0x3f8000,1,0x1000,1,1);           /* L0 SARAM Mirror */     GEL_MapAdd(0x3f9000,1,0x1000,1,1);           /* L1 SARAM Mirror */     GEL_MapAdd(0x3fA000,1,0x1000,1,1);           /* L2 SARAM Mirror */     GEL_MapAdd(0x3fb000,1,0x1000,1,1);           /* L3 SARAM Mirror */     GEL_MapAdd(0x3fe000,1,0x2000,1,0);           /* BOOT ROM        */ }   


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>