@@ -8,13 +8,11 @@ Transmitting a Remote message from ECAN1 and requesting transmission from ECAN2
88
994 Message Buffers are defined for ECAN1 and ECAN2
1010
11-
1211Two message buffers are configured for ECAN1. One is configured as a Transmit Buffer to generate a Remote Frame.
1312The other is configured as a Receive Buffer to receive message sent by ECAN2.
1413
1514One message buffer in ECAN2 is configured as a Transmit buffer for transmitting the requested data frame.
1615
17-
1816Filters and Masks are enabled for both ECAN1 and ECAN2 for Message Reception.
1917
2018ECAN2 Transmit Buffer will be pointing to a filter in the case of Remote Transmission.
@@ -28,7 +26,7 @@ The configuration of the two ECAN modules is done in the ECAN1Config.c and ECAN2
2826The number of message buffers to be allocated in DMA RAM are configured by using the following definitions
2927in the ECAN1Config.h and ECAN2Config.h file.
3028
31- #define ECAN1_MSG_BUF_LENGTH< br />
29+ #define ECAN1_MSG_BUF_LENGTH
3230#define ECAN2_MSG_BUF_LENGTH
3331
3432The aligment attribute is used to make sure that the DMA allocates the base address for the peripheral
@@ -41,27 +39,27 @@ address generated by the peripheral. (in this case ECAN).
4139The number of bytes may be decided based on the number of buffers being configured by the definition made earlier.
4240This is calculated as follows -
4341
44- Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)* 2 and< br />
42+ Number of bytes = (ECAN1_MSG_BUF_LENGTH * Number of words in one buffer)* 2 and
4543Number of bytes = (ECAN2_MSG_BUF_LENGTH * Number of words in one buffer)* 2.
4644
4745For eg : If 4 message buffers are defined as
4846
49- #define ECAN1_MSG_BUF_LENGTH 4, then,< br />
47+ #define ECAN1_MSG_BUF_LENGTH 4, then,
5048Number of bytes = 4 * 8 * 2 = 64 (because Number of words in one buffer = 8 for ECAN).
5149
5250The information on transmit message identifiers and other bits are written as arguments into these functions
5351
54- ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );< br />
55- ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);< br />
56- ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );< br />
57- ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);< br />
52+ ecan1TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
53+ ecan1TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
54+ ecan2TransmitMsg(unsigned int buf, long txIdentifier, unsigned int ide, unsigned int remoteTransmit, unsigned int srr, unsigned int dataLength );
55+ ecan2TxData(unsigned int buf, unsigned int data1, unsigned int data2, unsigned int data3, unsigned int data4);
5856
5957The information on message acceptance filters and masks are written as arguments into these function
6058
61- ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);< br />
62- ecan1Mask(int m, long identifierMask, unsigned int mide);< br />
63- ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);< br />
64- ecan2Mask(int m, long identifierMask, unsigned int mide);< br />
59+ ecan1Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
60+ ecan1Mask(int m, long identifierMask, unsigned int mide);
61+ ecan2Filter(int n, long identifier, unsigned int exide,unsigned int bufPnt,unsigned int maskSel);
62+ ecan2Mask(int m, long identifierMask, unsigned int mide);
6563
6664Note :- The PPS configuration in the ecan1_config.c and ecan2_config.c source files change with the device being used. THe user is advised
6765to refer the datasheet and use the appropriate values for RPINR/RPOR registers for proper operation.
0 commit comments