Dual module clock supply for CAN communication module

A CAN communication module (10) comprising a protocol kernel (14) and a CAN logic block (12) is provided. The protocol kernel includes a CAN bus interface and the CAN logic block includes a module interface for connection to an external peripheral bus (22), a message RAM (28) and a CAN message handler (26). The protocol kernel (14) and the CAN logic block (12) have separate clock inputs (32,36).

CROSS REFERENCE TO RELATED APPLICATIONS

FIELD OF THE INVENTION

The present invention relates to a Controller Area Network (CAN) communication module.

BACKGROUND OF THE INVENTION

In a Controller Area Network (CAN), each node is connected to the serial CAN bus through an associated CAN communication module. The CAN communication module is the link between the CAN bus with its communication in accordance with the CAN protocol and a connected device. The connected device has a controller with a central processing unit (CPU) and a bus to which the communication module is connected through its module interface. Messages to be exchanged between the CAN bus and the CPU are buffered in a message RAM, also referred to as “Mailbox” RAM. To avoid any read/write conflicts at the message RAM and at the registers of the module interface, the conditions of these elements must be monitored. In order to reduce the CPU load, a CAN message handler is provided which performs all functions concerning safe message handling.

One requirement of the CAN protocol is bit timing. The nominal bit time is equal to 1 divided by the bit rate, which can be up to 1 MBit/s. The nominal bit time is divided into a synchronization segment, a propagation time segment and two phase buffer segments, the sample point being intermediate the two phase buffer segments. Since the bit timing is directly influenced by the clock used in the communication module, a clock signal with a frequency jitter of not more than 1.5% is needed for proper operation of the module. For more details, reference is made to the ISO 11898 standard.

In specific environments such as in automotive applications, low electromagnetic interference (EMI) is a requirement. Since electromagnetic interference depends on the frequency distribution, embedded systems are provided with a frequency modulated system clock to spread the spectrum of emitted frequencies. For an effective attenuation of the EMI, a clock frequency variation up to 10% may be used. While many systems are able to operate properly with a system clock that has a large frequency jitter, in a conventional CAN communication module, a frequency modulated system clock would be in conflict with the requirement of the clock frequency jitter being not more than 1.5%. Attempts to supply the CAN communication module with a jittery clock have resulted in limited bit timing setups. These solutions are problematic in terms of conformance to the CAN Standard and entail expensive conformance tests for each application's CAN bit timing setup.

SUMMARY OF THE INVENTION

The present invention provides a CAN communication module that comprises a protocol kernel and a CAN logic block. The protocol kernel includes a CAN bus interface and the CAN logic block includes a module interface for connection to an external peripheral bus, a message RAM and a CAN message handler. According to the invention, the protocol kernel and the CAN logic block have separate clock inputs. The protocol kernel can thus be supplied with a clock signal that has a low frequency jitter and may have a relatively low clock frequency, and the CAN logic block can be supplied with a clock signal that has a modulated clock frequency and may be of a relatively high frequency in view of performance requirements. Accordingly, the bit timing is not affected by the jittery clock used in the CAN logic block (the “logic clock”), and yet the resulting EMI is minimized by spreading the frequency spectrum of the logic clock.

In a preferred embodiment of the invention, a clock generator is used that has a fixed frequency oscillator which supplies a low jitter clock signal, and has a frequency modulation phase locked loop circuit (PLL) with a reference input receiving the low jitter clock signal. The frequency modulation PLL provides a logic clock signal which may have a frequency that is a multiple of the low jitter clock signal. The clock input of the protocol kernel is connected to the low jitter clock output and the clock input of the CAN logic block is connected to the logic clock output of the clock generator.

The CAN communication module of the invention is fully compliant with the CAN Standard for all possible CAN bit timings so that expenses for conformance tests can be minimized. The logic block of the module can be supplied with a jittery clock of a relatively high frequency to allow high performance features with reduced electromagnetic interference (EMI). For providing both of the logic clock and the kernel clock, only a PLL is needed in addition to the clock oscillator. The increase in module size over a conventional module with a single clock input is negligible.

DETAILED DESCRIPTION OF THE DRAWINGS

With reference toFIG. 1, a CAN communication module10comprising a CAN logic block12and a protocol kernel14is shown, through which a node in a CAN network may be connected to a CAN bus. CAN communication module10together with the protocol kernel14is a peripheral module in an embedded microcontroller system or may be a separate integrated chip. Protocol kernel14includes a CAN bus interface with a serial output TX for sending signals to a CAN bus16and a serial input RX for receiving signals from CAN bus16. For transmission purposes output TX and input RX are connected to CAN bus16via a CAN bus transceiver18which guarantees a connection to the physical layer. CAN logic block12includes a 32 bit wide parallel module interface20connected to a peripheral bus22.

