
FlexRay Module (FLEXRAYV2)
MFR4300 Data Sheet, Rev. 1
Freescale Semiconductor
203
3.6
Application Information
3.6.1
Shut Down Sequence
This section describes a safe shut down sequence to stop the FlexRay module gracefully. The main targets
of this sequence are
do not send invalid data on the FlexRay bus
do not corrupt FlexRay bus and do not disturb ongoing communication
finish all ongoing reception
Firstly, the application must disable all message buffers by triggering the EDT trigger bit in the
Message
Buffer Configuration, Control, Status Registers (MBCCSRn)
, until the EDS flag is cleared by the FlexRay
module. This ensures that no transmission is started by the FlexRay module. If all message buffers are
disabled, the application issues the HALT command to the PE using the
Protocol Operation Control
Register (POCR)
. The PE then waits for the end of the communication cycle and goes into the
POC:halt
state. The application can observe this state change in the PROTSTATE field of the
Protocol Status
Register 0 (PSR0)
.
3.6.2
Protocol Control Command Execution
This section considers the issues of the protocol control command execution.
The application issues any of the protocol control commands listed in the POCCMD field of
Table 3-15
by writing the command to the POCCMD field of the
Protocol Operation Control Register (POCR)
. As a
result the FlexRay module sets the BSY bit while the command is transferred to the PE. When the PE has
accepted the command, the BSY flag is cleared. All commands are accepted by the PE.
The PE maintains a protocol command vector. For each command that was accepted by the PE, the PE sets
the corresponding command bit in the protocol command vector. If a command is issued while the
corresponding command bit is set, the command is not queued and is lost.
If the command execution block of the PE is idle, it selects the next accepted protocol command with the
highest priority from the current protocol command vector according to the protocol control command
priorities given in
Table 3-111
. If the current protocol state does not allow the execution of this protocol
command (see POC state changes in
FlexRay Communications System Protocol Specification,
Version 2.1
) the FlexRay module asserts the illegal protocol command interrupt flag IPC_IF in the
Protocol Interrupt Flag Register 1 (PIFR1)
. The protocol command is not executed in this case.
Some protocol commands may be interrupted by other commands or the detection of a fatal protocol error
as indicated by
Table 3-111
. If the application issues the RESET, FREEZE, or READY command, or if the
64
37.95 MHz
128
70.77 MHz
Table 3-110. Minimum CHI Frequency Examples
# Message Buffers minimum f
chi