Added macros
__UNALIGNED_UINT[16|32]_READ, __UNALIGNED_UINT[16|32]_WRITE.
diff --git a/ARM.CMSIS.pdsc b/ARM.CMSIS.pdsc
index 705775f..6c8073f 100644
--- a/ARM.CMSIS.pdsc
+++ b/ARM.CMSIS.pdsc
@@ -8,6 +8,12 @@
   <url>http://www.keil.com/pack/</url>
 
   <releases>
+    <release version="5.0.2-dev0">
+      CMSIS-Core: 5.0.2 (see revision history for details)
+      - Added macros __UNALIGNED_UINT16_READ, __UNALIGNED_UINT16_WRITE
+      - Added macros __UNALIGNED_UINT32_READ, __UNALIGNED_UINT32_WRITE
+      - Set macro __UNALIGNED_UINT32 to deprecated
+    </release>
     <release version="5.0.1" date="2017-02-03">
       Package Description:
       - added taxonomy for Cclass RTOS
diff --git a/CMSIS/Core/Include/cmsis_armcc.h b/CMSIS/Core/Include/cmsis_armcc.h
index 3ddc308..7b2a284 100644
--- a/CMSIS/Core/Include/cmsis_armcc.h
+++ b/CMSIS/Core/Include/cmsis_armcc.h
@@ -1,8 +1,8 @@
 /**************************************************************************//**
  * @file     cmsis_armcc.h
  * @brief    CMSIS compiler ARMCC (ARM compiler V5) header file
- * @version  V5.0.1
- * @date     03. February 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
  * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -50,34 +50,46 @@
 
 /* CMSIS compiler specific defines */
 #ifndef   __ASM
-  #define __ASM                     __asm
+  #define __ASM                                  __asm
 #endif
 #ifndef   __INLINE
-  #define __INLINE                  __inline
+  #define __INLINE                               __inline
 #endif
 #ifndef   __STATIC_INLINE
-  #define __STATIC_INLINE           static __inline
+  #define __STATIC_INLINE                        static __inline
 #endif
 #ifndef   __NO_RETURN
-  #define __NO_RETURN               __declspec(noreturn)
+  #define __NO_RETURN                            __declspec(noreturn)
 #endif
 #ifndef   __USED
-  #define __USED                    __attribute__((used))
+  #define __USED                                 __attribute__((used))
 #endif
 #ifndef   __WEAK
-  #define __WEAK                    __attribute__((weak))
-#endif
-#ifndef   __UNALIGNED_UINT32
-  #define __UNALIGNED_UINT32(x)     (*((__packed uint32_t *)(x)))
-#endif
-#ifndef   __ALIGNED
-  #define __ALIGNED(x)              __attribute__((aligned(x)))
+  #define __WEAK                                 __attribute__((weak))
 #endif
 #ifndef   __PACKED
-  #define __PACKED                  __attribute__((packed))
+  #define __PACKED                               __attribute__((packed))
 #endif
 #ifndef   __PACKED_STRUCT
-  #define __PACKED_STRUCT           __packed struct
+  #define __PACKED_STRUCT                        __packed struct
+#endif
+#ifndef   __UNALIGNED_UINT32        /* deprecated */
+  #define __UNALIGNED_UINT32(x)                  (*((__packed uint32_t *)(x)))
+#endif
+#ifndef   __UNALIGNED_UINT16_WRITE
+  #define __UNALIGNED_UINT16_WRITE(addr, val)    ((*((__packed uint16_t *)(addr))) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT16_READ
+  #define __UNALIGNED_UINT16_READ(addr)          (*((const __packed uint16_t *)(addr)))
+#endif
+#ifndef   __UNALIGNED_UINT32_WRITE
+  #define __UNALIGNED_UINT32_WRITE(addr, val)    ((*((__packed uint32_t *)(addr))) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT32_READ
+  #define __UNALIGNED_UINT32_READ(addr)          (*((const __packed uint32_t *)(addr)))
+#endif
+#ifndef   __ALIGNED
+  #define __ALIGNED(x)                           __attribute__((aligned(x)))
 #endif
 
 
diff --git a/CMSIS/Core/Include/cmsis_armclang.h b/CMSIS/Core/Include/cmsis_armclang.h
index be7d1f3..edd64c4 100644
--- a/CMSIS/Core/Include/cmsis_armclang.h
+++ b/CMSIS/Core/Include/cmsis_armclang.h
@@ -1,8 +1,8 @@
 /**************************************************************************//**
  * @file     cmsis_armclang.h
  * @brief    CMSIS compiler ARMCLANG (ARM compiler V6) header file
- * @version  V5.0.1
- * @date     02. February 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
  * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -31,38 +31,66 @@
 
 /* CMSIS compiler specific defines */
 #ifndef   __ASM
-  #define __ASM                     __asm
+  #define __ASM                                  __asm
 #endif
 #ifndef   __INLINE
-  #define __INLINE                  __inline
+  #define __INLINE                               __inline
 #endif
 #ifndef   __STATIC_INLINE
-  #define __STATIC_INLINE           static __inline
+  #define __STATIC_INLINE                        static __inline
 #endif
 #ifndef   __NO_RETURN
-  #define __NO_RETURN               __attribute__((noreturn))
+  #define __NO_RETURN                            __attribute__((noreturn))
 #endif
 #ifndef   __USED
-  #define __USED                    __attribute__((used))
+  #define __USED                                 __attribute__((used))
 #endif
 #ifndef   __WEAK
-  #define __WEAK                    __attribute__((weak))
+  #define __WEAK                                 __attribute__((weak))
 #endif
-#ifndef   __UNALIGNED_UINT32
+#ifndef   __PACKED
+  #define __PACKED                               __attribute__((packed, aligned(1)))
+#endif
+#ifndef   __PACKED_STRUCT
+  #define __PACKED_STRUCT                        struct __attribute__((packed, aligned(1)))
+#endif
+#ifndef   __UNALIGNED_UINT32        /* deprecated */
   #pragma clang diagnostic push
   #pragma clang diagnostic ignored "-Wpacked"
   struct __attribute__((packed)) T_UINT32 { uint32_t v; };
   #pragma clang diagnostic pop
-  #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
+  #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+#endif
+#ifndef   __UNALIGNED_UINT16_WRITE
+  #pragma clang diagnostic push
+  #pragma clang diagnostic ignored "-Wpacked"
+  __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+  #pragma clang diagnostic pop
+  #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT16_READ
+  #pragma clang diagnostic push
+  #pragma clang diagnostic ignored "-Wpacked"
+  __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+  #pragma clang diagnostic pop
+  #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+#endif
+#ifndef   __UNALIGNED_UINT32_WRITE
+  #pragma clang diagnostic push
+  #pragma clang diagnostic ignored "-Wpacked"
+  __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+  #pragma clang diagnostic pop
+  #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT32_READ
+  #pragma clang diagnostic push
+  #pragma clang diagnostic ignored "-Wpacked"
+  __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+  #pragma clang diagnostic pop
+  #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
 #endif
 #ifndef   __ALIGNED
-  #define __ALIGNED(x)              __attribute__((aligned(x)))
-#endif
-#ifndef   __PACKED
-  #define __PACKED                  __attribute__((packed, aligned(1)))
-#endif
-#ifndef   __PACKED_STRUCT
-  #define __PACKED_STRUCT           struct __attribute__((packed, aligned(1)))
+  #define __ALIGNED(x)                           __attribute__((aligned(x)))
 #endif
 
 
diff --git a/CMSIS/Core/Include/cmsis_compiler.h b/CMSIS/Core/Include/cmsis_compiler.h
index 8b989f8..2ef183f 100644
--- a/CMSIS/Core/Include/cmsis_compiler.h
+++ b/CMSIS/Core/Include/cmsis_compiler.h
@@ -1,8 +1,8 @@
 /**************************************************************************//**
  * @file     cmsis_compiler.h
  * @brief    CMSIS compiler generic header file
- * @version  V5.0.1
- * @date     30. January 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
  * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -54,40 +54,56 @@
 #elif defined ( __ICCARM__ )
 
   #ifndef   __ASM
-    #define __ASM                     __asm
+    #define __ASM                                  __asm
   #endif
   #ifndef   __INLINE
-    #define __INLINE                  inline
+    #define __INLINE                               inline
   #endif
   #ifndef   __STATIC_INLINE
-    #define __STATIC_INLINE           static inline
+    #define __STATIC_INLINE                        static inline
   #endif
 
   #include <cmsis_iar.h>
 
   #ifndef   __NO_RETURN
-    #define __NO_RETURN               __noreturn
+    #define __NO_RETURN                            __noreturn
   #endif
   #ifndef   __USED
-    #define __USED                    __root
+    #define __USED                                 __root
   #endif
   #ifndef   __WEAK
-    #define __WEAK                    __weak
+    #define __WEAK                                 __weak
   #endif
-  #ifndef   __UNALIGNED_UINT32
+  #ifndef   __PACKED
+    #define __PACKED                               __packed
+  #endif
+  #ifndef   __PACKED_STRUCT
+    #define __PACKED_STRUCT                        __packed struct
+  #endif
+  #ifndef   __UNALIGNED_UINT32        /* deprecated */
     __packed struct T_UINT32 { uint32_t v; };
-      #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
+    #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT16_WRITE
+    __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+    #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT16_READ
+    __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+    #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT32_WRITE
+    __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+    #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT32_READ
+    __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+    #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
   #endif
   #ifndef   __ALIGNED
     #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
     #define __ALIGNED(x)
   #endif
-  #ifndef   __PACKED
-    #define __PACKED                  __packed
-  #endif
-  #ifndef   __PACKED_STRUCT
-    #define __PACKED_STRUCT           __packed struct
-  #endif
 
 
 /*
@@ -97,35 +113,51 @@
   #include <cmsis_ccs.h>
 
   #ifndef   __ASM
-    #define __ASM                     __asm
+    #define __ASM                                  __asm
   #endif
   #ifndef   __INLINE
-    #define __INLINE                  inline
+    #define __INLINE                               inline
   #endif
   #ifndef   __STATIC_INLINE
-    #define __STATIC_INLINE           static inline
+    #define __STATIC_INLINE                        static inline
   #endif
   #ifndef   __NO_RETURN
-    #define __NO_RETURN               __attribute__((noreturn))
+    #define __NO_RETURN                            __attribute__((noreturn))
   #endif
   #ifndef   __USED
-    #define __USED                    __attribute__((used))
+    #define __USED                                 __attribute__((used))
   #endif
   #ifndef   __WEAK
-    #define __WEAK                    __attribute__((weak))
-  #endif
-  #ifndef   __UNALIGNED_UINT32
-    struct __attribute__((packed)) T_UINT32 { uint32_t v; };
-    #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
-  #endif
-  #ifndef   __ALIGNED
-    #define __ALIGNED(x)              __attribute__((aligned(x)))
+    #define __WEAK                                 __attribute__((weak))
   #endif
   #ifndef   __PACKED
-    #define __PACKED                  __attribute__((packed))
+    #define __PACKED                               __attribute__((packed))
   #endif
   #ifndef   __PACKED_STRUCT
-    #define __PACKED_STRUCT           struct __attribute__((packed))
+    #define __PACKED_STRUCT                        struct __attribute__((packed))
+  #endif
+  #ifndef   __UNALIGNED_UINT32        /* deprecated */
+    struct __attribute__((packed)) T_UINT32 { uint32_t v; };
+    #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT16_WRITE
+    __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+    #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT16_READ
+    __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+    #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT32_WRITE
+    __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+    #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT32_READ
+    __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+    #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
+  #endif
+  #ifndef   __ALIGNED
+    #define __ALIGNED(x)                           __attribute__((aligned(x)))
   #endif
 
 
@@ -140,36 +172,52 @@
    */
 
   #ifndef   __ASM
-    #define __ASM                     __asm
+    #define __ASM                                  __asm
   #endif
   #ifndef   __INLINE
-    #define __INLINE                  inline
+    #define __INLINE                               inline
   #endif
   #ifndef   __STATIC_INLINE
-    #define __STATIC_INLINE           static inline
+    #define __STATIC_INLINE                        static inline
   #endif
   #ifndef   __NO_RETURN
-    #define __NO_RETURN               __attribute__((noreturn))
+    #define __NO_RETURN                            __attribute__((noreturn))
   #endif
   #ifndef   __USED
-    #define __USED                    __attribute__((used))
+    #define __USED                                 __attribute__((used))
   #endif
   #ifndef   __WEAK
-    #define __WEAK                    __attribute__((weak))
+    #define __WEAK                                 __attribute__((weak))
   #endif
-  #ifndef   __UNALIGNED_UINT32
+  #ifndef   __PACKED
+    #define __PACKED                               __packed__
+  #endif
+  #ifndef   __PACKED_STRUCT
+    #define __PACKED_STRUCT                        struct __packed__
+  #endif
+  #ifndef   __UNALIGNED_UINT32        /* deprecated */
     struct __packed__ T_UINT32 { uint32_t v; };
-    #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
+    #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT16_WRITE
+    __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+    #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT16_READ
+    __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+    #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT32_WRITE
+    __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+    #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT32_READ
+    __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+    #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
   #endif
   #ifndef   __ALIGNED
     #define __ALIGNED(x)              __align(x)
   #endif
-  #ifndef   __PACKED
-    #define __PACKED                  __packed__
-  #endif
-  #ifndef   __PACKED_STRUCT
-    #define __PACKED_STRUCT           struct __packed__
-  #endif
 
 
 /*
@@ -179,13 +227,13 @@
    #include <cmsis_csm.h>
 
  #ifndef   __ASM
-    #define __ASM                     _asm
+    #define __ASM                                  _asm
   #endif
   #ifndef   __INLINE
-    #define __INLINE                  inline
+    #define __INLINE                               inline
   #endif
   #ifndef   __STATIC_INLINE
-    #define __STATIC_INLINE           static inline
+    #define __STATIC_INLINE                        static inline
   #endif
   #ifndef   __NO_RETURN
     // NO RETURN is automatically detected hence no warning here
@@ -196,22 +244,38 @@
     #define __USED
   #endif
   #ifndef   __WEAK
-    #define __WEAK                    __weak
+    #define __WEAK                                 __weak
   #endif
-  #ifndef   __UNALIGNED_UINT32
+  #ifndef   __PACKED
+    #define __PACKED                               @packed
+  #endif
+  #ifndef   __PACKED_STRUCT
+    #define __PACKED_STRUCT                        @packed struct
+  #endif
+  #ifndef   __UNALIGNED_UINT32        /* deprecated */
     @packed struct T_UINT32 { uint32_t v; };
-    #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
+    #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT16_WRITE
+    __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+    #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT16_READ
+    __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+    #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+  #endif
+  #ifndef   __UNALIGNED_UINT32_WRITE
+    __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+    #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+  #endif
+  #ifndef   __UNALIGNED_UINT32_READ
+    __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+    #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
   #endif
   #ifndef   __ALIGNED
     #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
     #define __ALIGNED(x)
   #endif
-  #ifndef   __PACKED
-    #define __PACKED                  @packed
-  #endif
-  #ifndef   __PACKED_STRUCT
-    #define __PACKED_STRUCT           @packed struct
-  #endif
 
 
 #else
