UUID read and print

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
sam_grove
Date:
Tue Apr 21 23:57:34 2015 +0000
Parent:
8:a9f1c2722cd9
Commit message:
Get all 1289 bits

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r a9f1c2722cd9 -r 3cbea866b809 main.cpp
--- a/main.cpp	Tue Apr 21 23:52:57 2015 +0000
+++ b/main.cpp	Tue Apr 21 23:57:34 2015 +0000
@@ -4,6 +4,8 @@
 {
     unsigned int UUID_LOC_WORD0 = 0x40048060;
     unsigned int UUID_LOC_WORD1 = 0x4004805C;
+    unsigned int UUID_LOC_WORD2 = 0x40048058;
+    unsigned int UUID_LOC_WORD3 = 0x40048054;
 
     // Fetch word 0
     uint32_t word0 = *(uint32_t *)UUID_LOC_WORD0;
@@ -17,8 +19,11 @@
     //word1 |= 0x00000200;
     //word1 &= 0x0000FEFF;
     
+    uint32_t word2 = *(uint32_t *)UUID_LOC_WORD2;
+    uint32_t word3 = *(uint32_t *)UUID_LOC_WORD3;
+    
     //printf("%4x%08x", word1, word0);   // Device id must be in lower case
-    printf("%08x%08x", word1, word0);   // Device id must be in lower case
+    printf("%08x%08x%08x%08x", word3, word2, word1, word0);   // Device id must be in lower case
     
     while(1);
 }