CAN Controller
UG0331 User Guide Revision 15.0
440
If the receive message handler finds a valid buffer that is empty, then the message is stored and the
MsgAv flag of this buffer is set to 1. If the RxIntEbl flag is set, then the rx_msg flag of the interrupt
controller is asserted.
If the receive buffer already contains a message indicated by MsgAv = 1 and the link flag is not set, then
the rx_msg_loss interrupt flag is asserted. Refer to
If an incoming message has its RTR flag set and the RTR reply flag of the matching buffer is set, then the
message is not stored but an RTR auto-reply request is issued. Refer to
the RX_MSG0_CTRL_CMD register for more details.
12.2.3.2 Acceptance Filter
Each receive buffer has its own acceptance filter that is used to filter incoming messages. An acceptance
filter consists of acceptance mask register (AMR) and acceptance code register (ACR) pair. The AMR
defines which bits of the incoming CAN message match the corresponding ACR bits.
•
The following message fields are covered:
•
ID
•
IDE
•
RTR
•
Data byte 1 and data byte 2
Note:
Some CAN HLPs such as Smart Distributed System (SDS) or DeviceNet carry additional protocol related
information in the first or first and second data bytes that are used for message acceptance and
selection. Having the capability to filter these fields provides a more efficient implementation of the
protocol stack running on the Cortex-M3 processor.
The AMR register defines whether the incoming bit is checked against the ACR register. The incoming bit
is checked against the respective ACR when the AMR register is 0. The message is not accepted when
the incoming bit does not match the respective ACR flag. When the AMR register is 1, the incoming bit is
a "don't care".
12.2.3.2.1 RTR Auto-Reply
The CAN controller supports automatic answering of RTR message requests. All 32 receive buffers
support this feature. If an RTR message is accepted in a receive buffer where the RTRreply flag is set,
then this buffer automatically replies to this message with the content of this receive buffer. The RTRreply
pending flag is set when the RTR message request is received. It is cleared when the message is sent or
when the message buffer is disabled. To abort a pending RTRreply message, use the RTRabort
command.
If the RTR auto-reply option is selected, the RTR sent (RTRS) flag is asserted when the RTR auto-reply
message is successfully sent. It is cleared by writing 1 to it.
An RTR message interrupt is generated if the RTRS flag and RxIntEbl are set. This interrupt is cleared by
clearing the RTRS flag.
12.2.3.3 Receive Buffer Linking
Several receive buffers can be linked together to form a receive buffer array which acts almost like a
receive FIFO. For a set of receive buffers to be linked together, the following conditions must be met:
•
All buffers of the same array must have the same message filter setting (AMR and ACR are
identical).
•
The last buffer of an array may not have its link flag set.
When a receive buffer already contains a message (MsgAv = 1) and a new message arrives for this
buffer, this message is discarded (rs_msg_loss Interrupt). To avoid this situation, several receive buffers
can be linked together. When the CAN controller receives a new message, the receive message handler
searches for a valid receive buffer. If one is found that is already full (MsgAv = 1) and the link flag is set
(LF = 1); the search for a valid receive buffer continues. If no other buffer is found, the rx_msg_loss
interrupt is set and the message is discarded.
It is possible to build several message arrays. Each of these arrays must use the same AMR and ACR.
The receive buffer locations do not need to be contiguous.
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...