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

Files at this revision

API Documentation at this revision

Comitter:
kzl108
Date:
Sun May 17 11:12:56 2015 +0000
Parent:
0:412f9c1172b7
Commit message:
Test with Nucleo-F103RB

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 412f9c1172b7 -r 9a6af61c5eb4 main.cpp
--- 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();
diff -r 412f9c1172b7 -r 9a6af61c5eb4 mbed.bld
--- a/mbed.bld	Mon Apr 27 00:23:46 2015 +0000
+++ b/mbed.bld	Sun May 17 11:12:56 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058
\ No newline at end of file