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.

program running in infinite loop

Respected Sir/Madam

I am having a problem that my programs are running in infinite loop when i am using BlackHawk's USB560-M JTAG,while the same programs i run using Spectrum Digital's XDS510 emulator,program run fine. So why it is showing this reapeating loop while using 560-M. While running "Client" program ,i look at where it stuck,i found that my program executes the function "void CPSW3G_getConfig( Uint8 *pMacAddr, Uint32 *pIntVector)" again and again. Thats why i got on console repeatedly :

Using MAC Address:

Using MAC Address:

Using MAC Address:.........................

when i look at the tasks which are running,task ti_ndk_config_Global_stackThread is running all the time and program is executing HwPktInit() function of ethernetdriver.c repeatedly and that why it is showing this behavior. Can you plz help me in this regard. Did i miss anything or something else i need to correct ? since programs are running well while using XDS510 JTAG. i am not understanding why these are not running correct using 560-M JTAG. I am using CCS V 4.2.2.00033 and my target board is TMDXEVM8148. I also tried with different TCLK (in .ccxml file) for 560-M JTAG but of no use.

i am also attaching GEL files i used for both the JTAG(different files)

For USB 560-M:

7840.New_Centaurus_20Mhz_Si_omx.txt

//Created by Shreyas Prasad (shreyasp@ti.com)

#define PRCM_BASE_ADDR			0x48180000

#define WR_MEM_32(addr, data)    *(unsigned int*)(addr) =(unsigned int)(data)
#define RD_MEM_32(addr) 	  	 *(unsigned int*)(addr)
#define UWORD32 			     unsigned int

#define CM_ALWON_SPINBOX_CLKCTRL    (PRCM_BASE_ADDR + 0x1598)
#define CM_ALWON_MAILBOX_CLKCTRL    (PRCM_BASE_ADDR + 0x1594)
#define CM_ALWON_L3_SLOW_CLKSTCTRL	(PRCM_BASE_ADDR + 0x1400)

hotmenu enableSpinlocks()
{
    GEL_TextOut("\tPRCM for spinlock Initialization in Progress \n","Output",1,1,1);	 
    									
    WR_MEM_32(CM_ALWON_L3_SLOW_CLKSTCTRL, 2);    
    WR_MEM_32(CM_ALWON_SPINBOX_CLKCTRL,   2);    
    /* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
    while(((RD_MEM_32(CM_ALWON_SPINBOX_CLKCTRL)&0x30000)>>16)!=0);

	GEL_TextOut("\tspinlock Accesses are PASSED \n","Output",1,1,1);	 										
    GEL_TextOut("\tspinlock Initialization in Done \n","Output",1,1,1);	 									
}
hotmenu enableMaiboxes()
{
    GEL_TextOut("\tPRCM for mailboxes Initialization in Progress \n","Output",1,1,1);	 									

    WR_MEM_32(CM_ALWON_L3_SLOW_CLKSTCTRL, 2);    
    WR_MEM_32(CM_ALWON_MAILBOX_CLKCTRL,   2);    
    /* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
    while(((RD_MEM_32(CM_ALWON_MAILBOX_CLKCTRL)&0x30000)>>16)!=0);
	
	GEL_TextOut("\tmailboxes Accesses are PASSED \n","Output",1,1,1);	 										
    GEL_TextOut("\tPmailboxes Initialization in Done \n","Output",1,1,1);	 									
}

OnTargetConnect()
{
	GEL_LoadGel("$(GEL_file_dir)\\New_Centaurus_20MHz_Si_omx.gel");
	GEL_TextOut("--->>> Starting A8 <<<---\n");

/*
	DucatiClkEnable();
	GEMSSClkEnable();
	
	Unlock_PLL_Control_MMR();
	ControlModule_ClkEnable();
	
	PLL_CLOCKS_Config();
	//PrcmAlwayOnClkEnable(); //does not come out of loop
	DDR2_Initialization();
	//L3_PLL_Config();
	//SATA_PLL_Config();
	Ethernet_PinMux_Setup();
	
	enableMaiboxes();
	enableSpinlocks();
*/

	OmxInit();
	Ethernet_PinMux_Setup();
}

for XDS 510:

4527.Copy of New_Centaurus_20Mhz_Si.txt

//Created by Shreyas Prasad (shreyasp@ti.com)

#define PRCM_BASE_ADDR			0x48180000

#define WR_MEM_32(addr, data)    *(unsigned int*)(addr) =(unsigned int)(data)
#define RD_MEM_32(addr) 	  	 *(unsigned int*)(addr)
#define UWORD32 			     unsigned int

#define CM_ALWON_SPINBOX_CLKCTRL    (PRCM_BASE_ADDR + 0x1598)
#define CM_ALWON_MAILBOX_CLKCTRL    (PRCM_BASE_ADDR + 0x1594)
#define CM_ALWON_L3_SLOW_CLKSTCTRL	(PRCM_BASE_ADDR + 0x1400)

hotmenu enableSpinlocks()
{
    GEL_TextOut("\tPRCM for spinlock Initialization in Progress \n","Output",1,1,1);	 
    									
    WR_MEM_32(CM_ALWON_L3_SLOW_CLKSTCTRL, 2);    
    WR_MEM_32(CM_ALWON_SPINBOX_CLKCTRL,   2);    
    /* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
    while(((RD_MEM_32(CM_ALWON_SPINBOX_CLKCTRL)&0x30000)>>16)!=0);

	GEL_TextOut("\tspinlock Accesses are PASSED \n","Output",1,1,1);	 										
    GEL_TextOut("\tspinlock Initialization in Done \n","Output",1,1,1);	 									
}
hotmenu enableMaiboxes()
{
    GEL_TextOut("\tPRCM for mailboxes Initialization in Progress \n","Output",1,1,1);	 									

    WR_MEM_32(CM_ALWON_L3_SLOW_CLKSTCTRL, 2);    
    WR_MEM_32(CM_ALWON_MAILBOX_CLKCTRL,   2);    
    /* Wait for IDLEST to read 0x0 indicating that the module is fully functional */
    while(((RD_MEM_32(CM_ALWON_MAILBOX_CLKCTRL)&0x30000)>>16)!=0);
	
	GEL_TextOut("\tmailboxes Accesses are PASSED \n","Output",1,1,1);	 										
    GEL_TextOut("\tPmailboxes Initialization in Done \n","Output",1,1,1);	 									
}

OnTargetConnect()
{
	GEL_LoadGel("$(GEL_file_dir)\\New_Centaurus_20MHz_Si.gel");
	GEL_TextOut("--->>> Starting A8 <<<---\n");
	
	DucatiClkEnable();
	GEMSSClkEnable();
	
	Unlock_PLL_Control_MMR();
	ControlModule_ClkEnable();
	
	PLL_CLOCKS_Config();
	//PrcmAlwayOnClkEnable(); //does not come out of loop
	DDR2_Initialization();
	//L3_PLL_Config();
	//SATA_PLL_Config();
	Ethernet_PinMux_Setup();
	
	enableMaiboxes();
	enableSpinlocks();
}

Thanks in advance.