NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

StarterWare DCAN

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

The Controller Area network module is a high integrity serial communications protocol for distributed real time applications. The DCAN module present on AM335x is compliant to the CAN 2.0B protocol specification and supports bit-rates upto 1Mbits/s. The core IP for the DCAN controller is provided by Bosch.

Programming sequence[edit]

Interrupt Mode[edit]

Configuring DCAN for board-board communication[edit]
  • Platform Related Configurations
    • Configure the system clocks for DCAN peripheral by using the function provided in the platform directory
    • Perform pin mux for DCAN peripherals Tx and Rx pins
    • DCAN message RAM has to be initialized before the peripheral can be enabled for communication. This can be done by calling the function DCANMsgRAMInit
  • Initialization and Configuration
    • To place the DCAN in software reset DCANReset API can be used
    • DCAN module can be placed in initialization mode by calling the API DCANInitModeSet
    • Write access to the configuration registers can be enabled or disabled by calling the DCANConfigRegWriteAccessControl API
    • Configuration of CAN bit timing can be done by calling the DCANBitTimingConfig API
    • To enable the status change or error interrupts the DCANIntEnable API can be used
    • To enable the interrupt lines of DCAN peripheral the DCANIntLineEnable API can be used
    • To enable acceptance filtering for a receive message object DCANUseAcceptanceMaskControl and DCANMsgObjectMskConfig APIs can be used.
    • To invalidate a message object the DCANMsgObjInvalidate API can be used
    • To validate a message object the API DCANMsgObjValidate can be used
    • To configure the DCAN command register DCANCommandRegSet API can be used
    • To set the message ID of the CAN frame to be used for communication DCANMsgIdSet API can be used. Configure a receive message object with ID = 0, if CAN frames of any valid IDs(Standard/Extended) should be accepted.
    • To configure the direction of the message object DCANMsgDirectionSet API can be used
    • Data length code(DLC) can be configured using the DCANDataLengthCodeSet API
    • Data bytes to be transmitted as a part of a CAN frame can be written to the interface data registers by using the API DCANDataWrite
    • Message object interrupts can be enabled using the DCANMsgObjIntEnable API
    • Configuration for FIFO end of block control can be done by calling the DCANFIFOEndOfBlockControl API
    • To get the transmit request status the DCANTxRqstStatGet API can be used
    • To get the message valid status of a message object the DCANMsgValidStatusGet API can be used
    • To enable/disable the test modes of DCAN the DCANTestModeControl API can be used
    • To configure DCAN in various test modes the DCANTestModesEnable API can be used
    • Status of the interrupt register can be obtained by using the DCANIntRegStatusGet API
    • Status of DCAN error and status register can be obtained by using the DCANErrAndStatusRegInfoGet API
    • To get CAN bus from bus off to bus on state once the CAN bus errors are within the specified limit the DCANAutoBusOnControl API can be used
    • To clear the interrupt pending status of a message object the DCANCommandRegSet API with appropriate parameter can be used
    • To check the message number and the word number which caused the parity error in that message DCANParityErrCdRegStatusGet API can be used
    • To disable transmit or receive interrupts for a message object DCANMsgObjIntDisable API can be used
    • To read message object data which is transferred from message RAM to the interface register the DCANDataRead API can be used
  • Communication
    • To start communication on the CAN bus the DCANNormalModeSet API can be used

Here is a procedural document on enabling the DCAN port in Starterware on the ICEv2. This document also describes a DCAN test between the AM335x GPEVM and the ICEv2.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare DCAN here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare DCAN here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article StarterWare DCAN here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article StarterWare DCAN here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article StarterWare DCAN here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare DCAN here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare DCAN here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article StarterWare DCAN here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article StarterWare DCAN here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity