|
MC9S12XD256CAL Datasheet, PDF (204/1348 Pages) Freescale Semiconductor, Inc – This specification describes the function of the clocks and reset generator (CRG). | |||
|
◁ |
Chapter 6 XGATE (S12XGATEV2)
6.4.4 Semaphores
The XGATE module offers a set of eight hardware semaphores. These semaphores provide a mechanism
to protect system resources that are shared between two concurrent threads of program execution; one
thread running on the S12X_CPU and one running on the XGATE RISC core.
Each semaphore can only be in one of the three states: âUnlockedâ, âLocked by S12X_CPUâ, and âLocked
by XGATEâ. The S12X_CPU can check and change a semaphoreâs state through the XGATE semaphore
register (XGSEM, see Section 6.3.1.6, âXGATE Semaphore Register (XGSEM)â). The RISC core does
this through its SSEM and CSEM instructions.
Figure 6-21 illustrates the valid state transitions.
%1 â XGSEM
SSEM Instruction
CSEM Instruction
%1 â XGSEM
%0 â XGSEM
SSEM Instruction
LOCKED BY
LOCKED BY
S12X_CPU
XGATE
%0 â
an%d S1Sâ%EM1XGâIonSrsXEtrGM. SEMXGSEMUNLOCKED
CInSsEtrMuctSIinoSsnEtruMction
%0 â XGSEM
CSEM Instruction
Figure 6-21. Semaphore State Transitions
MC9S12XDP512 Data Sheet, Rev. 2.21
204
Freescale Semiconductor
|
▷ |