TCP Echo example of W5500 Ethernet Kit for IoT, Test with Nucleo-F103RB

Dependencies:   WIZnet_Library mbed

Dependents:   F103RB_tcp_rtu_modbus_copy_v1_0

Fork of W5500HelloWorld by WIZnet

Revision:
1:9a6af61c5eb4
Parent:
0:412f9c1172b7
--- a/main.cpp	Mon Apr 27 00:23:46 2015 +0000
+++ b/main.cpp	Sun May 17 11:12:56 2015 +0000
@@ -14,8 +14,11 @@
 Serial pc(USBTX, USBRX);
 
 #ifdef TARGET_LPC11U68
-SPI spi(P0_9,P0_8,P1_29);
-WIZnetInterface ethernet(&spi,P0_2,P1_13);
+    SPI spi(P0_9,P0_8,P1_29);
+    WIZnetInterface ethernet(&spi,P0_2,P1_13);
+#elif defined(TARGET_NUCLEO_F103RB)
+    SPI spi(PA_7, PA_6, PA_5); // mosi, miso, sclk
+    WIZnetInterface ethernet(&spi, PB_6, PA_9);//scs(PB_6), nRESET(PA_9); // reset pin is dummy, don't affect any pin of WIZ550io
 #endif
 
 int main() {
@@ -24,8 +27,8 @@
     
     //Set serial port baudrate speed: 115200
     pc.baud(115200);
-    
-    pc.printf("Start\r\n");
+    wait(10);
+    pc.printf("W5500 Application Started \r\n");
 
     char buffer[256];
     
@@ -37,6 +40,14 @@
         int ret = ethernet.init(MAC_Addr,IP_Addr,IP_Subnet,IP_Gateway);
         #endif
         
+        
+        printf("SPI Initialized \r\n");
+        wait(1); // 1 second for stable state
+        
+        printf("W5500 Networking Started \r\n");
+        wait(1); // 1 second for stable state
+        
+        
         if (!ret) {
             pc.printf("Initialized, MAC: %s\r\n", ethernet.getMACAddress());
             ret = ethernet.connect();