SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The Spinlock module supports 256 spinlocks. It accepts only a single command at a time and processes the command fully before accepting the next command. A lock is requested by reading the SPINLOCK_LOCK_REG_i[0] TAKEN bit. There are two states: Taken (SPINLOCK_LOCK_REG_i[0] TAKEN = 1) or Not Taken (SPINLOCK_LOCK_REG_i[0] TAKEN = 0).
When the status of lock i (where i = 0 to 255) is Not Taken (free), a read from the SPINLOCK_LOCK_REG_i register returns 0 and sets the lock to Taken (locked). When the status of lock i is Taken, a read returns 1 and does not change the state of the lock.
A write to the SPINLOCK_LOCK_REG_i register does not change the state of lock, unless when writing 0 when the lock is in Taken state. By doing this, the requester frees the lock.
Only 32-bit reads and writes are supported.
Figure 21-3 shows the SPINLOCK_LOCK_REG_i register state diagram.