NXP Semiconductors LPC5500 Series Manual

NXP Semiconductors LPC5500 Series Manual

How to use can-fd to transfer data
Hide thumbs Also See for LPC5500 Series:

Advertisement

Quick Links

AN12728
How to Use CAN-FD to Transfer Data on LPC5500 Series
Rev. 3 - 17 June, 2021

1 Introduction

The LPC55S1x/LPC55S0x features a CAN controller supporting CAN-FD.
LPC5500 series SDK provides the
demonstrates the use of CAN to transfer data. Based on this example,
this application note describes how to use CAN-FD's Bit Rate Switch and
transmitter delay compensation features. Enabling these two features can
improve throughput and eliminate the bit error caused by transmitter delay.

2 CAN-FD

CAN-FD is defined in the international standard ISO 11898-1:2015. For quick
start on using CAN-FD, this section introduces some key features of CAN-FD
and aims the users who are familiar with CAN.

2.1 Differences between CAN and CAN-FD

There are two key differences between classical CAN and CAN-FD. The first is that CAN-FD can use much higher bitrates than
classical CAN. Classical CAN is limited to 1 Mbit/s. CAN-FD does not have a theoretical limit, but in practice it is limited by the
transceivers. The second key difference is the increased amount of data per CAN message. Classical CAN is limited to 8 bytes.
CAN-FD limit is increased eight-fold to 64 bytes per message.
With the increased amount of data per CAN message, CAN-FD frames need higher bit rate to decrease the delay time in the
communication and increase real-time performance. The CAN-FD frames can reach higher bit rates through enabling bitrate
switch feature.
On the other hand, the bit rate is higher, the bit time is shorter. In order to enable a data phase bit time that is even shorter than the
transmitter delay, the delay compensation is introduced. Without transmitter delay compensation, the bit rate in the data phase
of a CAN-FD frame is limited by the transmitter delay.

2.2 Bit Rate Switch

In the CAN-FD frame control phase, data phase, and CRC phase are transmitted with a higher bit rate than the beginning and the
end of the frame.
The Bit Rate Switch feature is enabled by setting the BRSE bit in the CCCR register. When enabling the Bit Rate Switch, we also
need to set arbitration phase bit rate (before enabling Bit Rate Switch) and data phase bit rate (after enabling Bit Rate Switch)
correctly. The arbitration phase bit rate is set by the NBTP register, the data phase bit rate is set by DBTP register.

2.3 Transmitter delay compensation

The protocol unit of the MCAN has implemented a delay compensation mechanism to compensate the transmitter delay. The
transmitter delay compensation enables configurations where the data bit time is shorter than the transmitter delay, that is
described in detail in the new ISO11898-1. It is enabled by setting the TDC bit in the DBTP register. The TDCO field in the TDCR
register is used for setting the transmitter delay compensation offset. The offset value defines the distance between the measured
delay from m_can_tx to m_can_rx and the secondary sample point. The transmitter delay compensation offset and secondary
sample point are show in
Figure
mcan_interrupt_transfer
1.
Contents
1
2
2.1
example
2.2
2.3
3
3.1
3.2
3.3
3.4
3.5
4
Application Note
Introduction......................................1
CAN-FD...........................................1
CAN-FD....................................... 1
Bit Rate Switch.............................1
..................................................... 1
Demonstration................................. 2
Hardware environment.................2
Software environment.................. 3
Steps and results......................... 5
Revision history............................... 6

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LPC5500 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for NXP Semiconductors LPC5500 Series

  • Page 1 AN12728 How to Use CAN-FD to Transfer Data on LPC5500 Series Rev. 3 — 17 June, 2021 Application Note Contents 1 Introduction Introduction........1 CAN-FD...........1 The LPC55S1x/LPC55S0x features a CAN controller supporting CAN-FD. Differences between CAN and LPC5500 series SDK provides the...
  • Page 2 This is also used for UART communication to UART terminal on the PC. Taking LPC55S16 as example, Figure 2 shows the board setup and CAN connections. How to Use CAN-FD to Transfer Data on LPC5500 Series, Rev. 3, 17 June, 2021 Application Note 2 / 7...
  • Page 3 • UART terminal program — PuTTY, or similar one 3.3 Using CAN-FD steps overview The LPC5500 series SDK driver example: mcan demonstrates how to use CAN-FD to transfer data. In this example, the following steps are required: • Set the system clock •...
  • Page 4 The prescaler m is equivalent to (preDivider + 1). The t_q can have a length of t_q = (preDivider + 1) / 60 MHz = (preDivider + 1) / 60 (µs) How to Use CAN-FD to Transfer Data on LPC5500 Series, Rev. 3, 17 June, 2021 Application Note...
  • Page 5 A terminal is shown in Figure 4 and the message displays on the node B terminal is shown in Figure 5 How to Use CAN-FD to Transfer Data on LPC5500 Series, Rev. 3, 17 June, 2021 Application Note 5 / 7...
  • Page 6 Replaced LPC55S16 with LPC5500 series 17 June, 2021 • Updated Software environment due to MCUXpresso tool version change • Removed Config Transmitter Delay Compensation How to Use CAN-FD to Transfer Data on LPC5500 Series, Rev. 3, 17 June, 2021 Application Note 6 / 7...
  • Page 7 Right to make changes - NXP Semiconductors reserves the right to make changes to information published in this document, including without limitation specifications and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof.

Table of Contents