diff --git a/CMSIS/Core/Include/cmsis_gcc.h b/CMSIS/Core/Include/cmsis_gcc.h
index 074cd7a..1ffc41f 100644
--- a/CMSIS/Core/Include/cmsis_gcc.h
+++ b/CMSIS/Core/Include/cmsis_gcc.h
@@ -1,8 +1,8 @@
 /**************************************************************************//**
  * @file     cmsis_gcc.h
  * @brief    CMSIS compiler GCC header file
- * @version  V5.0.1
- * @date     02. February 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
  * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -33,39 +33,71 @@
 
 /* CMSIS compiler specific defines */
 #ifndef   __ASM
-  #define __ASM                     __asm
+  #define __ASM                                  __asm
 #endif
 #ifndef   __INLINE
-  #define __INLINE                  inline
+  #define __INLINE                               inline
 #endif
 #ifndef   __STATIC_INLINE
-  #define __STATIC_INLINE           static inline
+  #define __STATIC_INLINE                        static inline
 #endif
 #ifndef   __NO_RETURN
-  #define __NO_RETURN               __attribute__((noreturn))
+  #define __NO_RETURN                            __attribute__((noreturn))
 #endif
 #ifndef   __USED
-  #define __USED                    __attribute__((used))
+  #define __USED                                 __attribute__((used))
 #endif
 #ifndef   __WEAK
-  #define __WEAK                    __attribute__((weak))
-#endif
-#ifndef   __UNALIGNED_UINT32
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpacked"
-#pragma GCC diagnostic ignored "-Wattributes"
-  struct __attribute__((packed)) T_UINT32 { uint32_t v; };
-#pragma GCC diagnostic pop
-  #define __UNALIGNED_UINT32(x)     (((struct T_UINT32 *)(x))->v)
-#endif
-#ifndef   __ALIGNED
-  #define __ALIGNED(x)              __attribute__((aligned(x)))
+  #define __WEAK                                 __attribute__((weak))
 #endif
 #ifndef   __PACKED
-  #define __PACKED                  __attribute__((packed, aligned(1)))
+  #define __PACKED                               __attribute__((packed, aligned(1)))
 #endif
 #ifndef   __PACKED_STRUCT
-  #define __PACKED_STRUCT           struct __attribute__((packed, aligned(1)))
+  #define __PACKED_STRUCT                        struct __attribute__((packed, aligned(1)))
+#endif
+#ifndef   __UNALIGNED_UINT32        /* deprecated */
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wpacked"
+  #pragma GCC diagnostic ignored "-Wattributes"
+  struct __attribute__((packed)) T_UINT32 { uint32_t v; };
+  #pragma GCC diagnostic pop
+  #define __UNALIGNED_UINT32(x)                  (((struct T_UINT32 *)(x))->v)
+#endif
+#ifndef   __UNALIGNED_UINT16_WRITE
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wpacked"
+  #pragma GCC diagnostic ignored "-Wattributes"
+  __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
+  #pragma GCC diagnostic pop
+  #define __UNALIGNED_UINT16_WRITE(addr, val)    (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT16_READ
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wpacked"
+  #pragma GCC diagnostic ignored "-Wattributes"
+  __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
+  #pragma GCC diagnostic pop
+  #define __UNALIGNED_UINT16_READ(addr)          (((const struct T_UINT16_READ *)(const void *)(addr))->v)
+#endif
+#ifndef   __UNALIGNED_UINT32_WRITE
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wpacked"
+  #pragma GCC diagnostic ignored "-Wattributes"
+  __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
+  #pragma GCC diagnostic pop
+  #define __UNALIGNED_UINT32_WRITE(addr, val)    (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
+#endif
+#ifndef   __UNALIGNED_UINT32_READ
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wpacked"
+  #pragma GCC diagnostic ignored "-Wattributes"
+  __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
+  #pragma GCC diagnostic pop
+  #define __UNALIGNED_UINT32_READ(addr)          (((const struct T_UINT32_READ *)(const void *)(addr))->v)
+#endif
+#ifndef   __ALIGNED
+  #define __ALIGNED(x)                           __attribute__((aligned(x)))
 #endif
 
 
