Hi, In F2803x multiday workshop, F28x Atomic read/modify/write is introduced. The example is shown below:
So I test it in my code as below, but there will be error shown below:
warning #99922: "../Example_2803xLEDBlink.c", line 35: Assembly statement "AND
*XAR1,#0x1234" creates a label, which may not be what was intended. Use a
colon after a label or a space before a non-label to silence the warning.
warning #99922: "../Example_2803xLEDBlink.c", line 35: Assembly statement "AND
*XAR1,#0x1234" creates a label, which may not be what was intended. Use a
colon after a label or a space before a non-label to silence the warning.
1 Assembly Error, No Assembly Warnings
>> Compilation failure
subdir_rules.mk:65: recipe for target 'Example_2803xLEDBlink.obj' failed
"C:\Users\a0223719\AppData\Local\Temp\{4543FEC9-CF37-4246-8C43-FE6DB9DEDA45}", ERROR! at line 138:
[E0002]
Invalid mnemonic specification
AND *XAR1,#0x1234
1. why there will be error ?
2. I cannot find any atomic instruct in SPRU430F like "AND *XAR2,#1234h", I can only find basic assembly language instruction like
"MOV AL,*XAR2
AND AL,#1234h
MOV *XAR2,AL"
Are there a list of atomic instructions offered?
3. In assembly, can I directly write the atomic instruction instead of the assembly language instruction? If I write the code in C, will the compiler automatic generate atomic instruction when it can?