SAMV71 Xplained Ultra Software Package 1.3

Controller Area Network (CAN) Example using MCAN

Purpose

The Controller Area Network (CAN) Example will help new users get familiar with the MCAN peripheral used in Atmel's Samv7 family of microcontrollers.

Requirements

This package can be used with SAMV7-Xplained Ultra.

Description

The demonstration program periodically transmits several different CAN messages. The program enables CAN loopback mode so that the transmitted messages are reflected back as received messages as well. LED #0 is toggled on a successful transmission of one of the messages & LED #1 is toggles on a successful reception of the same message. Message transmission is stopped while SWITCH #0 is held depressed, which in turns means that both LED's should stop blinking. Depressing SWITCH #1 alternates between standard CAN operation and CAN-FD operation with bit rate switching.

Usage

  1. Build the program and download it inside the SAM V71 Xplained Ultra board. Please refer to the Getting Started with SAM V71 Microcontrollers.pdf
  2. On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 bits of data
    • No parity
    • 1 stop bit
    • No flow control
  3. Start the application.
  4. Two LEDs should start blinking on the board. In the terminal window, the following text should appear (values depend on the board and chip used):
          -- Controller Area Network (CAN) Example %s --\n\r", SOFTPACK_VERSION );
          -- xxxxxx-xx
          -- Compiled: xxx xx xxxx xx:xx:xx --
          -- LED0 toggles on CAN message reception
          -- LED1 toggles on CAN message transmission
          -- CAN message transmission stopped while SW0 is pushed
          -- SW1 pushes alternate between standard CAN and CAN-FD
    

Both LEDs should stop blinking while Button #0 is held depressed.

References

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines