TC1796
System Units (Vol. 1 of 2)
System Control Unit
User’s Manual
5-58
V2.0, 2007-07
SCU, V2.0
In synchronous mode (selected by MODE = 0), the HWCFG1 signal is sampled for a
inactive-to-active level transition, and an emergency stop flag EMSF is set if the
transition is detected. The setting of EMSF activates the EMGSTOP signal. An
emergency case can only be terminated by clearing EMSF via software. The
synchronous control logic is clocked by the system clock
f
SYS
. This results in a small
delay between the HWCFG1 signal and EMGSTOP signal generation. If the system
clock is switched off (not applicable in TC1796), the synchronous mode control logic is
frozen and not able to react to transitions at input HWCFG1. In this case, the
asynchronous mode can be used to put GPTA outputs to dedicated logic levels.
In asynchronous mode (selected by MODE = 1), the occurrence of an active level at
input HWCFG1 immediately activates the EMGSTOP signal to the GPTA outputs and
the MSC modules even if the synchronous control part is inactive and not clocked by the
system clock
f
SYS
. Of course, a valid-to-invalid transition of HWCFG1 (emergency case
is released) also immediately deactivates the EMGSTOP signal.
The POL bit determines the active level of the emergency stop input signal HWCFG1.
The MODE bit selects synchronous or asynchronous mode for emergency stop signal
generation. The EMSF flag can be enabled/disabled for setting (control bit ENON) and
it can be set or cleared by software, too (bit field EMSFM).
5.10.1
GPTA Output Emergency Control in the GPIO Ports
The selection of which port line of a GPIO port is affected by an active EMGSTOP signal
is done in the Emergency Stop Registers (Pn_ESR), which are located in the port logics.
Each of the GPIO lines that can be assigned as GPTA output has its own emergency
stop enable bit Pn_ESR.ENx. If the emergency stop signal EMGSTOP becomes active,
one of two states can be selected:
•
Emergency stop function disabled (Pn_ESR.ENx = 0):
A GPTA output line remains connected to the GPTA module (alternate function).
•
Emergency stop function enabled (Pn_ESR.ENx = 1):
A GPTA output line is disconnected immediately from the GPTA module (alternate
function) and connected to the corresponding bit of the Pn_OUT output register
Pn_OUT.Px.
5.10.2
MSC Emergency Control Selection
With an active emergency stop signal (EMGSTOP = 1), the two MSC modules are
selectively put bits of the next following serial downstream frame(s) to a programmable
logic value instead of an actual data value. In an emergency case, the bits in the
downstream shift registers SRL/SRH that are enabled for the emergency stop feature
(corresponding bits in the emergency stop register ESR set) are loaded with the
corresponding bit of the downstream data register DD instead with the bits from the
ALTINL/ALTINH data source. Therefore, it takes a calculable time until the transmitted
downstream frame with the emergency stop information reaches the receiver device.