diff --git a/CMSIS/Core/Include/core_armv8mbl.h b/CMSIS/Core/Include/core_armv8mbl.h
index 5ce9a52..816c406 100644
--- a/CMSIS/Core/Include/core_armv8mbl.h
+++ b/CMSIS/Core/Include/core_armv8mbl.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_armv8mbl.h
  * @brief    CMSIS ARMv8MBL Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_armv8mml.h b/CMSIS/Core/Include/core_armv8mml.h
index c821f56..bc84921 100644
--- a/CMSIS/Core/Include/core_armv8mml.h
+++ b/CMSIS/Core/Include/core_armv8mml.h
@@ -2,10 +2,10 @@
  * @file     core_armv8mml.h
  * @brief    CMSIS ARMv8MML Core Peripheral Access Layer Header File
  * @version  V5.0.2
- * @date     07. December 2016
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm0.h b/CMSIS/Core/Include/core_cm0.h
index 2fb5821..2f0f19c 100644
--- a/CMSIS/Core/Include/core_cm0.h
+++ b/CMSIS/Core/Include/core_cm0.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm0.h
  * @brief    CMSIS Cortex-M0 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm0plus.h b/CMSIS/Core/Include/core_cm0plus.h
index 751384b..ff31235 100644
--- a/CMSIS/Core/Include/core_cm0plus.h
+++ b/CMSIS/Core/Include/core_cm0plus.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm0plus.h
  * @brief    CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm23.h b/CMSIS/Core/Include/core_cm23.h
index 83055ba..e62a1e1 100644
--- a/CMSIS/Core/Include/core_cm23.h
+++ b/CMSIS/Core/Include/core_cm23.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm23.h
  * @brief    CMSIS Cortex-M23 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm3.h b/CMSIS/Core/Include/core_cm3.h
index 499199c..cfeb58b 100644
--- a/CMSIS/Core/Include/core_cm3.h
+++ b/CMSIS/Core/Include/core_cm3.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm3.h
  * @brief    CMSIS Cortex-M3 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     30. January 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm33.h b/CMSIS/Core/Include/core_cm33.h
index 65da8ef..73afcdc 100644
--- a/CMSIS/Core/Include/core_cm33.h
+++ b/CMSIS/Core/Include/core_cm33.h
@@ -2,10 +2,10 @@
  * @file     core_cm33.h
  * @brief    CMSIS Cortex-M33 Core Peripheral Access Layer Header File
  * @version  V5.0.2
- * @date     07. December 2016
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm4.h b/CMSIS/Core/Include/core_cm4.h
index 2da78d3..bdaedcf 100644
--- a/CMSIS/Core/Include/core_cm4.h
+++ b/CMSIS/Core/Include/core_cm4.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm4.h
  * @brief    CMSIS Cortex-M4 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     30. January 2017
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_cm7.h b/CMSIS/Core/Include/core_cm7.h
index 8bfbe94..2935701 100644
--- a/CMSIS/Core/Include/core_cm7.h
+++ b/CMSIS/Core/Include/core_cm7.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_cm7.h
  * @brief    CMSIS Cortex-M7 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_sc000.h b/CMSIS/Core/Include/core_sc000.h
index 8305271..0826d38 100644
--- a/CMSIS/Core/Include/core_sc000.h
+++ b/CMSIS/Core/Include/core_sc000.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_sc000.h
  * @brief    CMSIS SC000 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/Core/Include/core_sc300.h b/CMSIS/Core/Include/core_sc300.h
index 1b5041a..b2532bc 100644
--- a/CMSIS/Core/Include/core_sc300.h
+++ b/CMSIS/Core/Include/core_sc300.h
@@ -1,11 +1,11 @@
 /**************************************************************************//**
  * @file     core_sc300.h
  * @brief    CMSIS SC300 Core Peripheral Access Layer Header File
- * @version  V5.0.1
- * @date     25. November 2016
+ * @version  V5.0.2
+ * @date     13. February 2017
  ******************************************************************************/
 /*
- * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
+ * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
diff --git a/CMSIS/DoxyGen/Core/core.dxy b/CMSIS/DoxyGen/Core/core.dxy
index bdf0482..6f9443c 100644
--- a/CMSIS/DoxyGen/Core/core.dxy
+++ b/CMSIS/DoxyGen/Core/core.dxy
@@ -38,7 +38,7 @@
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "Version 5.0.1"
+PROJECT_NUMBER         = "Version 5.0.2"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
@@ -606,7 +606,7 @@
 # the documentation.
 # The default value is: YES.
 
-GENERATE_DEPRECATEDLIST= NO
+GENERATE_DEPRECATEDLIST= YES
 
 # The ENABLED_SECTIONS tag can be used to enable conditional documentation
 # sections, marked by \if <section_label> ... \endif and \cond <section_label>
diff --git a/CMSIS/DoxyGen/Core/src/Overview.txt b/CMSIS/DoxyGen/Core/src/Overview.txt
index bcf8add..a67d338 100644
--- a/CMSIS/DoxyGen/Core/src/Overview.txt
+++ b/CMSIS/DoxyGen/Core/src/Overview.txt
@@ -81,6 +81,14 @@
       <th>Description</th>
     </tr>
     <tr>
+      <td>V5.0.2</td>
+      <td>
+         Added macros  \ref \__UNALIGNED_UINT16_READ,  \ref \__UNALIGNED_UINT16_WRITE.\n
+         Added macros  \ref \__UNALIGNED_UINT32_READ,  \ref \__UNALIGNED_UINT32_WRITE.\n
+         Set macro  \ref \__UNALIGNED_UINT32 to deprecated.
+      </td>
+    </tr>
+    <tr>
       <td>V5.0.1</td>
       <td>
          Added: macro \ref \__PACKED_STRUCT. \n
diff --git a/CMSIS/DoxyGen/Core/src/Ref_CompilerControl.txt b/CMSIS/DoxyGen/Core/src/Ref_CompilerControl.txt
index 2b42873..bf83f59 100644
--- a/CMSIS/DoxyGen/Core/src/Ref_CompilerControl.txt
+++ b/CMSIS/DoxyGen/Core/src/Ref_CompilerControl.txt
@@ -87,7 +87,7 @@
 
 <b> Code Example:</b>
 \code
-const uint32_t led_mask[] = {1UL << 4, 1UL << 5, 1UL << 6, 1UL << 7};
+const uint32_t led_mask[] = {1U << 4, 1U << 5, 1U << 6, 1U << 7};
  
 /*------------------------------------------------------------------------------
   Switch on LEDs
@@ -185,42 +185,6 @@
 
 /**************************************************************************************************/
 /**
-\def __UNALIGNED_UINT32
-\brief Pointer for unaligned access of a uint32_t variable.
-\details
-Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in read/write
-operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
-processor core and compiler settings.
- 
-<b> Code Example:</b>
-\code
-uint32_t val32;
- 
-void test (uint8_t *ptr) {
-  __UNALIGNED_UINT32(ptr) = val32;
-}
-\endcode
-
-*/
-#define __UNALIGNED_UINT32
-
-/**************************************************************************************************/
-/**
-\def __ALIGNED
-\brief Minimum alignment for a variable.
-\details
-Specifies a minimum alignment for a variable or structure field, measured in bytes.
- 
-<b> Code Example:</b>
-\code
-uint32_t stack_space[0x100] __ALIGNED(8);   // 8-byte alignment required
-\endcode
-
-*/
-#define __ALIGNED
-
-/**************************************************************************************************/
-/**
 \def __PACKED
 \brief Request smallest possible alignment.
 \details
@@ -256,4 +220,127 @@
 */
 #define __PACKED_STRUCT
 
