__UNALIGNED_UINT32_READ causes Unaligned Hardfault [solved]
I have trouble with sporadic Hardfaults and I tracked it down to some unaligned access in the USB routines. Although the code uses the macro __UNALIGNED_UINT32_READ, the STM32 will still causes the Hardfault for unaligned addresses. So I looked at the disassembly and found that __UNALIGNED_UINT32_READ is translated into a simple "ldr.w" which, of course, traps on unaligned addresses.
Looks to me like __UNALIGNED_UINT32_READ does not work. I worked around by disabling the Unaligneded trapping, but any idea why __UNALIGNED_UINT32_READ does not work?