/* LDR Exclusive (32 bit) 
Executes a exclusive STR instruction for 32 bit values.  */
rt_atomic_t rt_hw_atomic_load(volatile rt_atomic_t *ptr)
/* LDR Exclusive (32 bit) 
Executes a exclusive STR instruction for 32 bit values.  */
rt_atomic_t rt_hw_atomic_load(volatile rt_atomic_t *ptr)
{
    rt_atomic_t oldval;
    do
    {
        oldval = __LDREXW(ptr);
    } while ((__STREXW(oldval, ptr)) != 0U);
    return oldval;
}