|
XA-C3 Datasheet, PDF (52/68 Pages) NXP Semiconductors – XA 16-bit microcontroller family 32K/1024 OTP CAN transport layer controller 1 UART, 1 SPI Port, CAN 2.0B, 32 CAN ID Filters, transport layer co-proce | |||
|
◁ |
Philips Semiconductors
XA 16-bit microcontroller family
32K/1024 OTP CAN transport layer controller
1 UART, 1 SPI Port, CAN 2.0B, 32 CAN ID filters, transport layer co-processor
Preliminary specification
XA-C3
Table 24. Format for storing the CANopen Acknowledge byte
7
6
5
4
3
2
1
0
Byte offset 0
scs
t = d.c.
X
X
X
X
Byte offset 1
Byte offset 2
Byte offset 3
Byte offset 4
Not used in the protocol
Byte offset 5
Byte offset 6
Byte offset 7
MnFCR: Message n Fragmentation Count Register
D Address: MMR base + nEh
D Access: Read, write. Byte or word access.
D Reset Value: 00xxxxxxb (unused bits are always read as â0â)
MNFCR
7
6
5
4
3
2
1
0
â
â
count
An objectâs Fragmentation Count Register need not be configured
by the User in DeviceNet systems. However, in CANopen and
OSEK systems, the User must initialize this register.
GCTL: Global Control Byte (applies to all objects)
GCTL
7
6
5
4
â
â
â
â
D Address: MMR base + 27Eh
D Access: Read, write, R/M/W, byte or word
D Reset Value: 00h
3
Auto_Ack
2
Pre_Arb
1
Prtcl1
0
Prtcl0
Auto_Ack
Pre_Arb
[Prtcl1 Prtcl0]
Enables automatic acknowledge for CANopen.
0 = disable, 1 = enable.
Establishes the transmit preâarbitration
scheme. 0 = Preâarbitration based on CAN ID,
object number is secondary tieâbreaker. 1 =
Preâarbitration based on object number only.
Indicates CTL protocol of the system (if any).
00 = CAN
01 = DeviceNet
10 = CANopen
11 = OSEK
Transmit Message Objects and the Transmit
Process
In order to transmit a message, the XA application program needs to
first assemble the complete message and store it in the message
buffer area for that Message Object (the address of the message
buffer would have been previously programmed into the objectâs
MnBLR register). The header (CAN ID and Frame Information) must
be written to the objectâs MnMIDH, MnMIDL, and MnMSKH registers
as appropriate.
When the above is done, the Application is ready to transmit the
message. To initiate a transmission, the object enable bit (OBJ_EN)
must be set (except when transmitting an AutoâAcknowledge frame
in CANopen). This will allow this readyâtoâtransmit message to
participate in the preâarbitration process.
If more than one message is ready to be transmitted. A soâcalled
preâarbitration process will be performed to determine which
Message Object will be selected for transmission. There are two
preâarbitration policies which the User can choose between by
setting or clearing the Pre_Arb bit in the GCTL register.
After a Tx Message Complete, the Tx PreâArbitration process is
âresetâ, and begins again. Also, if the winning Message Object
subsequently loses arbitration on the CAN bus, the Tx
PreâArbitration process gets reset and begins again.
If there is only one transmit message whose OBJ_EN bit is set, it
will be selected regardless of the preâarbitration policy.
PreâArbitration Based on Priority (default mode)
This mode is selected by writing â0â to the Pre_Arb bit in GCTL[2].
The filter state machine goes through all transmit Message Objects
for which the OBJ_EN bit is set. The message with the highest
priority as defined by the CAN arbitration ID field will be selected
for transmission. If more than one pending transmit message share
the same CAN identifier, then secondary priority will be based on
XA-C3 Message Object numbers, with the lowest numbered object
winning access.
The winning message will then be output onto the CAN bus where it
will compete for access with other transmitting nodes.
PreâArbitration Based on Object Number
As an alternative, the User may select to base preâarbitration on
Message Object number alone. This mode is selected by writing â1â
to the Pre_Arb bit in GCTL[2].
The preâarbitration state machine will go through the Message
Objects sequentially, starting with object number 0, and select the
first encountered transmit Message Object, with OBJ_EN set to â1â,
for transmission. In other words, the order in which the messages
objects are examined in the preâarbitration process is by increasing
object number n, where n = 0â¦31. Each time preâarbitration begins,
the enabled message with the lowest object number will be selected
2000 Jan 25
45
|
▷ |