We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
As I expect:
LDREX will Lock the address of VarTest. If I change vale of VarTest, STREX will return 1.
But in my test (Picture below). after all, VarTest4 = 0 although I modify VarTest before STREX. As I expected VasTest4 have to is 1.
Thanks and best regards!
I
The example code, if your intent is to try the LDREX/STREX instructions, should probably be changed to declare the variables as volatile.
Otherwise it is likely that the compiler makes optimizations that invalidate your test.