ARM Technical Support Knowledge Articles

USING CAN WITH THE C505C & C515C

Applies to: RTX51 Real-time Kernel

Answer

QUESTION

RTX51 says it supports the Siemens C515C, but I don't find any mention of the Siemens C505C in the documentation. How do I make the CAN library work with that part?

ANSWER

The CAN controller in the C505C and C515C are identical with 2 exceptions that are easy to configure.

First, the C505C lets you specify where the CAN controller resides in the XDATA address space. Second, the interrupt used by the C505C for the CAN controller is different. The values for each controller are as follows:

C505C CAN XDATA Address: XX00h
C515C CAN XDATA Address: F700h

C505C CAN Interrupt: 9
C515C CAN Interrupt: 17

These two things must be configured in the ICANCONF.A51 configuration file.

CONTROLLER_BASE         EQU 0F700H      ; XDATA start-address of the
                                        ; CAN-Controller

; The following constant defines the interrupt-number (as defined by
; RTX51) for the CAN-Controller
;
; Should be: 17 for Siemens C515C
;             9 for Siemens C505C

USED_CAN_INT_NBR        EQU     9

Finally, the CAN controller must be located to the address you specify in ICANCONF.A51. It's probably a good idea to locate it at the same address as the C515C (0xF700).

First, define the XPAGE special function register. This SFR contains the upper address byte of the XDATA address of the CAN controller.

sfr XPAGE = 0x91;

Then, assign the address of the XDATA page to the SFR.

/* Put the CAN controller where the RTX CAN routines expect it. */
XPAGE = 0xF7;

Once these two things are done, CAN routines work identically to the C515C.

Article last edited on: 1999-06-07 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential