Altera_Forum
Honored Contributor
13 years agoError: Eclipse (Code Stuck at printf function) Incompatible 2 value with TX_CMD_STAT
InterNiche Portable TCP/IP, v3.1
Copyright 1996-2008 by InterNiche Technologies. All rights reserved. prep_tse_mac 0 Your Ethernet MAC address is 00:07:ed:11:83:04 prepped 1 interface, initializing... [tse_mac_init] INFO : TSE MAC 0 found at address 0x0b482000 INFO : PHY Marvell 88E1111 found at PHY address 0x10 of MAC Group[0] INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... INFO : PHY[0.0] - Auto-Negotiation PASSED MARVELL : Mode changed to RGMII/Modified MII to Copper mode MARVELL : Enable RGMII Timing Control MARVELL : PHY reset INFO : PHY[0.0] - Checking link... INFO : PHY[0.0] - Link not yet established, restart auto-negotiation... INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... INFO : PHY[0.0] - Auto-Negotiation PASSED INFO : PHY[0.0] - Link established INFO : PHY[0.0] - Speed = 100, Duplex = Full OK, x=0, CMD_CONFIG=0x00000000 [tse_mac_init] Error: Incompatible 2 value with TX_CMD_STAT register return TxShift16 value. init error -11 on net[0] mctest init called IP address of : 192.168.1.207 Created "Inet main" task (Prio: 2) Created "clock tick" task (Prio: 3) Simple Socket Server starting up Initillize the Enhanced Interrupt.. Enhnace interrupt ENABLED, Return value = 0 Created "simple socket server" task (Prio: 4) RS232 Port Open....!! ----Ready to Receive Interrupt---- # Synchronous Data received...!! and then code stuck after displaying "#synchronous data received...!!"
void SSSSimpleSocketServerTask()
{
unsigned int LPktCount = 0;
unsigned int Count = 0;
unsigned int DataCount = 0;
unsigned char ImgData = 0;
unsigned int test = 0;
//--------------------------Receive From RS-422 Port @ 1 mbps-------------------------------------------
printf("\n\t\t----Ready to Receive Interrupt----\n");
while(1)
{
do
{
if( edge_capture) //w.r.t. clock or LOAD Pulse from "sync_detect"
{
edge_capture = 0;
ImgBuff = IORD_ALTERA_AVALON_PIO_DATA(DATA_BASE);
}
if(Count == PktSize-1)
{
Count = 0;
LPktCount++;
}
}while(LPktCount != (PktCount+1));
printf("\n\t#Synchronous Data received...!!"); //Code stuck at this Line
//----------------------Sending to RS-232 -------------------------------------------------------
printf("\n\t#Sending Data at RS232 Port at 115kbps...\n");
Xstart = 0;
Ystart = 0;
LPktCount = 0;
printf("\n\t# Send Sync Word..");
for(Count = 0; Count<=2;Count++)
{
fprintf(fp,"%c",strt_sync);
printf("\t%d",strt_sync);
}
for(LPktCount = 0+Ystart; LPktCount<mPktCount;LPktCount++) //
{
for(DataCount = 0; DataCount<mPktSize;DataCount++)
{
ImgData = ImgBuff;
fprintf(fp,"%c",ImgData);
}
printf("#");
}
}
}