CAN logic block12includes the following principal blocks: a module interface handler24, a CAN message handler26, a message RAM28and control and status registers30. The module interface handler24is connected to the parallel interface which is shown as a 32-bit interface. This interface must be adapted to the peripheral bus used and may as well be a 8- or 16-bit interface. Module interface handler24is interconnected with CAN message handler26. The CAN message handler26is interconnected with message RAM28and control and status registers30. The CAN logic block12receives a logic clock at a clock input32.

In operation, a CPU is connected via the peripheral bus22to CAN logic block12. Message objects used in a CAN network and identifier masks which are used for acceptance filtering of received messages are stored in the message RAM28. All functions concerning the handling of messages are implemented in the message handler26which is a state machine. In the control register30configuration data for the message handler are stored, while the status register30is used e.g. for error flags. All data processing in the blocks of CAN logic block12and all data transmission between these blocks is timed by the logic clock received at clock input32. In order to guarantee the performance required, the frequency of this logic clock can be up to 100 MHz. In embedded systems with CPU and module clocks as high as 100 MHz, the electromagnetic interference requirements are often only met by frequency modulating the clock frequency. Therefore, the logic clock fed into clock input32is a frequency modulated clock of a frequency up to 100 MHz.

Protocol kernel14is connected to the CAN message handler26of the CAN logic block12via a parallel 32-bit connection. Protocol kernel14includes reception, transmission, control and status registers34. It receives a kernel clock at a clock input36. In the protocol kernel14a parallel/serial conversion of the messages is performed. The bit rate at the serial output can be up to 1 Mbit/s depending on the CAN system in which the CAN communication module10is used. Another important task of protocol kernel14is the bus arbitration which is specified in the ISO 11898 standard. The bitwise arbitration resolves bus access conflicts by comparing identifiers which are included in each frame. Protocol kernel14also performs the bit timing required by the CAN protocol. ISO 11898 standard states, that it must be possible to divide the nominal bit time at least by 8 to get a synchronization segment, a propagation time segment and two phase buffer segments with specific durations. Thus, the frequency of the kernel clock must be at least 8 MHz to achieve the maximal baudrate of 1 Mbit/s. Furthermore, the standard states a maximum oscillator tolerance of 1.58%. Therefore, the kernel clock fed to clock input36is a low jitter clock with a relatively low frequency with a minimum of 8 MHz.

A switch40allows to switch clock input36to clock input32, thus having the same clock for logic block12and protocol kernel14, or to connect clock input36to the separate clock input38. Switch40gives the flexibility to use the same clock for example in an application, in which the EMI requirements on the logic clock are not important and a jitter free clock or a clock with only a low jitter may be used as logic clock and at the same time as kernel clock.

In the inventive CAN communication module, the clock signals which are input at logic clock input32and kernel clock input36are produced by a dual clock generator42as shown inFIG. 2. The dual clock generator42comprises a quartz resonator44, a fixed frequency oscillator46and a phase locked loop48. Phase locked loop48comprises a frequency modulated phase locked loop50and a prescaler52. Fixed frequency oscillator46with the connected quartz resonator44outputs a low jitter clock signal54at a relatively low frequency with a minimum of 8 MHz. This low jitter clock signal54is output to kernel clock input38and to a reference input56of phase locked loop48, where the signal is frequency modulated. An output from frequency modulated phase locked loop50is connected to prescaler52. Frequency modulated phase locked loop50multiplies the oscillator signal frequency54(by 1, 2, 4 or 8). The output from frequency modulated phase locked loop50can subsequently been divided by a prescale value of 1, 2, 4 or 8 and outputs a logic clock output signal58, which is fed to logic clock input32. Logic clock output signal58is a clock signal with a frequency up to 100 MHz and frequency modulated in a way to fulfil the EMI requirements. This logic clock output signal can also be used as clock signal to the CPU and other peripheral modules in the system.

In a preferred embodiment, the frequency modulated phase locked loop50can be adapted to operate in a first mode with a high frequency jitter and in a second mode with a low frequency jitter. Alternatively, the frequency modulation can be switched off In an environment with low EMI requirements, a jitter free logic clock or a logic clock with only a low frequency jitter may be used as well for protocol kernel14as for CAN logic block12. In this case, switch40, which is shown inFIG. 1, connects clock input36of protocol kernel14to clock input32of CAN logic block12and only one clock is used for CAN communication module10.