Controller Area Network (CAN) Prototyping With the ARM Cortex-M3 Processor
by Wilfried Voss, president and owner of Copperhill Technologies
The purpose of this series of online posts is to give the interested engineer or hobbyist a head start on the technology involved with Controller Area Network (CAN) prototyping using the ARM Cortex-M3 processor.
It is important to note that the prototyping hardware, software drivers, and the software development tools will take precedence over actual application development. Nevertheless, the information as provided will enable you to write your first application within shortest time, and some programming samples are provided.
For the specific purpose of quick and easy prototyping, this series of posts needs to reference a number of aspects that are impossible to explain in all detail in one place (besides the fact that detailed technical literature on these topics already exists). They are:
- Controller Area Network and higher-layer protocols such as CANopen, DeviceNet and SAE J1939.
- The ARM Cortex-M3 Processor
- The Arduino Due
- The mbed NXP LPC1768
In addition to above mentioned prototyping systems, namely the mbed LPC1768 and the Arduino Uno, I will also introduce two systems that we sell through this website. They are:
- LandTiger NXP LPC1768 Development Board
- jBoard-X2 Industrial CAN Bus and SAE J1939 Prototyping Board
Throughout this series of posts, I will repeat myself by saying that the mbed LPC1768 and the Arduino Due are without a doubt great systems for CAN Bus and SAE J1939 prototyping, but they do lack one important feature that is mandatory for professional embedded programming: A Debugger. In order to accomplish effective debugging (i.e. line by line within your source code), you do need a JTAG debugger, and systems such as the jBoard-X2 and the Landtiger board support debugging at a very low cost level.
Coming back to the topic at hand, all necessary aspects will be explained to a degree that fits the ultimate purpose of this series, the quick and easy Controller Area Network (CAN) prototyping with the ARM Cortex-M3 processor. All posts will, however, contain multiple references to websites and technical literature for the reader who is interested in more detail.
A Note from the Author
It is not too long ago that I re-discovered an old love, embedded programming, by working with an inexpensive, yet surprisingly versatile hardware system, the Arduino Uno. I started with a simple project, Controller Area Network (CAN) prototyping, and from there on I worked my way into higher hardware levels. I used the Arduino Mega 2560 for a full SAE J1939 protocol implementation, and I am now working with the most versatile of all embedded processors, the ARM microcontroller family, specifically the ARM Cortex M3.
In the following, I will address the aspects of Controller Area Network (CAN) prototyping using two inexpensive, yet extremely versatile ARM Cortex M3 systems, namely the Arduino Due and the mbed NXP LPC1768. In addition, I will introduce systems on a more professional level, the LandTiger NXP LPC1768 development board and the jBoard-X2.
It is important to understand that my intention with this series of posts is primarily providing the basic means to the reader, which includes the description of available resources, hardware and software, but all with a focus on Controller Area Network and SAE J1939.
I will not provide complete CAN applications in this book, but I will follow up with further application notes, including project code, that can be downloaded through this website.
About the Author
I am the author of the “Comprehensible Guide” series of technical literature covering topics like Controller Area Network (CAN), SAE J1939, Industrial Ethernet, and Servo Motor Sizing. I have worked in the CAN industry since 1997 and before that was a motion control engineer in the paper manufacturing industry. I have a master’s degree in electrical engineering from the University of Wuppertal in Germany.
During the past years, I have conducted numerous seminars on industrial fieldbus systems such as CAN, CANopen, SAE J1939, Industrial Ethernet, and more during various Real Time Embedded And Computing Conferences (RTECC), ISA (Instrumentation, Systems, and Automation Society) conferences and various other events all over the United States and Canada.
I had the opportunity of traveling the world extensively, but settled in New England in 1989. I presently live in an old farmhouse in Greenfield, Massachusetts with my red-haired, green-eyed Irish-American wife and our son Patrick.
Contact the Author
Despite all efforts in preparing this book, there is always the possibility that some aspects or facts will not find everybody’s approval, which prompts us, author and publisher, to ask for your feedback. If you would like to propose any amendments or corrections, please send us your comment. We look forward to any support in supplementing this book, and we welcome all discussions that contribute to making the topic of this book as thorough and objective as possible.
To submit amendments and corrections please log on to this website at https://copperhilltech.com/contact-us/ and leave a note.
All Arduino sketches and other code samples and projects as introduced in this book are free software; you can redistribute and/or modify them. The programs are introduced in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. With downloading these programs, you confirm that these code samples and projects were created for demonstration and educational purpose only.
Table of Content
The following represents an overview of all posts that have been written or are in preparation:
- Introduction to CAN Bus and SAE J1939 Prototyping
- Introduction to Controller Area Network
- Introduction to SAE J1939
- The ARM® Cortex™-M3 Processor
- The Prototyping Hardware
- Arduino Due
- mbed LPC1768
- CAN Interface
- CAN Breakout Boards
- The LandTiger LPC1768 Development Board
- The jBoard-X2 Industrial CAN Bus and SAE J1939 Prototyping Board
- The Development Environment
- Arduino Due
- mbed LPC1768
- LandTiger Board
- Connecting the Hardware to an Automotive Network
- The CAN Application Layer
- Arduino Due CAN Software
- mbed LPC1768 Software
- LandTiger Software
- jBoard-X2 Software
- CAN Application Programming
- Simple CAN Transmission & Reception Test Program
- CAN Network Monitoring Software
- CAN Function Library
Controller Area Network (CAN) is a serial network technology that was originally designed for the automotive industry, especially for European cars, but has also become a popular bus in industrial automation as well as other applications.
The CAN bus is primarily used in embedded systems, and as its name implies, is a network technology that provides fast communication among microcontrollers up to real-time requirements, eliminating the need for the much more expensive and complex technology of a Dual-Ported RAM. This book provides complete information on all CAN features and aspects combined with a high level of readability.