Preliminary
www.ti.com
Spinlock
1.14.4 Programming Guide
1.14.4.1 Low-level Programming Models
This section covers the low-level hardware programming sequences for configuration and usage of the
module.
1.14.4.1.1 Surrounding Modules Global Initialization
This procedure initializes the surrounding modules when the Spinlock module is used for the first time
after a device reset.
1.14.4.1.2 Global Initialization of Surrounding Modules
Table 1-115. Global Initialization of Surrounding Modules
Surrounding Modules
Comments
Spinlock interface clock must be enabled. For more information, Refer PRCM User
PRCM
Guide.
For more information about the L4-Standard interconnect configuration, Refer Bus
Interconnect
Topology.
1.14.4.2 Basic Spinlock Operations
The main spinlock operations are:
•
Clear all the Taken spinlocks (only after a system bug recovery)
•
Take a spinlock
•
Release spinlock
1.14.4.2.1 Spinlocks Clearing After a System Bug Recovery
Module initialization (after reset) is not needed, except after system bug recovery. The following table
presents the Spinlock initialization after a system bug recovery. Software should store 0 into each of the
SPINLOCK_LOCK_REG_i registers at system startup to insure that all locks are initialized to Not Taken.
Table 1-116. Spinlock System Bug Recovery
Step
Register
Value
IF: SPINLOCK_SYSTATUS[0] IU0 = = 1?
SPINLOCK_SYSTATUS[0] IU0
Free the 64 locks
SPINLOCK_LOCK_REG_i[0] TAKEN (i=0
0
to 63)
END
1.14.4.2.2 Take and Release Spinlock
This procedure configures the take and release (free) operations for the Spinlock module. A spinlock
should only be held with interrupts disabled. So, before attempting to obtain the spinlock, software should
disable interrupts. Then it should read the SPINLOCK_LOCK_REG_i[0] TAKEN bit to attempt to obtain the
lock. If it succeeds, it should proceed directly through the critical section then unlock and re-enable
interrupts. If the acquisition attempt fails, the acquisition should be re-attempted. To prevent unknown
interrupt disabled time, interrupts should be re-enabled and then disabled before re-attempting to acquire
the lock.
shows the described above procedure.
241
SPRUGX9 – 15 April 2011
Chip Level Resources
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...