TMS320F28P550SJ: MCAN used as classic CAN with extend ID

Part Number: TMS320F28P550SJ
Other Parts Discussed in Thread: C2000WARE

Hi experts,

    I try to use MCAN module works as classic CAN with an extend ID.

    So I combined  "mcan_ex4_receive.c" and "mcan_ex9_transmit.c" in C2000Ware_5_04_00_00 and do some changes, it works with a standard ID (txMsg[loopCnt].xtd = 0U) in loopback mode(INTERNAL),but the ID

    received is not  equal to the ID I sent .

    for example :

    tx ID: 0x100000; rx ID:0x100008, 

    tx ID: 0x100001; rx ID:0x102008, 

    tx ID: 0x10000F; rx ID:0x11E008, 

    when I change txMsg[loopCnt].xtd to 1, it fails to communicate.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// Include Files
//
#include "driverlib.h"
#include "device.h"
#include "inc/stw_types.h"
#include "inc/stw_dataTypes.h"
#include <string.h>
#define NUM_OF_MSG (1U)
#define MCAN_STD_ID_FILTER_NUM (1U)
#define MCAN_EXT_ID_FILTER_NUM (1U)
#define MCAN_FIFO_0_NUM (0U)
#define MCAN_FIFO_0_ELEM_SIZE (MCAN_ELEM_SIZE_64BYTES)
#define MCAN_FIFO_1_NUM (0U)
#define MCAN_FIFO_1_ELEM_SIZE (MCAN_ELEM_SIZE_64BYTES)
#define MCAN_RX_BUFF_NUM (10U)
#define MCAN_RX_BUFF_ELEM_SIZE (MCAN_ELEM_SIZE_8BYTES)
#define MCAN_TX_BUFF_SIZE (1U)
#define MCAN_TX_FQ_SIZE (0U)
#define MCAN_TX_BUFF_ELEM_SIZE (MCAN_ELEM_SIZE_8BYTES)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    what I realy want is a extend Id (29 bit) without any masks or filters,receive as it's sent.

x 出现错误。请重试或与管理员联系。