Electronic Components Datasheet Search
  English  ▼

X  

70353C Datasheet(PDF) 57 Page - Microchip Technology

Part # 70353C
Description  Section 21. Enhanced Controller Area Network
PDF  76 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

70353C Datasheet(HTML) 57 Page - Microchip Technology

Back Button 70353C Datasheet HTML 53Page - Microchip Technology 70353C Datasheet HTML 54Page - Microchip Technology 70353C Datasheet HTML 55Page - Microchip Technology 70353C Datasheet HTML 56Page - Microchip Technology 70353C Datasheet HTML 57Page - Microchip Technology 70353C Datasheet HTML 58Page - Microchip Technology 70353C Datasheet HTML 59Page - Microchip Technology 70353C Datasheet HTML 60Page - Microchip Technology 70353C Datasheet HTML 61Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 57 / 76 page
background image
© 2008-2011 Microchip Technology Inc.
DS70353C-page 21-57
Section 21. Enhanced Controller Area Network (ECAN™)
21
21.8
DMA CONTROLLER CONFIGURATION
The ECAN module uses device RAM for the message buffers to support both transmission and
reception of CAN messages. The number of message buffers to be used by the ECAN module
is specified by the DMA Buffer Size bits (DMABS<2:0>) in the ECAN FIFO Control register
(CiFCTRL<15:13>). The DMAxSTAL and DMAxSTAH registers in the DMA controller defines the
start of the CAN buffer area. The DMA controller moves data between ECAN and the message
buffers (placed in device RAM) without CPU intervention.
21.8.1
DMA Operation for Transmitting Data
The user application selects a message for transmission by setting the Message Send
Request bit (TXREQ) in the ECAN TX/RX Buffer m or n Control register (CiTRmnCON<3>).
The ECAN controller uses DMA to read the message from the message buffer and transmit the
message. The ECAN module generates a transmit data interrupt to start a DMA cycle. In
response to the interrupt, the DMA channel that is configured for ECAN message transmission
reads from the message buffer in device RAM and stores the message in the ECAN Transmit
Data register (CiTXD). Eight words are transferred for every message transmitted by the ECAN
controller. The detailed layout of the transmit message buffer is provided in 21.2 “CAN
Message Formats”. A sample code for configuring the DMA channel for ECAN1 transmission
is shown in Example 21-6.
Example 21-6:
DMA Channel 0 Configuration for ECAN1 Transmission
Note:
For more information on configuring and using the DMA module, refer to Section
22. “Direct Memory Access (DMA)” (DS70348) of the “dsPIC33E/PIC24E Family
Reference Manual”, which is available from the Microchip web site
(www.microchip.com).
/* This code snippet shows an example of configuring a DMA channel for ECAN
transmission. Refer to Example 21-1 for an application example */
/* Data Transfer Size: Word Transfer Mode */
DMA0CONbits.SIZE = 0x0;
/* Data Transfer Direction: device RAM to Peripheral */
DMA0CONbits.DIR = 0x1;
/* DMA Addressing Mode: Peripheral Indirect Addressing mode */
DMA0CONbits.AMODE = 0x2;
/* Operating Mode: Continuous, Ping-Pong modes disabled */
DMA0CONbits.MODE = 0x0;
/* Assign ECAN1 Transmit event for DMA Channel 0 */
DMA0REQ = 70;
/* Set Number of DMA Transfer per ECAN message to 8 words */
DMA0CNT = 7;
/* Peripheral Address: ECAN1 Transmit Register */
DMA0PAD = (volatile unsigned int); & CITxD;
unsigned long address;
DMA1STAL = (unsigned int) &ecan1msgBuf;
DMA1STAH = (unsigned int) &ecan1msgBuf;
/* Channel Enable: Enable DMA Channel 0 */
DMA0CONbits.CHEN = 0x1;
/* Channel Interrupt Enable: Enable DMA Channel 0 Interrupt */
IEC0bits DMA0IE = 1;



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com