t

Dependencies:   DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos

Fork of DMSupport by Embedded Artists

Revision:
27:0499c29688cc
Parent:
26:a65fbb4bde5c
Child:
28:8ae20cb0b943
diff -r a65fbb4bde5c -r 0499c29688cc Bios/BiosLoader.cpp
--- a/Bios/BiosLoader.cpp	Thu Jan 22 16:04:54 2015 +0100
+++ b/Bios/BiosLoader.cpp	Fri Jan 23 13:48:44 2015 +0100
@@ -60,7 +60,6 @@
  * Local variables
  *****************************************************************************/
 
-
 /******************************************************************************
  * Private Functions
  *****************************************************************************/
@@ -197,6 +196,15 @@
         break;
       }
       
+      // The BIOS has been read so we know that the I2C bus is working. After the
+      // BIOS is "started" it will take ownership of the bus and it can cause
+      // problems for other peripherals on it. The only other peripheral today
+      // is the EEPROM with the MAC address. It is read by mbed_mac_address() in
+      // ethernet_api.c in the SDK and it will be cached. By reading it here now
+      // we prevent future access to the I2C bus.
+      char mac[6] = {0};
+      mbed_mac_address(mac);
+      
       // Extract the function pointers so that they can be modified to match the
       // actual location of the code
       file_header_t* file_header = (file_header_t*)p;