![Altera Cyclone V Device Handbook Download Page 1009](http://html1.mh-extra.com/html/altera/cyclone-v/cyclone-v_device-handbook_29107911009.webp)
Software Reset
Software initialization is done by setting the
Init
bit in the CAN control register (
CCTRL
) in the protocol
group (
protogrp
) in the CAN controller register map. This bit is set through the CAN protocol when a
bus off condition occurs on the CAN link. The bit is also set through the hardware reset input described in
Hardware Reset.
Due to the synchronization mechanism between the two clock domains, there might be a delay until the
value written to the
Init
bit can be read back. To assure that the previous value written has been accepted,
read the
Init
bit before setting it to a new value.
The bus off recovery sequence cannot be shortened by setting or resetting the
Init
bit. For more information
about bus off, refer to the CAN Protocol Specification 2.0 parts A and B, available from the Bosch website.
Related Information
•
on page 25-10
•
Hardware Reset
Each CAN controller has a separate reset signal. The reset manager drives the signals on a cold or warm
reset. The reset signal is synchronized to both clock domains and applied to the appropriate logic within the
CAN controllers.
Related Information
on page 3-1
For more information, refer to the
Reset Manager
chapter of the
Cyclone V Device Handbook, Volume 3
.
Interrupts
Each CAN controller generates two interrupt signals. One signal indicates error and status interrupts and
the other signal indicates message object interrupts. Both interrupt signals connect to the global interrupt
controller (GIC). Interrupts are enabled in the CAN control register (
CCTRL
) in the protocol group
(
protogrp
). The CAN interrupt register (
CIR
) in the protocol group (
protogrp
) indicates the highest
priority interrupt that is pending.
Error Interrupts
The following error conditions generate interrupts:
• Bus off—when the transmit error count is equal to or greater than 256, the bus off (
BOff
) bit in the CAN
status register (
CSTS
) in the protocol group (
protogrp
) is set to 1.
• Error warning—when either the transmit error counter or the receive error counters reaches 96, the error
warning status (
EWarn
) bit in the CAN status register (
CSTS
) in the protocol group (
protogrp
) is set
to 1.
CAN Controller Introduction
Altera Corporation
cv_54025
Software Reset
25-10
2013.12.30