XA-C3 NXP Semiconductors, XA-C3 Datasheet - Page 54

The XA-C3 is a member of the Philips XA (eXtended Architecture) family of high-performance 16-bit single-chip microcontrollers

XA-C3

Manufacturer Part Number
XA-C3
Description
The XA-C3 is a member of the Philips XA (eXtended Architecture) family of high-performance 16-bit single-chip microcontrollers
Manufacturer
NXP Semiconductors
Datasheet
Philips Semiconductors
At the start of a non–Fragmented message, prior to writing any data
bytes, the DMA will begin by writing 01h into the first byte of the
buffer (byte 0). Once the complete frame has been stored, the DMA
will write the frame information into byte 0, with bits [5] and [4]
always set to ‘1’.
When the application wants to read from the object’s buffer, it can
read byte 0 to determine if the DMA is currently updating the buffer.
If byte 0 contains 01h, then the buffer is currently being updated.
The application should not continue to read from the buffer.
When the application starts to read from the buffer, it should set the
semaphore to 10b. After reading is finished, the application should
check the semaphore again. If it is still 10b, everything is OK.
If, however, the semaphore becomes 01b or 11b after the CPU
access is finished, it means that either the buffer is currently being
accessed by DMA or has been accessed by DMA during the time
the CPU was performing reads. In either case, the CPU should wait
until the semaphore bits become 11b again, and reread.
Use of the semaphore bits is not mandatory. However, their use may
help to maintain data consistency.
There are no dedicated semaphore bits for use with Fragmented
messages. In the case of a Fragmented message (in DeviceNet
only), the DMA will write a 00h in byte 0 of the object’s buffer. After
OSEK, DEVICENET, AND CANOPEN FRAMES OF INTEREST
OSEK ConsecutiveFrame
DeviceNet I/O Message
Fragment Type = 00
CANopen Download Domain Segment Request
c = 0 ... not last segment
CANopen Auto–Acknowledge Tx Response to Download Domain Segment
CAN/CTL RELATED INTERRUPTS
The CAN/CTL module will generate five different Event interrupts to
the XA core:
2000 Jan 25
Fragment Count = 0 ... This is the First Fragment
Fragment Count = 3F ... This is both the First and Last Fragment
Rx Message Complete
Tx Message Complete
Rx Buffer Full
Message Error
Frame Error
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
Data Byte
Data Byte
Data Byte
Data Byte
2 – DLC
2 – DLC
2 – DLC
2 – 8
1
1
1
1
Bit 7
Bit 7
Bit 7
Bit 7
0
Fragment Type
ccs (User specified)
scs (User specified)
Bit 6
Bit 6
Bit 6
Bit 6
0
Bit 5
Bit 5
Bit 5
Bit 5
1
Bit 4
Bit 4
Bit 4
Bit 4
47
0
t
t
the completion of a CTL message, the byte count (1 to 255) will be
written to byte 0.
Avoiding Data Corruption for Transmit Message Objects
To avoid data corruption when transmitting messages, there are
three possible approaches:
1. If the Message Complete interrupt is enabled for the transmit
2. Wait until OBJ_EN clears before writing to the buffer. This can be
3. Clear OBJ_EN, while the object is still in pre–arbitration.
In the first two cases, the pending message will be transmitted
completely before the next message gets sent. For the third case,
the message will not be transmitted. Instead, a message with new
content will enter pre–arbitration.
There is an additional mechanism that prevents corruption of a
message that is being transmitted. If a transmission is ongoing for a
Message Object, the XA-C3 hardware will prevent the User from
clearing the OBJ_EN bit in the object’s MnCTL register.
Fragment Type = 01 ... Middle Fragment
Fragment Type = 10 ... Last Fragment
c = 1 ... last segment
Rx and Tx Message Complete Interrupts
In the following discussion (and elsewhere in the document) the
term “message” applies to a complete transfer of information. For
single–frame messages, the “message complete” condition occurs
at the end of the frame. For multi–frame (Fragmented) messages,
message complete occurs after the last frame is received and
stored. Since the hardware doesn’t recognize or handle
Fragmentation for transmit messages, the Tx message complete
User Data
User Data
User Data
reserved
message, the User application would write to the transmit buffer
after seeing the interrupt. Once the interrupt flag is set, it is
known for sure that the pending message has already been
transmitted.
done by polling the OBJ_EN bit.
Bit 3
Bit 3
Bit 3
Bit 3
Fragment Count
n (User specified)
not used, always 0000
Bit 2
Bit 2
Bit 2
Bit 2
SN
Bit 1
Bit 1
Bit 1
Bit 1
Preliminary specification
XA-C3
Bit 0
Bit 0
Bit 0
Bit 0
c

Related parts for XA-C3