Site Information

 Loading... Please wait...

Blog

ESP32 Processor with Internal SJA 1000 CAN Bus Controller

Posted by Wilfried Voss on

This post is an excerpt from our application note Controller Area Network (CAN) Development with ESP32.

ESP32 WiFi, Bluetooth Classic, BLE, CAN Bus ModuleThe ESP32 is a low-cost, low-power system-on-chip microcontroller with integrated WiFi and dual-mode Bluetooth. It employs a Tensilica Xtensa LX6 microprocessor in dual-core and single-core variations. It includes built-in antenna switches, RF balun, power amplifiers, low-noise receive amplifiers, filters, and power management modules. It is a successor to the ESP8266 SoC.

As practiced throughout this application note, I will not repeat details that are already available online but rather point to the ultimate source for information on the ESP32 processor: ESP32 WiFi & Bluetooth MCU I Espressif Systems.

ESP32 Features

  • Single or Dual-Core 32-bit LX6 Microprocessor with clock frequency up to 240 MHz.
  • 520 KB of SRAM, 448 KB of ROM, and 16 KB of RTC SRAM.
  • Supports 802.11 b/g/n WiFi connectivity with speeds up to 150 Mbps.
  • Support for both Classic Bluetooth v4.2 and BLE specifications.
  • 34 Programmable GPIOs.
  • Up to 18 channels of 12-bit SAR ADC and 2 channels of 8-bit DAC
  • Serial Connectivity includes 4 x SPI, 2 x I2C, 2 x I2S, 3 x UART.
  • Ethernet MAC is used for physical LAN communication (requires external PHY).
  • 1 Host controller for SD/SDIO/MMC and 1 Slave controller for SDIO/SPI.
  • Motor PWM and up to 16 channels of LED PWM.
  • Secure Boot and Flash Encryption.
  • Cryptographic Hardware Acceleration for AES, Hash (SHA-2), RSA, ECC, and RNG.

ESP32 Board Components

  • ESP-WROOM-32 Module
  • Two rows of IO Pins (with 15 pins on each side)
  • CP2012 USB – UART Bridge IC
  • Micro–USB Connector (for power and programming)
  • AMS1117 3.3V Regulator IC
  • Enable Button (for Reset)
  • Boot Button (for flashing)
  • Power LED (Red)
  • Some passive components

Further Development Resources


Internet of Things Projects with ESP32: Build exciting and powerful IoT projects using the all-new Espressif ESP32Internet of Things Projects with ESP32: Build exciting and powerful IoT projects

The ESP32, a low-cost MCU with integrated Wi-Fi and BLE capabilities, has various modules and development boards for efficiently building IoT applications. Wi-Fi and BLE are standard network stacks for Internet-of-Things applications, providing cost-effective solutions for your business and project requirements.

This book is a fundamental guide for developing ESP32 programs. It starts by explaining GPIO (General Purpose I/O) programming with sensor devices. The reader gets up to speed with ESP32 development through several IoT projects, such as weather stations, sensor loggers, smart homes, Wi-Fi cams, and Wi-Fi wardriving. The reader learns how to use ESP32 boards to facilitate interactions between mobile applications and cloud servers, such as AWS.  More Information...


Internal SJA 1000 CAN Controller

The ESP32 integrates a CAN Bus controller compatible with the NXP SJA1000. Thus, it is CAN 2.0B (ISO 11898, a.k.a. Classical CAN) specification-compliant.

As with the SJA1000, the ESP32 CAN Bus controller provides only the data link layer and the physical layer signaling sublayer. Therefore, an external transceiver module is required, which converts the ESP32's CAN-RX and CAN-TX signals into CAN_H and CAN_L bus signals. The transceiver, such as the MCP2551 or SN65HVD23X, provides compatibility with ISO 11898-2.

Note: The SJA1000 does not support CAN-FD and is not CAN-FD tolerant. To implement CAN-FD with the ESP32, you must utilize CAN-FD breakout boards accessible via the SPI port.

Adding a CAN Bus Transceiver

As with many other ESP32 hardware features, the CAN controller output (CAN_TX, CAN_RX) can be assigned to almost any GPIO. In the following, we assume GPIO25 (CAN_TX) and GPIO26 (CAN_RX), which appear to be a virtual standard in the industry.

The following image shows a schematic utilizing the popular SN65HVD CAN transceiver:

Alternatively, you can use our ESP32 WiFi, Bluetooth Classic, BLE, and CAN Bus Module to avoid hardware assembly via breadboard and external breakout boards.

ESP32 WiFi, Bluetooth Classic, BLE, CAN Bus Mod

This board has an onboard ESP32 WROOM-32 WiFi, Bluetooth Classic, BLE Module, and a CAN Bus port with a transceiver. Also onboard are an RGB LED and IO pins on a 0.1" pad. Programming is accomplished through the popular Arduino IDE connected to the USB-to-Serial converter with USB-C connector, automatic bootloader, and reset.

The ESP32 is a low-cost, low-power system-on-chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. More Information...

CAN Bus Shield for Arduino, Mbed Platform With Fault-Tolerant MAX33040E CAN Transceiver

The MAX33040Eshld shield evaluation kit by maxim integrated represents a demonstration and development platform for the MAX33040E CAN Bus transceiver. It serves as a standalone evaluation board and the Mbed or Arduino platform to communicate with a CAN Bus network. The board features test points to access critical signal pins of the transceiver. The MAX14931 digital isolator [...]

Read More »


Industry's First CAN Bus Transceiver With Fault Detection, Diagnostic Evaluation, And Reporting

Maxim Integrated introduced its MAX33012E, a CAN Bus transceiver that improves CAN Bus reliability through integrated fault detection and reporting. Designers requiring extended uptime for industrial automation applications can accelerate troubleshooting and communicate across more extensive networks using the MAX33012E CAN Bus transceiver. The device was designed to enhance industrial system uptime for factory-floor networks. The MAX33012E represents [...]

Read More »


CAN FD Controller With Integrated CAN Transceiver And SPI Interface

Texas Instruments has introduced their TCAN4550, a CAN FD stand-alone controller with integrated (on-chip) transceiver. The TCAN4550 represents an interface between a CAN Bus network and a host controller through a serial peripheral interface (18-MHz SPI).It supports the Classical CAN and the CAN FD data link layer. In addition, the chip comes with CAN FD transceiver functionality: differential [...]

Read More »


Galvanically Isolated CAN Bus Transceivers Protect Networks Against Destructive Energy

High noise levels on a CAN bus network have the potential to destroy CAN bus transceivers. This noise originates mainly from two sources, ground loops and electrical line surges.Protecting a network against this destructive energy requires the galvanic isolation of the CAN bus system from other local node circuitry. For more information on Controller Area [...]

Read More »


Controller Area Network (CAN) Transceiver Family Supports CAN FD (Flexible Data-Rate) Protocol

A family of Controller Area Network (CAN) transceivers including various automotive Grade 0 qualified parts is now available from Microchip Technology Inc. The ATA65XX family adds six devices to Microchip’s CAN portfolio.The family supports the recently established CAN FD (Flexible Data-rate) protocol for up to five Mbit/s communication speed and the new CAN PN (Partial Networking) standard for improved [...]

Read More »


Industrial-Strength Full Or Half Duplex Isolated RS-485 Transceivers

Maxim Integrated released their MAX14853/MAX14855 and MAX14943/MAX14949 RS-485 transceivers that include a transformer driver and low drop out (LDO) regulator simplifies power and data isolated designs. The MAX14943 isolated RS-485/PROFIBUS DP transceiver, as well as the MAX14949 transceiver, each provide up to 80% efficiency at 150mA load. Available in full or half duplex isolated RS-485 transceivers, the family [...]

Read More »