
GR716-DS-UM, May 2019, Version 1.29
216
www.cobham.com/gaisler
GR716
25.5.5 Straight buffer
It is possible to use the circular buffer as a straight buffer, with a higher granularity than the 1kbyte
address boundary limited by the base address (CanTxADDR.ADDR) field.
While the channel is disabled, the read pointer (CanTxRD.READ) can be changed to an arbitrary
value pointing to the first message to be transmitted, and the write pointer (CanTxWR.WRITE) can
be changed to an arbitrary value.
When the channel is enabled, the transmission will start from the read pointer and continue to the
write pointer.
25.5.6 AMBA AHB error
Definition:
•
a message fetch occurs when no other messages is being transmitted
•
a message prefetch occurs when a previously fetched message is being transmitted
•
the local fetch buffer holds the message being fetched
•
the local prefetch buffer holds the message being prefetched
•
the local fetch buffer holds the message being transmitted by the CAN core
•
a successfully prefetched message is copied from the local prefetch buffer to the local fetch buf-
fer when that buffer is freed after a successful transmission.
An AHB error response occurring on the AMBA AHB bus while a CAN message is being fetched
will result in a TxAHBErr interrupt.
If the CanCONF.ABORT bit is set to 0b, the channel causing the AHB error will skip the message
being fetched from memory and will increment the read pointer. No message will be transmitted.
If the CanCONF.ABORT bit is set to 1b, the channel causing the AHB error will be disabled
(CanTxCTRL.ENABLE is cleared automatically to 0 b). The read pointer can be used to determine
which message caused the AHB error. Note that it could be any of the four word accesses required to
read a message that caused the AHB error.
If the CanCONF.ABORT bit is set to 1b, all accesses to the AMBA AHB bus will be disabled after an
AMBA AHB error occurs, as indicated by the CanSTAT.AHBErr bit being 1b. The accesses will be
disabled until the CanSTAT register is read, and automatically clearing bit CanSTAT.AHBErr.
An AHB error response occurring on the AMBA AHB bus while a CAN message is being prefetched
will not cause an interrupt, but will stop the ongoing prefetch and further prefetch will be prevented
temporarily. The ongoing transmission of a CAN message from the fetch buffer will not be affected.
When the fetch buffer is freed after a successful transmission, a new fetch will be initiated, and if this
fetch results in an AHB error response occurring on the AMBA AHB bus, this will be handled as for
the case above. If no AHB error occurs, prefetch will be allowed again.
25.5.7 Enable and disable
When an enabled transmit channel is disabled (CanTxCTRL.ENABLE=0b), any ongoing CAN mes-
sage transfer request will not be aborted until a CAN bus arbitration is lost or the message has been
sent successfully. If the message is sent successfully, the read pointer (CanTxRD.READ) is automati-
cally incremented. Any associated interrupts will be generated.
The progress of the any ongoing access can be observed via the CanTxCTRL.ONGOING bit. The
CanTxCTRL.ONGOING must be 0b before the channel can be re-configured safely (i.e. changing
address, size or read pointer). It is also possible to wait for the Tx and TxLoss interrupts described
hereafter.
The channel can be re-enabled again without the need to re-configure the address, size and pointers.