I am using LPC1788 conrtex M3 microcontroller and trying to configure its e ETHERNET port by using CMSIS RTOS2 RTX5.I am able to run other drivers like UART , TIMERS , and GPIO's using RTOS2 RTX5.But facing some issues to run ETHERNET.
microcontroller - LPC1788 M3Phy IC - LAN8720Driver - ETH MAC 0Interface - RMIIIDE and Compiler - Keil microvision-5software development suite - MDK-PlusRTOS - RTOS2 RTX5 version 5.5.0
Please find attached c files and Configuration setting I have done in my project.
I am calling netInitialize(); function from main()it returns me "netOK" that means Network Core initialized successfully
Then I am calling netTCP_GetSocket function and passing "tcp_cb_server" call back function as an argument it as below
tcp_sock = netTCP_GetSocket(tcp_cb_server);if (tcp_soo itck > 0) { netTCP_Listen(tcp_sock, 2000);}
I am getting tcp_sock = 1, I am checking status of the socket created "tcp_sock" using function socket_status = netTCP_GetState(tcp_sock);it returns me "netTCP_StateLISTEN"means socket is listen mode.but when I try to connect through Hyperterminal unable to established a connection Please find attched code and configuration settings.Please help on high priority
In Pack Installer of uVision, you can find multiple network example projects. Install the latest DFP pack v2.5.0 and copy the "BSD Server" example project as a start. It has been well tested and should work fine.
Note that these example projects from the DFP v2.5.0 are still based on the old RTXv4.x (CMSIS RTOSv1). You can follow this page to migrate these examples to RTXv5.x (CMSIS RTOSv2)
https://arm-software.github.io/CMSIS_5/RTOS2/html/os2MigrationGuide.html
Eventually, only saying "unable to established a connection " won't help much at all. You can follow this article to enable network debug output so that you can know at which point your program failed http://www.keil.com/support/docs/3982.htm
Dear sir,
Thanks for the reply. I have one doubt related to net_initialize function. when I enter Main() function I am first calling Kernel initializing function and
below that I am just calling netinitialize function. I am not doing any other ethernet initialization.
So is it ok, or do I need to add additional code / function for ehternet initialization or netinitilize handles everything.
please check below code and setting which I have made in my project.
int main (void) { SystemCoreClockUpdate();
osKernelInitialize(); // Initialize CMSIS-RTOS netInitialize();
tid_myUART1_Thread = osThreadNew(uart_one_thread, NULL, NULL); // Create application main thread tcp_sock = netTCP_GetSocket(tcp_cb_server); if (tcp_sock > 0) { netTCP_Listen(tcp_sock, 2000); }
osKernelStart(); // Start thread execution for (;;) {}
Thanks & Regards,
Amit Dalvi