• Menu
  • Product
  • Email
  • PDF
  • Order now
  • Configurable Error Generator for Controller Area Network

    • SPRACQ3 October   2020 F29H850TU , F29H850TU , F29H859TU-Q1 , F29H859TU-Q1 , TMS320C28341 , TMS320C28341 , TMS320C28342 , TMS320C28342 , TMS320C28343 , TMS320C28343 , TMS320C28343-Q1 , TMS320C28343-Q1 , TMS320C28344 , TMS320C28344 , TMS320C28345 , TMS320C28345 , TMS320C28346 , TMS320C28346 , TMS320C28346-Q1 , TMS320C28346-Q1 , TMS320F2800132 , TMS320F2800132 , TMS320F2800133 , TMS320F2800133 , TMS320F2800135 , TMS320F2800135 , TMS320F2800137 , TMS320F2800137 , TMS320F2800152-Q1 , TMS320F2800152-Q1 , TMS320F2800153-Q1 , TMS320F2800153-Q1 , TMS320F2800154-Q1 , TMS320F2800154-Q1 , TMS320F2800155 , TMS320F2800155 , TMS320F2800155-Q1 , TMS320F2800155-Q1 , TMS320F2800156-Q1 , TMS320F2800156-Q1 , TMS320F2800157 , TMS320F2800157 , TMS320F2800157-Q1 , TMS320F2800157-Q1 , TMS320F280021 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280023C , TMS320F280025 , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280025C-Q1 , TMS320F280037C , TMS320F280037C , TMS320F280039C , TMS320F280039C , TMS320F280040-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C , TMS320F280049C-Q1 , TMS320F280049C-Q1 , TMS320F2801 , TMS320F2801 , TMS320F2801-Q1 , TMS320F2801-Q1 , TMS320F28015 , TMS320F28015 , TMS320F28016 , TMS320F28016 , TMS320F28016-Q1 , TMS320F28016-Q1 , TMS320F2802 , TMS320F2802 , TMS320F2802-Q1 , TMS320F2802-Q1 , TMS320F28020 , TMS320F28020 , TMS320F280200 , TMS320F280200 , TMS320F28021 , TMS320F28021 , TMS320F28022 , TMS320F28022 , TMS320F28022-Q1 , TMS320F28022-Q1 , TMS320F280220 , TMS320F280220 , TMS320F28023 , TMS320F28023 , TMS320F28023-Q1 , TMS320F28023-Q1 , TMS320F280230 , TMS320F280230 , TMS320F28026 , TMS320F28026 , TMS320F28026-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28026F , TMS320F28027 , TMS320F28027 , TMS320F28027-Q1 , TMS320F28027-Q1 , TMS320F280270 , TMS320F280270 , TMS320F28027F , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28027F-Q1 , TMS320F28030 , TMS320F28030 , TMS320F28030-Q1 , TMS320F28030-Q1 , TMS320F28031 , TMS320F28031 , TMS320F28031-Q1 , TMS320F28031-Q1 , TMS320F28032 , TMS320F28032 , TMS320F28032-Q1 , TMS320F28032-Q1 , TMS320F28033 , TMS320F28033 , TMS320F28033-Q1 , TMS320F28033-Q1 , TMS320F28034 , TMS320F28034 , TMS320F28034-Q1 , TMS320F28034-Q1 , TMS320F28035 , TMS320F28035 , TMS320F28035-EP , TMS320F28035-EP , TMS320F28035-Q1 , TMS320F28035-Q1 , TMS320F28050 , TMS320F28050 , TMS320F28051 , TMS320F28051 , TMS320F28052 , TMS320F28052 , TMS320F28052-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28052M-Q1 , TMS320F28053 , TMS320F28053 , TMS320F28054 , TMS320F28054 , TMS320F28054-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M , TMS320F28054M-Q1 , TMS320F28054M-Q1 , TMS320F28055 , TMS320F28055 , TMS320F2806-Q1 , TMS320F2806-Q1 , TMS320F28062 , TMS320F28062 , TMS320F28062-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28062F-Q1 , TMS320F28063 , TMS320F28063 , TMS320F28064 , TMS320F28064 , TMS320F28065 , TMS320F28065 , TMS320F28066 , TMS320F28066 , TMS320F28066-Q1 , TMS320F28066-Q1 , TMS320F28067 , TMS320F28067 , TMS320F28067-Q1 , TMS320F28067-Q1 , TMS320F28068F , TMS320F28068F , TMS320F28068M , TMS320F28068M , TMS320F28069 , TMS320F28069 , TMS320F28069-Q1 , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M , TMS320F28069M-Q1 , TMS320F28069M-Q1 , TMS320F28075 , TMS320F28075 , TMS320F28075-Q1 , TMS320F28075-Q1 , TMS320F28076 , TMS320F28076 , TMS320F2810 , TMS320F2810 , TMS320F2810-Q1 , TMS320F2810-Q1 , TMS320F2811 , TMS320F2811 , TMS320F2811-Q1 , TMS320F2811-Q1 , TMS320F2812 , TMS320F2812 , TMS320F2812-Q1 , TMS320F2812-Q1 , TMS320F28232 , TMS320F28232 , TMS320F28232-Q1 , TMS320F28232-Q1 , TMS320F28234 , TMS320F28234 , TMS320F28234-Q1 , TMS320F28234-Q1 , TMS320F28235 , TMS320F28235 , TMS320F28235-Q1 , TMS320F28235-Q1 , TMS320F28332 , TMS320F28332 , TMS320F28333 , TMS320F28333 , TMS320F28334 , TMS320F28334 , TMS320F28335 , TMS320F28335 , TMS320F28335-Q1 , TMS320F28335-Q1 , TMS320F28374D , TMS320F28374D , TMS320F28374S , TMS320F28374S , TMS320F28375D , TMS320F28375D , TMS320F28375S , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376D , TMS320F28376S , TMS320F28376S , TMS320F28377D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28377D-Q1 , TMS320F28377S , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378D , TMS320F28378S , TMS320F28378S , TMS320F28379D , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28379S , TMS320F28384D , TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388D , TMS320F28388S , TMS320F28388S , TMS320F28P550SG , TMS320F28P550SG , TMS320F28P550SJ , TMS320F28P550SJ , TMS320F28P559SG-Q1 , TMS320F28P559SG-Q1 , TMS320F28P559SJ-Q1 , TMS320F28P559SJ-Q1 , TMS320F28P650DH , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1 , TMS320F28P659SH-Q1

       

  • CONTENTS
  • SEARCH
  • Configurable Error Generator for Controller Area Network
  1.   Trademarks
  2. 1Introduction
  3. 2Frame Generation – GPIO/CCS Method
  4. 3Frame Generation – LabVIEW Method
    1. 3.1 Setup Procedure
    2. 3.2 Input Windows
    3. 3.3 Output Windows
  5. 4Reference Frames
  6. 5Error Generation
    1. 5.1 GPIO/CCS Method
    2. 5.2 LabVIEW Method
  7. 6Emulated Error Frames
  8. 7References
  9. IMPORTANT NOTICE
