savannah-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-users] Problem account


From: David Durand
Subject: [Savannah-users] Problem account
Date: Fri, 15 Oct 2010 15:28:40 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

 Hello,

I'm writing to you cause i tried to create an account in order to write a form on the help forum, but i get error and i cannot create a user account.


If you can directly help me concerning the LWIP this is my problem :

I try to use the LWip on a PPC440 on a xilinx virtex5. I took an "echo server" code that i modified a bit in order to match my needs.

Actually my code is working sometime and sometime not, and i cannot figure out the reason.

My environment is :
- I have an evaluation board with a xilinx FPGA and the PPC on it
- I have a software
- I try to connect my software on the board
- When it's work, the sw send frame and ack to the board and the board send back frame and ack until a connection is established.

Problem is :
- Frames that are coming back from the board should be this type:
     46c3c3c3
     c318code
     52000000
     ........
- but when it doesn't work the header and only this one have strange value for example :
     aaaaaaaa
     c318code
     52000000
     ........
- Cause of that the connection is not established between the board and the software.

the code i'm using to send the frame back is :
err_t hello_poll(void *arg, struct tcp_pcb *pcb)
{
   u8_t *state = (u8_t *)arg;

if (*state == 3) /* close received and hello world send */
      if (tcp_close(pcb) == ERR_OK)
         hello_end(pcb, state);

        Xuint32 Fifo_datain;
        Xuint32 Fifo_Empty;

Fifo_Empty = CUSTOM_IP_TCP_FIFO_mReadFIFOEmpty(XPAR_CUSTOM_IP_TCP_FIFO_0_BASEADDR);
        //xil_printf("\tFifo_Empty register : 0x%X\r\n",Fifo_Empty);

        if (Fifo_Empty==0x00000000)

            //xil_printf("\tFifo is not empty\r\n");
Fifo_datain = CUSTOM_IP_TCP_FIFO_mReadFromFIFO(XPAR_CUSTOM_IP_TCP_FIFO_0_BASEADDR, 0);
            //xil_printf("\tFifo_datain register : 0x%X\r\n",Fifo_datain);
            Xuint32* data1;
            *data1=Fifo_datain;
            tcp_write(pcb, data1, sizeof(Fifo_datain), 1);
            //tcp_output(pcb);
Fifo_Empty = CUSTOM_IP_TCP_FIFO_mReadFIFOEmpty(XPAR_CUSTOM_IP_TCP_FIFO_0_BASEADDR);
        }
   return ERR_OK;
}


before the line "tcp_write" the value of "data1" is the good one (c3c3c346). I can check it by send "data1" on the output uart.

I really don't understand the problem cause it sometime work... Please can you help me cause i'm really confused.

Thank you
David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]