CAN Controller
UG0331 User Guide Revision 15.0
448
12.5
Use Cases
12.5.1
Use Case 1: Automatic Bit Rate Detection
It is possible to use the CAN in Listen-only test mode. Refer to the
page 442 for more information on how to enable Listen-only mode. In Listen-only
mode, the CAN controller receives all bus traffic but does not send any information to the bus. In this
non-intrusive bus observation mode, the CAN controller can be used to determine the actual bit rate.
During the bit rate detection, the CAN controller listens to the on-going CAN bus communication using a
set of given bit rates and eventually detects the actual bit rate. The following flow chart outlines the
procedure to detect the bit rate.
Figure 177 •
Automatic Bit Rates Detection Flow Chart
12.5.2
Use Case 2: SRAM Test Mode
In addition to the test modes described in the Test Modes section, the CAN controller can be put into
SRAM test mode. The CAN controller has a built-in RAM, which is protected by EDAC that is used to
store the Receive and Transmit messages.
To support software based memory testing, the CAN controller can be put into SRAM test mode. When
this SRAM test mode is active, the CAN controller operation is disabled and transparent access from the
host APB interface to all SRAM memory locations is available. SRAM test mode can be enabled or
disabled by setting the CAN command bit[3] of the CAN_COMMAND register. Refer to the
page 455 for more details. SRAM test mode and CAN controller operation are mutually
System Startup
Ack Interrupt
Found Bitrate
YES
YES
NO
NO
Set Next
Bitrate
Error
Interrupt?
Receive Message
Interrupt?
Wait for Interrupt
Set Highest
Bitrate
Setup CAN Controller:
- Set Listen-only mode
- Enable all interrupts