Hi..
I am working on MCB2300(LPC2387) board. I have made one application to send and receive data through TCP and the same time I am trying to toggle LEDs connected on port0. I have used demo code of TCP_listen provided by keil. The problem is when I run the program leds are blinking but my board could not connect with LAN and if I remove the portion of LEDs from main the board will connect.. But I want to run both at same time..
Below is the main function of my code.
int main (void) { char ia[SENDLEN]; int ic = 1; init (); init_TcpNet (); GPIOInit( 0, FAST_PORT, DIR_OUT ); GPIO_Address = 0x00000004; // port 0.2 for(ic = 0 ;ic < SENDLEN; ic++) { ia[ic] = ic+1; } socket_tcp = tcp_get_socket (TCP_TYPE_CLIENT, 0, 10, tcp_callback); while(1) { timer_poll (); main_TcpNet (); if(wait_ack == 0) { send_data(ia); } STB1_Channel_Change(); Channel_Change_Delay(GPIO_Address); } }
if you want to see code of TCP, you can refer it from the demo codes provided by keil. I can not paste whole program here. please bear with me.
Any one has any idea about this problem?? Please let me know..
Thanks