NMEA2000 / J1939 Protocol Stack Kit

The overall aim for this kit is that it is ideal for customers wishing to port the stack onto their own target hardware and they can use the STM32 as a reference to help them.

The advantage of the Kvaser HAL is that the protocol stack can be built in a PC environment using the free Microsoft Visual Studio C compiler and run on a PC.  This is particularly useful when a customer does not have target hardware available or the hardware is not ready.  The stack can communicate with Warwick Control’s protocol analyser software X-Analyser (see www.xanalyser.co.uk) either via a real CAN bus using a Kvaser CAN interface or a simulated CAN bus using virtual CAN drivers.

Note:

  • You will need to download the free STM32CubeIDE compiler and IDE for the STM32 if you wish to be able to rebuild the project for the Nucleo board.
  • Stack can be used as basis for NMEA 2000, IEC 61162-3 for commercial vessels, SAE J1939 and RV-C technologies.
  • For NMEA2000 product certification testing, the stack reference design on the Nucleo will pass with the current test tool out of the box. This means that once you have made your application changes, less work will be required to get your device to pass the NMEA2000 Product Certification.
  • A diagnostic stack (UDS-light option) is available for vehicle based application with a basic ISO-TP and basic offering of UDS services.

A diagnostic stack (UDS-light option) is available for vehicle based application with a basic ISO-TP and basic offering of UDS services.

This protocol stack can also be ported to other microcontrollers as a custom engineering project.  Please contact us for further information.

NMEA2000 / J1939
Protocol Stack Feature Support
Feature NMEA2000 Stack Feature
STM32 Protocol Stack Kit
J1939 Stack Feature
Address Claim (PGN 60928 / EE00)
Tx on start startup
Yes
(Mandatory)
ISO Request / Request PGN (PGN 59904 / EA00) for Address Claimed (PGN 60928 / EE00) Address Claimed (EE00)
(Mandatory)
Other PGNs – user to implement
Yes
(Optional)
ISO Request / Request PGN (PGN 59904 / EA00) for Product Info (PGN 126996 / 1F014) Fully implemented.
Values need changing for target product
(Mandatory)
Yes
(Optional)
ISO Request / Request PGN (PGN 59904 / EA00) for Config Info (PGN 126998 / 1F016) Fully implemented.
Values need changing for target product
(Mandatory)
Not Required
ISO Request / Request PGN (PGN 59904 / EA00) for Tx/Rx PGN List (PGN 126464 / 1EE00) Fully implemented.
Values need changing for target product
(Mandatory)
Not Required
Commanded Address (FED8) (BAM) Mandatory Not Required
Broadcast Announcement Message (BAM) (EC00, EB00) Mandatory for Commanded Address Optional
Connected Management Data Transfer (CMDT) (EC00, EB00) Mandatory Optional
Fast Packet Protocol Mandatory Optional
Heartbeat (PGN 126993 / 1F011) Mandatory Not Required
Complex Request (PGN 126208 / 1ED00) for Address Claimed (PGN EE00) Address Claimed (EE00)
(Mandatory)
Other PGNs – user to implement
Not Required
Complex Command (PGN 126208 / 1ED00) Mandatory
Example implementation
Not Required
CAN Error Monitoring (Receive Error Counter and Bus State) Yes
(Optional)
Yes
(Optional)
Device Online Manager
(Track Devices Online)
Yes
(Optional)
Yes
(Optional)
UDS/ISO-TP Not Required Transport Protocol Implemented with Framework for Some Basic Services
J1939-73 Diagnostics Not Required Not implemented
User to use the stack’s BAM and ISO request services to implement DM01 etc.

(mandatory=mandatory for protocol, optional=optional protocol feature

Add-On Option for NMEA2000 Protocol Stack – Battery & Power PGNs

This is an option for customers of the NMEA2000 Protocol Stack which provides a reference design in C code for NMEA2000 Battery & Power related PGNs that passes the automated tests of the v3 NMEA2000 Certification Tool out of the box. It provides handler functions for sending and receiving PGNs, interpretation of the fields and handling of Complex Requests/Commands. The following PGNs are provided:

  • LOAD CONTROLLER STATE CONTROL – 0x1F20C
  • AC INPUT STATUS – DEPRECATED 0x1F20F
  • AC OUTPUT STATUS – DEPRECATED 0x1F210
  • DC DETAILED STATUS – 0x1F212
  • CHARGER STATUS – DEPRECATED – 0x1F213
  • BATTERY STATUS – 0x1F214
  • INVERTER STATUS – DEPRECATED – 0x1F215
  • CHARGER CONFIGURATION STATUS – 0x1F216
  • AGS CONFIGURATION STATUS – 0x1F218
  • BATTERY CONFIGURATION STATUS – 0x1F219
  • INVERTER CONFIGURATION STATUS – 0x1F217
  • AGS STATUS – 0x1F21A
  • AC POWER / CURRENT – PHASE A – 0x1F300
  • AC POWER / CURRENT – PHASE B – 0x1F301
  • AC POWER / CURRENT – PHASE C – 0x1F302
  • AC VOLTAGE / FREQUENCY – PHASE A – 0x1F303
  • AC VOLTAGE / FREQUENCY – PHASE B – 0x1F304
  • AC VOLTAGE / FREQUENCY – PHASE C – 0x1F305
  • CONVERTER (INVERTER/CHARGER) STATUS – 0x1F306
  • DC VOLTAGE / CURRENT – 0x1F307

ISO-TP-Light

The ISO-TP-Light option is an add-on C source code library for customers using NMEA 2000/SAE J1939 who need a basic Unified Diagnostic Services stack.

It is a C source code option for ISO15765 with physical addressing only.  It provides a framework for implementation of UDS such as:

  • $10 Session Control

  • $14 Clear DTCs

  • $19 Read DTCs

  • $22 Read Data By Identifier

  • $27 Security Access

  • $2E Write Data By Identifier

  • $3E Tester Present

These are a selection of services that are a typical minimum to provide some simple diagnostics. The framework is simple so that other services can be added.

Other Hardware Abstraction Layers

We can also provide source code HALs the following targets:

  • Linux using Socket CAN

  • PIC18F