11.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 is 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 gets enabled or disabled by setting the CAN command bit[3] of the CAN_COMMAND register. For more information, see Command Register. SRAM test mode and CAN controller operation are mutually exclusive. Thus, SRAM test mode gets enabled when CAN controller is stopped and the CAN controller gets started when the SRAM test mode is stopped. In the SRAM test mode:

  • Transparent read and write access to all SRAM memory locations is supported
  • All message buffer write protect features are disabled
  • Access to receive and transmit message buffer control registers is disabled

In SRAM test mode, the APB interface is used to access different SRAM address directly for test or initialization purposes. At power-up, SRAM is not initialized and any READ action to the memory locations would result in an ECC error if EDAC is enabled. Hence, putting the CAN controller into SRAM test mode enables initialization of the SRAM so ECC errors at power-up do not occur if EDAC is enabled.

The following table provides address mapping between the APB and SRAM addresses.

Table 11-4. APB to SRAM Address Mapping
APB AddressSRAM AddressDescription
0x0200x000TxObject0:Control Bits
0x0240x001TxObject0:Identifier Bits
0x0280x002TxObject0:Data High Bits
0x02C0x003TxObject0:Data Low Bits
0x030-0x03C0x004-0x007TxObject1
0x040-0x04C0x008-0x00BTxObject2
0x050-0x05C0x00C-0x00FTxObject3
0x060-0x06C0x010-0x013TxObject4
0x070-0x07C0x014-0x017TxObject5
0x080-0x08C0x018-0x01BTxObject6
0x090-0x09C0x01C-0x01FTxObject7
0x0A0-0x0AC0x020-0x023TxObject8
0x0B0-0x0BC0x024-0x027TxObject9
0x0C0-0x0CC0x028-0x02BTxObject10
0x0D0-0x0DC0x02C-0x02FTxObject11
0x0E0-0x0EC0x030-0x033TxObject12
0x0F0-0x0FC0x034-0x037TxObject13
0x100-0x10C0x038-0x03BTxObject14
0x110-0x11C0x03C-0x03FTxObject15
0x120-0x12C0x040-0x043TxObject16
0x130-0x13C0x044-0x047TxObject17
0x140-0x14C0x048-0x04BTxObject18
0x150-0x15C0x04C-0x04FTxObject19
0x160-0x16C0x050-0x053TxObject20
0x170-0x17C0x054-0x057TxObject21
0x180-0x18C0x058-0x05BTxObject22
0x190-0x19C0x05C-0x05FTxObject23
0x1A0-0x1AC0x060-0x063TxObject24
0x1B0-0x1BC0x064-0x067TxObject25
0x1C0-0x1CC0x068-0x06BTxObject26
0x1D0-0x1DC0x06C-0x06FTxObject27
0x1E0-0x1EC0x070-0x073TxObject28
0x1F0-0x1FC0x074-0x077TxObject29
0x200-0x20C0x078-0x07BTxObject30
0x210-0x21C0x07C-0x07FTxObject31
0x2200x080RxObject0:Control Bits
0x2240x081RxObject0:Identifier Bits
0x2280x082RxObject0:Data High Bits
0x22C0x083RxObject0:Data Low Bits
0x2300x084RxObject0:AMR - ID
0x2340x085RxObject0:ACR - ID
0x2380x086RxObject0:AMR - Data
0x23C0x087RxObject0:ACR - Data
0x240-0x25C0x088-0x08FReceive Message Object 1
0x260-0x27C0x090-0x097Receive Message Object 2
0x280-0x29C0x098-0x09FReceive Message Object 3
0x2A0-0x2BC0x0A0-0x0A7Receive Message Object 4
0x2C0-0x2DC0x0A8-0x0AFReceive Message Object 5
0x2E0-0x2FC0x0B0-0x0B7Receive Message Object 6
0x300-0x31C0x0B8-0x0BFReceive Message Object 7
0x320-0x33C0x0C0-0x0C7Receive Message Object 8
0x340-0x35C0x0C8-0x0CFReceive Message Object 9
0x360-0x37C0x0D0-0x0D7Receive Message Object 10
0x380-0x39C0x0D8-0x0DFReceive Message Object 11
0x3A0-0x3BC0x0E0-0x0E7Receive Message Object 12
0x3C0-0x3DC0x0E8-0x0EFReceive Message Object 13
0x3E0-0x3FC0x0F0-0x0F7Receive Message Object 14
0x400-0x41C0x0F8-0x0FFReceive Message Object 15
0x420-0x43C0x100-0x107Receive Message Object 16
0x440-0x45C0x108-0x10FReceive Message Object 17
0x460-0x47C0x110-0x117Receive Message Object 18
0x480-0x49C0x118-0x11FReceive Message Object 19
0x4A0-0x4BC0x120-0x127Receive Message Object 20
0x4C0-0x4DC0x128-0x12FReceive Message Object 21
0x4E0-0x4FC0x130-0x137Receive Message Object 22
0x500-0x51C0x138-0x13FReceive Message Object 23
0x520-0x53C0x140-0x147Receive Message Object 24
0x540-0x55C0x148-0x14FReceive Message Object 25
0x560-0x57C0x150-0x157Receive Message Object 26
0x580-0x59C0x158-0x15FReceive Message Object 27
0x5A0-0x5BC0x160-0x167Receive Message Object 28
0x5C0-0x5DC0x168-0x16FReceive Message Object 29
0x5E0-0x5FC0x170-0x177Receive Message Object 30
0x600-0x61C0x178-0x17FReceive Message Object 31