STMicroelectronics SPC572L series Reference Manual page 1084

Table of Contents

Advertisement

CAN Subsystem
Precision calibration must be repeated in predefined maximum intervals supervised by the
calibration watchdog.
Note:
When the Clock Calibration on CAN unit transits from state Precision_Calibrated back to
Basic_Calibrated, the calibration OK signal is deasserted, the attached M_CANs complete
ongoing transmissions, and then enter restricted operation (no frame transmission, no error
or overload flag transmission, no error counting).
44.3.16.4.1 Configuration
The Clock Calibration on CAN Unit is configured via register CCFG. The register is only
writeable while cu_cce ='1', i.e. when the attached M_CAN has CCCR.CCE and
CCCR.INIT set.
For basic calibration the minimum number of oscillator periods between two consecutive
falling edges at pin cu_rx is measured. The number of clock periods depends on the clock
frequency applied at input cu_pclk. In case the measured number of clock periods is below
the minimum configured by CCFG.OCPM e.g. due to a glitch on cu_rx, the value is
discarded and measurement continues.
It is recommended to configure CCFG.OCPM slightly below two CAN bit times:
CCFG.OCPM < ((2 x CAN bit time) / cu_pclk period) / 32
The length of the bit field used for precision calibration can be configured to 32 or 64 bits via
CCFG.CFL. The number of bits used for precision calibration has an impact on calibration
accuracy and the maximum distance between two calibration messages. The reception of
the bits is signaled by the attached M_CAN by input cu_spt.
The number of time quanta per bit time configured by CCFG.TQBT is used together with the
measured number of oscillator clock periods CSTAT.OCPC to define the number of
oscillator clocks per bit time.
When the clock calibration is bypassed by configuring CCFG.BCC = '1', the internal clock
divider has to be configured via CCFG.CDIV to fulfill the condition m_can_cclk <
m_can_hclk.
Note:
When clock calibration on CAN is active (CCFG.BCC = '0'), the baud rate prescaler of the
attached M_CANs has to be configured to inactive.
44.3.16.4.2 Status signaling
The status of the Clock Calibration on CAN Unit can be monitored by reading register
CSTAT. When
in state Precision_Calibrated the oscillator clock period counter CSTAT.OCPC signals the
number of oscillator clock periods in the calibration field while CSTAT.TQC signals the
number of time quanta in the calibration field.
The calibration state is monitored by CSTAT.CALS. A change of the calibration state is
signalled at the module interface by cu_csc. The duration of a cu_csc pulse is one cu_hclk
period. A change of the calibration state also sets interrupt flag CUIR.CSC. If enabled by
CUIE.CSCE, interrupt line cu_int is activated (set to high). Interrupt line cu_int remains
active until interrupt flag CUIR.CSC is reset.
A calibration watchdog event is signalled by output cu_cwe. The duration of a cu_cwe pulse
is one cu_hclk period. A calibration watchdog event also sets interrupt flag CUIR.CWE. If
1084/2058
DocID027809 Rev 4
RM0400

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SPC572L series and is the answer not in the manual?

Table of Contents