+/**************************************************************************************************/
+/**
+\def __UNALIGNED_UINT32
+\brief Pointer for unaligned access of a uint32_t variable.
+\deprecated
+Do not use this macro.
+It has been superseded by \ref __UNALIGNED_UINT32_READ, \ref __UNALIGNED_UINT32_WRITE and will be removed in the future.
+\details
+Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in read/write
+operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
+processor core and compiler settings.
+ 
+<b> Code Example:</b>
+\code
+uint32_t val32;
+ 
+void test (uint8_t *ptr) {
+  __UNALIGNED_UINT32(ptr) = val32;
+}
+\endcode
+
+*/
+#define __UNALIGNED_UINT32
+
+/**************************************************************************************************/
+/**
+\def __UNALIGNED_UINT16_READ
+\brief Pointer for unaligned read of a uint16_t variable.
+\details
+Defines a pointer to a uint16_t from an address that does not need to be aligned. This can then be used in read
+operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
+processor core and compiler settings.
+ 
+<b> Code Example:</b>
+\code
+uint16_t val16;
+ 
+void test (uint8_t *ptr) {
+   val16 = __UNALIGNED_UINT16_READ(ptr);
+}
+\endcode
+
+*/
+#define __UNALIGNED_UINT16_READ
+
+/**************************************************************************************************/
+/**
+\def __UNALIGNED_UINT16_WRITE
+\brief Pointer for unaligned write of a uint16_t variable.
+\details
+Defines a pointer to a uint16_t from an address that does not need to be aligned. This can then be used in write
+operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
+processor core and compiler settings.
+ 
+<b> Code Example:</b>
+\code
+uint16_t val16 = 0U;
+ 
+void test (uint8_t *ptr) {
+   __UNALIGNED_UINT16_WRITE(ptr, val16);
+}
+\endcode
+
+*/
+#define __UNALIGNED_UINT16_WRITE
+
+/**************************************************************************************************/
+/**
+\def __UNALIGNED_UINT32_READ
+\brief Pointer for unaligned read of a uint32_t variable.
+\details
+Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in read
+operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
+processor core and compiler settings.
+ 
+<b> Code Example:</b>
+\code
+uint32_t val32;
+ 
+void test (uint8_t *ptr) {
+   val32 = __UNALIGNED_UINT32_READ(ptr);
+}
+\endcode
+
+*/
+#define __UNALIGNED_UINT32_READ
+
+/**************************************************************************************************/
+/**
+\def __UNALIGNED_UINT32_WRITE
+\brief Pointer for unaligned write of a uint32_t variable.
+\details
+Defines a pointer to a uint32_t from an address that does not need to be aligned. This can then be used in write
+operations. The compiler will generate the appropriate access (aligned or non-aligned) depending on the underlying ARM
+processor core and compiler settings.
+ 
+<b> Code Example:</b>
+\code
+uint32_t val32 = 0U;
+ 
+void test (uint8_t *ptr) {
+   __UNALIGNED_UINT32_WRITE(ptr, val32);
+}
+\endcode
+
+*/
+#define __UNALIGNED_UINT32_WRITE
+
+/**************************************************************************************************/
+/**
+\def __ALIGNED
+\brief Minimum alignment for a variable.
+\details
+Specifies a minimum alignment for a variable or structure field, measured in bytes.
+ 
+<b> Code Example:</b>
+\code
+uint32_t stack_space[0x100] __ALIGNED(8);   // 8-byte alignment required
+\endcode
+
+*/
+#define __ALIGNED
+
 /** @} */ /** end of compiler_conntrol_gr **/
\ No newline at end of file