Nucleo_L152RE_W5500HelloWorld_ver2

Dependencies:   SDFileSystem WIZnet_Library mbed

Fork of Nucleo_L152RE_W5500HelloWorld by Edward ahn

Files at this revision

API Documentation at this revision

Comitter:
kzl108
Date:
Sun May 17 11:12:56 2015 +0000
Parent:
0:412f9c1172b7
Child:
2:a2cf65b34267
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
--- 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();
--- 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