SAM3N00A Atmel Corporation, SAM3N00A Datasheet - Page 101

no-image

SAM3N00A

Manufacturer Part Number
SAM3N00A
Description
Manufacturer
Atmel Corporation
Datasheets
10.12.8.4
10.12.8.5
11011A–ATARM–04-Oct-10
try
MOV
LDREX
CMP
ITT
STREXEQ R0, R1, [LockAddr]
CMPEQ
BNE
....
Condition flags
Examples
R1, #0x1
R0, [LockAddr]
R0, #0
EQ
R0, #0
try
These instructions do not change the flags.
; Initialize the ‘lock taken’ value
; Load the lock value
; Is the lock free?
; IT instruction for STREXEQ and CMPEQ
; Try and claim the lock
; Did this succeed?
; No – try again
; Yes – we have the lock
SAM3N
101

Related parts for SAM3N00A