TI cmsis library is broken
If you read this, most likely you have faced the same issue I did. It means that most likely you have downloaded cmsis implementation from one of the biggest silicon manufacturer in the world - TI. And the library does not work. Even worth, your toolchain cannot assemble it and failed on strex instruction.
strex r0, r0, [r1]
It seems like someone do not give a dump about specifications. Because it cleary states that For STREX, Rd must not be the same register as Rt, Rt2, or Rn.
Read more