search No matches found.
  • Full reading width
    • Full reading width
    • Comfortable reading width
    • Expanded reading width
  • Card for each section
  • Card with all content

 

APPLICATION NOTE

Configurable Error Generator for Controller Area Network

Trademarks

LabVIEW is a trademark of National Instruments Corporation.

C2000 and Code Compose Studio are trademarks of Texas Instruments Incorporated.

All trademarks are the property of their respective owners.

1 Introduction

The objective of this application report is to provide an easy-to-use hardware and software framework to generate and analyze different types errors in a CAN bus. Two different methods are presented:

  • GPIO method: A test-case that could be run on any applicable C2000 device. This provides visibility on a GPIO pin, if desired. A working C2000 target board and Code Compose Studio™ (CCS) IDE is all that is required.
  • LabVIEW method: This method is useful in case integration into a larger test setup (independent of a C2000 target) is desired. This needs the hardware outlined in Section 3.

For both methods, an oscilloscope with built-in CAN bus triggering/decoding is essential.

All simulated waveforms in this document were captured at the GPIO pin emulating the CAN transmit function. The effect of a CAN receiver node detecting an error and destroying the on-going frame will not be seen since the waveforms do not reflect true CAN bus activity, but only emulated CAN function. For this reason, the complete “CAN waveform” is seen in the oscilloscope captures. CAN frames shown in Table 1-1 were generated with GPIO and LabVIEW methods. These simulated frames were monitored with a CAN bus analyzer. The correct interpretation of the frames by the analyzer was validation that the frames are generated correctly and consistently.

Table 1-1 Generated CAN Frames
Frame Type ARBID DLC D0 D1 D2 D3 CRC
ID Remote Request
Standard No 0x45B 4 95 1A 23 45 0x5AD8
Standard Yes 0x45B 4 n/a n/a n/a n/a 0x238C
Standard Yes 0x45B 0 n/a n/a n/a n/a 0x7B43
Extended No 0x1914A75B 4 95 1A 23 45 0x4101
Extended Yes 0x1914A75B 4 n/a n/a n/a n/a 0x4EB3
Extended Yes 0x1914A75B 0 n/a n/a n/a n/a 0x167C

2 Frame Generation – GPIO/CCS Method

This section explains how to configure error generation using the GPIO/CCS method. This should be used in conjunction with Figure 2-1.

  • Configure message length and bit-rate
    • Configure message length in bytes (DLC)
    • Configure bit-rate (in bps)

Hardware set up procedure:

CAN_GPIO_MODE

  1. Select the GPIO that would generate the CAN bit stream.
  2. Connect a jumper wire from the chosen GPIO to the selected CANRX pin.
  3. Connection is direct between GPIO and CANRX pins. No transceiver involved.

CAN_DATALBCK_MODE

  1. No external connections are needed.
  2. CANTX data directly goes to the CANRX buffer using internal connection.
  • Configure CAN Data Frame
    • Enter desired Arbitration ID (Message ID)
    • Enter desired data to be transmitted
    • Choose data frame or remote request

CCS-Use Watch Expression to monitor CAN-frame related variables

  • Generated 15-bit CAN CRC using polynomial 0xC599 can be monitored through the Expressions window in CCS.
  • The number of occurrences for stuffed bits can also be monitored in the Expressions window of CCS.
GUID-20200922-CA0I-5CTP-VHT1-S99MGDH1Q84Z-low.png Figure 2-1 Frame Generation – GPIO/CCS Method

3 Frame Generation – LabVIEW Method

This section illustrates the various steps involved in generating CAN frames using the LabVIEW method, using ‘GenerateCANStream.vi’. It also explains the various indicators and configurable options in the Labview vi.

 

Texas Instruments

© Copyright 1995-2025 Texas Instruments Incorporated. All rights reserved.
Submit documentation feedback | IMPORTANT NOTICE | Trademarks | Privacy policy | Cookie policy | Terms of use | Terms of sale