
Semaphores
PXN20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor
15-5
Multiple gate values can be read in a single access, but only a single gate at a time can be updated via a
write operation. 16- and 32-bit writes to multiple gates are allowed, but the write data operand must update
the state of a single gate only. A byte write data value of 0x03 is defined as no operation and does not affect
the state of the corresponding gate register. Attempts to write multiple gates in a single-aligned access with
a size larger than an 8-bit (byte) reference generate an error termination and do not allow any gate state
changes.
Figure 15-2. SEMA4 Gate n Register (SEMA4_GATEn)
15.3.2.2
Semaphores Processor n IRQ Notification Enable (SEMA4_CP{0,1}INE)
The application of a hardware semaphore module provides an opportunity for implementation of helpful
system-level features. An example is an optional mechanism to generate a processor interrupt after a failed
lock attempt. Traditional software gate functions execute a spin-wait loop in an effort to obtain and lock
the referenced gate. With this module, the processor that fails in the lock attempt could continue with other
tasks and allow a properly-enabled notification interrupt to return its execution to the original lock
function.
The optional notification interrupt function consists of two registers for each processor: an interrupt
notification enable register (SEMA4_CP
n
INE) and the interrupt request register (SEMA4_CP
n
NTF). To
support implementations with more than 16 gates, these registers can be referenced with aligned 16- or
32-bit accesses. For the SEMA4_CP
n
INE registers, unimplemented bits read as zeroes and writes are
ignored.
Figure 15-3. Semaphores Processor n IRQ Notification Enable (SEMA4_CP{0,1}INE)
Offset: SEMA n (n = 0, 1, 2,..., 15)
Access: User read/write
0
1
2
3
4
5
6
7
R
0
0
0
0
0
0
GTFSM
W
Reset
0
0
0
0
0
0
0
0
Table 15-2. SEMA4_GATEn Field Descriptions
Field
Description
GTFSM
Gate Finite State Machine. The hardware gate is maintained in a three-state implementation, defined as:
00 The gate is unlocked (free).
01 The gate has been locked by processor 0.
10 The gate has been locked by processor 1.
11 This state encoding is never used and therefore reserved. Attempted writes of 0x03 are treated as no operation
and do not affect the gate state machine.
Note: The state of the gate reflects the last processor that locked it, which can be useful during system debug.
Offset: SEMA 0x0040 (SEMA4_CP0INE)
SEMA 0x0048 (SEMA4_CP1INE)
Access: User read/write
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
R
INE0
INE1
INE2
INE3
INE4
INE5
INE6
INE7
INE8
INE9 INE10 INE11 INE12 INE13 INE14 INE15
W
Reset
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Summary of Contents for PXN2020
Page 1: ...PXN20 Microcontroller Reference Manual Devices Supported PXN2020 PXN2120 PXN20RM Rev 1 06 2011...
Page 42: ...PXN20 Microcontroller Reference Manual Rev 1 lxiv Freescale Semiconductor...
Page 64: ...Introduction PXN20 Microcontroller Reference Manual Rev 1 1 22 Freescale Semiconductor...
Page 112: ...Signal Description PXN20 Microcontroller Reference Manual Rev 1 3 44 Freescale Semiconductor...
Page 118: ...Resets PXN20 Microcontroller Reference Manual Rev 1 4 6 Freescale Semiconductor...
Page 372: ...e200z6 Core Z6 PXN20 Microcontroller Reference Manual Rev 1 13 8 Freescale Semiconductor...
Page 412: ...e200z0 Core Z0 PXN20 Microcontroller Reference Manual Rev 1 14 14 Freescale Semiconductor...
Page 821: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 27 49...
Page 822: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 27 50 Freescale Semiconductor...
Page 1376: ...Memory Map PXN20 Microcontroller Reference Manual Rev 1 A 118 Freescale Semiconductor...